Refactor tests
Add more tests for db, logic and api
Fix bug in images API
Use image_backend context manager to ensure that ImageBackend is alwaysclosed. list_images method did not close the ImageBackend, whichresulted in depletion of the Pithos backend connection pool.
Refactor some test code
Fix current db, logic and api tests
Fix handling of firewallProfile action
Refs #3097
Fix variable scope
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....
Fix metatada and personality of vmapi
Fix typos
Merge handling of ext_<provider> disk templates
Use helper function for verifying personalities
Merge branch 'origin/devel-0.13' into quota
Conflicts: snf-cyclades-app/synnefo/api/servers.py
Fix wrong setting
PUBLIC_ROUTED_USE_POOL has been renamed to PUBLIC_USE_POOL
Fix bugs from merging
Merge branch 'devel-0.12' into devel-0.13
Conflicts: snf-cyclades-app/synnefo/plankton/backend.py
Issue commissions when creating server/networks
Issue commissions to the Quotaholder when creating a VM or a Network.The VM/Network that is associated with the corresponding serial in DB.Also, the serial is marked as accepted because at the end of thetransaction the resource will be present in the DB. Even in case the...
Refactor some code to API create_server method
Handle Pithos NotAllowedError
Use vmapi when creating servers
Use the vmapi when creating servers. Creete instance RAPI call takes theconfiguration url instead all the image parametere. The id and formatof the image are still passed, just for readability and debugging.
Also renamed params_url to config-url.
Rename nodeapi to vmapi
vmapi improvements
VM creation signal
`synnefo.api.servers.server_created` signal has been created. The signalis send for each created server. The signal sender is the created vm andone argument named `created_vm_params` is passed to the connectedcallback functions.
Add function for pretty printing tables
Implement server-import management command
Implement management command for importing an existing Ganeti instanceinto Synnefo. The owner, flavor and image are specified by command linearguments. Importing will fail if the instance has NICs connected to...
Fix HTTP code when adding NIC to inactive network
Add --filter-by option to *-list commands
Add --filter-by option to server-list, network-list and flavor-listmanagement commands. The value of this option is a comma-seperated listof key 'cond' val pairs and, when used, only the DB entries that satisfy all of...
Sort all API list_* responses
Use the per-user network limit setting
Refactor code in management commands
Improve management commands
Enrich servers-list to list only suspended servers
add new option `--suspended` in servers-list command to filter output suspendedservers
Merge branch 'master' into devel-0.12
Conflicts: snf-cyclades-app/synnefo/api/management/commands/flavor-list.py snf-cyclades-app/synnefo/api/management/commands/server-list.py snf-cyclades-app/synnefo/api/networks.py snf-cyclades-app/synnefo/logic/rapi.py
Import snf-manage network-modify command
Add extra support for changing link and mac_prefix. Also supportreserving and releasing IPs.
Forbid creation of non enabled networks
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.
Search for jobs if server does not exist
PUBLIC_ROUTED minor changes
Do not allow api to create public networks and type otherthan PRIVATE_MAC_FILTERED/PRIVATE_PHYSICAL_VLAN.
Rename PUBLIC_ROUTED_USE_POOL setting to PUBLIC_USE_POOL.
Let synnefo do IP pool management only if network is private or...
Fix HTTP response code when refusing action
Return Forbidden(403) instead of Unauthorized(401) when refusing arequested action, because the VM is suspended or the resource is public.Unauthorized should be used only when authentication is required and has...
Order output of *-list management commands by id
Implement image-list and image-show commands
Implement two new management commands for plankton.- image-list: lists public images or all images availableto a user- image-show: displays information about a public image
Also, this commit fixes a bug in server-show, when trying...
Return the VM!
Display VM build percentage in management commands
Allow custom link, mac_prefix in network-create
Add extra command line arguments, to allow the user specify thelink and mac_prefix of the new network if needed.
Implement server-create management command
Introduce per-user allocation of VMs to backends
Add BACKEND_PER_USER setting, a mapping from users to backends. This settingcan by used in order to bypass the default backend allocation process, andallocate all the new VMs of a specific user to a specific Backend.
Do not allow any API action on suspended VMs
Do not allow any modification of any administratively suspended VM through theAPI.
Merge branch 'ui-0.11' into devel-0.12
Include deleted networks in get_flavor_info
Do not allow actions to deleted networks
Return ServiceUnavailable when pools are depleted
Return ServiceUnavailable, instead of OverLimit, when pools of bridges,mac-prefixes or IPs run out of resources.
Make management commands list non-deleted entries
Modify snf-manage {server, network, flavor}-list to list by default onlynon-deleted entries. The `--deleted` flag can be used to also includedeleted ones.
Merge branch 'devel-0.12' into ui-0.11
Cache images in server-list
Use cache in order to speed-up the output of server-list
Reverse --deleted option in server-list
Handle every exception in manually transactions
Fix typo
Do not give IPs to networks without dhcp
Block create instance api call with deleted flavor
Do not allow creation of instances with deleted flavorsRefs #2481
Fix GET networks API response for public networks
Log 5xx API faults
Improve exception message when no backends
Catch OverLimit error in network create
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 when not using pool for public networks
Change logging levels
Add extra logging
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)...
Merge branch 'public_networks' into devel-0.11
Conflicts: snf-cyclades-app/synnefo/logic/dispatcher.py
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 race conditions when updating network objects
Use for_update() object manager in order to exclude race conditionswhen updating network objects.
Rename Cyclades management commands for uniformity
Rename Cyclades management commands for uniformity.
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....
Catch error in removing nic
Unique mac-prefix only for mac-filtered networks
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 snf-manage network-remove
Wrap network-create command in transaction
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....
Allow connecting a VM to a network only if active
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
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.
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.
Api changes, additions for vm diagnostics
- Change /servers/detail to include the last diagnostic message for each vm in the api response.- Add new /<vm_id>/diagnostics api endpoint which returns the list of the specified virtual machine diagnostic messages.
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.
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.
Fix bug in creating network
Exclude deleted networks.
Limit allowed private networks per user
Store action when creating a network
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...
Limit allowed network size
Limit the size of networks that users can create, since big IPpools can have negative impact on performance. Allowed networksize is controled by 'MAX_CIDR_BLOCK' setting.
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...
Add transaction control to API methods
Specially for create_instance and create_network methods, since aVirtualMachine, Network object is created before sending the requestto the backend.
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
Filter deleted entries when changes-since is used
Modify list_networks and list_servers to filter deleted entries whenif-modified-since HTTP header is used, because deleted entries can beupdated after deletion through the reconciliation mechanism.