Perform allocations in separate transactions
Add ForUpdateManager to the Backend model, in order to guaranteeexclusive order when allocating a VM.
Use manual transactions when allocating Backend and public IP for a newVM, since these allocations need exclusive access (SELECT..FOR UPDATE)...
Fix typo
Merge branch 'public_networks' into devel-0.11
Conflicts: snf-cyclades-app/synnefo/logic/dispatcher.py
Close DB conn in dispatcher before every message
Have the dispatcher close the Django DB connection before processingan incoming message. This allows the actual, underlying DBAPI connectionto return to the DB connection pool, if used, and enables the dispatcher...
Fix cleanup of DB pooled connections
Fix bug in cleanup of DB pooled connections before putting them back tothe pool. The way the connection was cleaned, resulted in mishandling ofthe transactions.
Accoring to psycopg2 docs, in case of a READ COMMITED isolation level:...
Make snf-dispatcher work with gevent
Remove workers from snf-dispatcher in order to make it compatible with geventand specifically the green, monkey patched version of psycopg2(synnefo.lib.db.psyco_gevent). Also after daemonizing, gevent must bereinitialized because the deamon context forks.
Add pool-create and pool-remove commands
Change process title to simplify 'ps' display
Use python-setproctitle to change the process title of the runningdaemon. Make it appear as a native executable to simplifyadministration. Only set executable name, because cannot set individualvalues for arguments.
Add setproctitle to dependencies
Fix presentation of pools
Remove unnecessary locking
Selecting FOR_UPDATE on network object is not any more required, sincethe IP Pool have been moved to the IPPoolTable. Selecting FOR_UPDATE isneeded there.
Fix two bugs in network reconciliation
Fix race conditions when updating network objects
Use for_update() object manager in order to exclude race conditionswhen updating network objects.
Fix double logging of dispatcher
Dispatcher had as default handlers the console and the file handler.However, when daemonizing, we redirect the stdout and stderr to the filehandler, which resulted in the log messages to be printed twice. So weremove the console handler from the dict configuration, and we only add...
Fix typos
Catch corner case in reconciliation
Catch error produced when the DB entry for an orphan VM in Ganeti doesnot exist. This may happen because either an entry from DB was removedor because a VM in Ganeti with the synnefo prefix was created.
Fix broken logging
Rename LOGGING setup to LOGGING_SETUP, as this name is required bythe LoggingConfigMiddleware. Django's default LOGGING setting canbe used with Django>=1.3
Also change default handler to 'console' and add a more verbose format.
don't take mutex for cleanup
Enhance pooling API, implementation, and tests
- Verify objects (new and old) with a hook _pool_verify. Discard objects from the pool that fail verification. A newly created object failing verification is fatal.
- Remove all hooks from the pool set access critical section....
complete some functionality
port pooled psycopg2 to new pool api
remove obsolete kwarg verify
Fix bug in http connection pool
Do not reset connetion _pool attribute, since it is not (yet?)initialized when getting the object from the pool.
Enhange logging in db and http pools
Fix no-time in eventd messages
Ganeti opcodes may not have an end-timestamp when they go toan error state. In that case send the job end-timestamp.
Rename Cyclades management commands for uniformity
Rename Cyclades management commands for uniformity.
Add some logging to backend allocator
Refactor IP pools
Treat IP pool the same way as bridge and mac-prefix pools. The pool isremoved from the Network table and moved to an IPPoolTable containing theIP pools for all networks. Also added support for external reservations.
Migration files for transfering the pool to the new tables are included....
Add tests for PoolManager(s)
Fix bugs in IPPool
- Do not always reserve gateway- Initial reservations must be in reserved map
Handle case of no pools in reconcile-pools
Catch error in removing nic
Management commands for pools
Create three new management commands for listing, showing and modifyinga pool.
Unique mac-prefix only for mac-filtered networks
Add logging to synefo.db.models
Refactor bridge and mac-prefix pool tables
Redesign the implementation of pools and map mac-prefix and bridge poolsto that design.
Each pool type is mapped to a table in the database, and each row ofthat table is a pool of that type. All pool tables must contain the...
Fix bug in server-inspect
Fix bug in snf-manage network-remove
Wrap network-create command in transaction
Merge branch 'pooling' into devel-0.11
Enable hotplug during create_instance
This passes hotplug = True to ganeti and enables hotplug per instance.It checks GANETI_USE_HOTPLUG setting.
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
Support multiple public networks in UI
Encapsulate in nic dict a public flag (network.public) andremove twisted oldstyle identification way (network_id == 'public')for retrieving public interfaces.All network references are done via their network_id....
Remove add_reserved_ips from rapi client
In order to be compatible with grnet and upstream ganeti
Allow connecting a VM to a network only if active
New method for creating BackendNetwork entries
Create a new method to the Network model, in order to create theBackendNetwork entries tha correspond to this network. Also removethe custom save method, since when multiple public network will besupported, we want them to be correlated with specific backends.
Remove dead code
Implement multiple public networks
Implement multiple public networks in order to support:- different public networks per backend- non-consecutive IP ranges in each backend
To support this, public networks are treated different from privateones. Namely, they are correlated with one backend (and so have...
Do not allow creation of two big/small networks
- Networks smaller than /29 are not supported in Ganeti.- Big networks will result in degraded performance in Ganetiand DB due to the big reservation map.
Reserve gateway's IP when creating an IP pool
Update rapi to reflect to the upstream ganeti
reserved_ips->add_reserved_ipsRemove Network*All()
Move pooling psycopg2 wrapper to synnefo.lib.db
Move pooling psycopg2 wrapper to synnefo.lib.db,please see commit e83ed1fb8fb4d0d19c2d3f86152fde60b3cadfd9 for all thedetails on how to use the pooling wrapper for psycopg2.
Pool HTTP connections to the astakos service
Have the astakos client use pooled HTTP connections to the astakosservice, uses facilities from synnefo/lib/pool/http.py.
simple http_request objects over connection pools
Do not send reserved_ips argument
In rapi CreateNetwork method
Propagate NIC change event to the associated vm
so that nic changed attributes get propagated to the vm views (e.g. nic ipchange).
Update admin guide to reflect Cyclades v0.11
In Cyclades v0.11 we introduce support for multiple backendsand support for Public/Private Network management. Plus,management of IP and MAC address pools.
The quick install admin guide is updated to reflect those changes....
Catch error caused by duplicate NIC removal in ui
NICs get removed once their associated vm or network trigger theircorresponding remove signal. Synchronous removal of vm/network willcause duplicate NIC removes to be called.
Add pooling synnefo.db.pooled_psycopg2 DBAPI drv
Add DBAPI driver synnefo.db.pooled_psycopg2, which is athin, pooling wrapper around psycopg2.
To use, first monkey-patch psycopg2:
from synnefo.db.pooled_psycopg2 import monkey_patch_psycopg2monkey_patch_psycopg2()...
Make pool more robust on obj creation failure
Make ObjectPool handle failures during object creation more robustly,and release the pool semaphore.
Extend ObjectPool functionality, tests
Rename ObjectPool methods to pool_{put(), get()}
Revert plankton backend to its original state
trash development code was added by mistake in commit `c6dda6c`
Update GANETI_DISK_TEMPLATES setting description
Describe how to set ext disk template provider.
Include common date utc formatting methods
Support for ext disk providers
Extract provider from flavor disk template name and set the additional`provider` parameter in disk options. Flavor disk_template should beformated as `ext_<provider_name>`.
Networks list api response fix
include deleted networks in reponse if changes-since parameter is set. Thisenables ui application to identify deleted networks and remove them fromuser interface.
Remove spare div from html
Fix html typo
Firefox ui fix
add overflow to `hidden` to properly clear upper div in single vm view.
Support timeout in ObjectPool.get(), fix tests
Support optional timeout argument in ObjectPool.get(),if supported by the underlying Semaphore implementation.
Implement command-line argument for ObjectPool unit tests to runinside gevent monkey-patched environment.
Make minor fixes to Singleton class unit tests
Add ObjectPool class in synnefo.lib
Add ObjectPool class in synnefo.lib.The ObjectPool class is an abstract pool of objects,based on Semaphore locks, as provided by the threadingpackage.
Tested to work with a gevent-monkey-patched threading package.Uncomment the relevant lines in pool/tests.py to test with greenlet...
Fix servers api list response
filter out deleted vms !!!!!!!
Fix servers api response
do not filter out deleted vms if valid changes-since parameter is set onthe request. This allows ui application to be able to identify and removedeleted vms.
Add check for maximum secret encryption key
SECRET_ENCRYPTION_KEY can be up to 32 bytes long, since bigger keys arenot supported by AES encryption. Add comment to the setting and bettermessage to exception.
Fix bug in migration file
Do not allocate a bridge from the pool for deleted networks.
Rename setting
Rename ENCRYPTION_KEY to SECRET_ENCRYPTION_KEY to prevent from beingdisplayed at django debug traces.
Add setting indicating whether to use hotplug
Revert "Start pool indexing from 0"
This reverts commit 2f998a3756c6fc7ddce9e0f83dea738e473320b8.
Update Changelog
Fix bug in creating network
Exclude deleted networks.
New dependencies of snf-cyclades-app
Start pool indexing from 0
Limit allowed private networks per user
Get cluster name from Ganeti
Query Ganeti for getting the cluster name, instead of reading thessconf files.
Merge branch 'master' into devel-0.11
Conflicts: snf-cyclades-gtools/synnefo/ganeti/eventd.py
Management command for removing backend