Add more tests for db, logic and api
Fix wrong count of reserved pool entries
Padding should not be considered when counting unavailable entries.
Fix bugs in models methods
Add more tests for db and logic
Add object factories for most db models
Use 'factory_boy' library for creating Django ORM objects as test data.These factories can be used as fixtures replacement since they areeasier to write and maintain.
Include Pool tests to Django testsuite
Fix current db, logic and api tests
Do not allow creation of more than one pools
Do not allow creation of more than one Bridge or MacPrefix pool, sincewe can not handle them yet.
Introduce network flavors to replace network types
Add tags and mode to network db model. Replace existing type withflavor. Introduce 4 different flavors. Each flavor has mode, link,mac_prefix, tags. Supported flavors are CUSTOM, IP_LESS_ROUTED,MAC_FILTERED, PHYSICAL_VLAN and are hardcoded in db models....
Migration files for network types
Fix bugs from merging
Add migration file for quotaholderserial
Reorder code
Create QuotaHolderSerial table
Add QuotaHolderSerial column to VM and Network
Correlate the VirtualMachine and Network models with a QuotaHolderSerialentry, holding the serial number returned by the QuotaHolder for thelast allocation for these resources.
Do not automatically update network state
Each modification in a BackendNetwork object, triggers an updateto the corresponding Network object. Until now this was done bythe BackendNetwork save() method. Now it is explicitly donefrom the backend pross_network_status.
Implement resizing of pools
Extend PoolManager to support extending and shrinking of Pools. Alsoadd extra option '--size' to pool-modify command.
Add indexes to VirtualMachine and Network
Add indexes to VirtualMachine userid and deleted columnsAdd indexes to Network userid, deleted and public columns
Use select_for_update for VirtualMachines
Use select_for_update method when accessing VM objects to preventrace conditions. Also move start_action from logic to api.
Delete BackendNetworks when deleting a Backend
Merge branch 'ui-0.11' into devel-0.12
Do not allow actions to deleted networks
Remove depricated settings and update migrations
Merge remote-tracking branch 'origin/devel-0.12' into ui-0.11
Fix compatibility issues with python-bitarray
Reapply diagnostics migrations
Merge branch 'devel-0.12' into ui-0.11
Do not create bridge for public network
Bridge indexes must start from 1
Restore IP Pool creation for corner cases
Create IPPool when creating Network
Create the IPPool associated with each Network, when creating it. Untilnow, IPPools were created on first demand. However, because the Networkobject is not accessed in exclusive mode, concurrent access to theNetwork model resulted in a race condition. More than one workers may...
Fix typos
Release mac_prefix only if network is MAC_FILTERED
Change and fix migration files
Change network migration, so that it does not allocate a new bridge toexisting network. Instead it keeps the bridges from the old NetworkLinkpool.
Remove network_mac_prefix migration because there are no networks withmac prefixes....
Merge branch 'devel-0.11' into ui-0.11
Conflicts: snf-cyclades-app/synnefo/db/models.py snf-cyclades-app/synnefo/logic/backend.py snf-cyclades-app/synnefo/ui/static/snf/js/models.js
Fix bug about RAPI client pooling
Modify the pooled_rapi_client context manager to handle exceptionsand release the client in any case. Also modify uses of reconciliationto handle exceptions inside the scope of the context manager
Fix wrong call in VirtualMachine get_client
Add missing arguments in Backend's get_client
Remove user provided names from models unicode
Remove user provided names from models representation, as the usermay provide a value that can affect the admin terminal. Fix suggestedby vkoukis.
Add extra logging
Pool Ganeti RAPI clients
- Move Ganeti RAPI client from snf-common to snf-cyclades-app/logic.- Create GanetiRapiClientPool for pooling GanetiRapiClient objects- Create context manager in db.models for pool handling- Update code using the RAPI client
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)...
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
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...
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.
Virtual machine diagnostics models and migrations
Initial commit for VirtualMachineDiagnostics model and the correspondingsouth migrations script.
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.
Revert "Start pool indexing from 0"
This reverts commit 2f998a3756c6fc7ddce9e0f83dea738e473320b8.
Start pool indexing from 0
Fix migration files
Fix south migration files. In data migrations, access the Models fromthe orm, instead importing Models from synnefo.db. This is necessary asthe orm provides access to the version of the models that existed whenthe migration file was created.
Implement MAC Prefix Management
In order to guarantee uniqueness of MAC address accross all backends,synnefo assignes a unique mac prefix to each network in each backend.
A mac-prefix of 20 bits, which is picked from the MacPrefixPool, isassigned to each Network. The mac-prefix of the network in each...
Warning about missing setting to migration file
Release resources of Network only on deletion
Assert that this is an 'real' deletion of a Network before releasingit's resources. Without this patch, a resource used by an other Networkcould be released, if someone called the Network.update_state function...
Fix bugs in migration files
Implement model manager using row-level db locking
Implement ForUpdateManager that uses SELECT .. FOR UPDATE statement inorder to acquire row-level exclusive locks to DB. Essentially thismanager backports the select_for_update() method that is implemented in...
Increase the size of backend password_hash
Use ForUpdateManager to Pool objects
Add support for IPv6
- Extend the Network model with fields for holding the IPv6 subnet and gateway.- Update network API methods.- Modify ganeti hooks to return IPv6 address for all network interfaces. IPv6 is now derived from the IPv6 subnet of the network in Ganeti,...
New management command for creating a network
Create a management command for creating networks. Also removethe initial_data.json, since it is currently not necessary.
Implement IP management
Delegate IP management to synnefo, in order to be able to allocate IPaddresses accross multiple Ganeti backends. This is achieved by creating aPool of IPs for each Network, in the form of a bitarray, which is storedin the DB as a base64 string....
Update network settings
Encrypt Backend password
Use cipher to encrypt the passwords of the Ganeti backends in the DB.Encryption/decryption is based on a configurable key, defined by theENCRYPTION_KEY setting. After modifying this setting, synnefo will beunable to decrypt already stored passwords, and passwords must be...
Add dirty bit to NetworkInterface
Extend NetworkInterface model with a dirty bit, indicating whetherthe index of the NIC is consistent with the one in Ganeti. This flag isset when deleting a NIC, and is switched off after processing thenotification from Ganeti. Removing a NIC with the dirty bit on is not...
Common functions for instance/network backend name
Release resources when deleting network
Set as available in the pool the bridge and mac prefix that wasused by the deleted network.
Bug fixes concerning networks
Print warning about subnet value during migration
Set index of NetworkInterface model to not null
Major modifications to Network model
Since Ganeti version 2.6, Ganeti is aware of private networks. We takeadvantage of this by propagating network handling to Ganeti. Networkmodel is expanded to include information about the type of network(public routed, physical vlan, private filtered), subnet, gateway, dhcp,...
Implement BackendNetwork model
Create a new model, to represent the state of each network in eachbackend.
Use the Backend client instead of global RAPI
Replace use of global RAPI client, with the cached client from theVirtualMachine or Backend model.
Dispatch network actions to all backends.
Create Backend model to represent a ganeti backend
- Create Backend model holding info about credentials, status and resources- Add Backend as foreign key to VirtualMachine- Create a cache of Backend clients (RAPI) for better performance
Rename backend_id to backend_vm_id
Rename backend_id field of VirtualMachine model to avoid conflict between thebackend that hosts the VM and the id that the VM will have on the backend.
Fix white space and PEP8
Merge branch 'simplequotas' into queues+minor_net
Simple per user quota mechanism for networks/vms
- New dict setting VMS_USER_QUOTA to allow setting per user quota (overrides MAX_VMS_PER_USER setting)- Private networks quota mechanism (based on MAX_NETWORKS_PER_USER and NETWORKS_USER_QUOTA settings)...
Update modules interacting with AMQP
Update all modules which are interacting with the RabbitMQ messaging system touse the AMQPClient in order to use highly available queues in active/activemode.
Extend messages to include a unique identifier in order to handle...
New migrations for cyclades-app
Fixes some flavor constrains issues
Fix the data migration
Use the uniq field instead of the id.
Renumber the migrations
Merge remote-tracking branch 'origin/master' into astakos-integration
Conflicts: snf-cyclades-app/synnefo/api/util.py
Update the Flavor's unique_together constraint
A DB migration is required.
Remove obsolete files that were restored due to merge
Move migrations to new location
Conflicts: runtests.sh snf-cyclades-app/synnefo/aai/__init__.py snf-cyclades-app/synnefo/aai/fixtures/auth_test_data.json snf-cyclades-app/synnefo/aai/middleware.py snf-cyclades-app/synnefo/aai/models.py...
Renamed snf-app to snf-cyclades-app