History | View | Annotate | Download (41.4 kB)
cyclades: Map reboot type to shutdown timeout
Fix handling of reboot type option. If 'hard' reboot type is specifiedthis is mapped to zero shutdown timeout of OP_INSTANCE_REBOOT Ganetijob. This is only supported from Ganeti>=2.10 and snf-ganeti. In other...
cyclades: Fix removal of stale NICs in BUILD state
Until now, NICs that did not exist in the Ganeti backend and were inBUILD state were removed after a timeout (BUILDING_NIC_TIMEOUT). Thiswas dangerous, because if an OP_INSTANCE_CONNECT job had been "stuck"...
cyclades: Fix bugs relative with quotas
cyclades: Generalize issue_and_accept_commission
Use issue_and_accept_commission for any action where one needs toautomatically accept the commission after issuing and committing.
cyclades: Issue commission based on action
Make issue_commission() the single point where provisions are computedand the appropriate astakosclient call is issued.
Merge branch 'hotfix-0.14.10' into develop
Conflicts: Changelog snf-cyclades-app/synnefo/api/servers.py snf-cyclades-app/synnefo/logic/backend.py snf-cyclades-app/synnefo/logic/callbacks.py snf-cyclades-app/synnefo/logic/management/commands/reconcile-networks.py...
cyclades: Handle snf-ganeti bug
Create IPv6 only networks as /29 because snf-ganeti can not create /30networks.
Merge branch 'feature-cyclades-networks' into develop
Conflicts: snf-cyclades-app/synnefo/api/management/commands/server-inspect.py snf-cyclades-app/synnefo/app_settings/urls.py snf-cyclades-app/synnefo/logic/backend.py snf-cyclades-app/synnefo/logic/backend_allocator.py...
cyclades: Retry failed instance creation
Handle special case where an OP_INSTANCE_CREATE job which uses theopportunistic locking feature fails. This failure is probably due to thefact that all nodes may be already locked. In this case, makesnf-dispatcher retry the failed job with opportunistic locking turned...
cyclades: Fix case where 'dfree' is None
If Ganeti has not enabled 'plain' or 'drbd' disk template, then itreports 'dfree' as None. Fix this corner case by treating None as 0.
cyclades: New style format for modifying a NIC
Signed-off-by: Dimitris Aragiorgis <dimara@grnet.gr>
cyclades: Remove hotplug from InstanceCreate
cyclades: Pass network type info as network tag
cyclades: Remove deprecated network type in ganeti
cyclades: Use opportunistic locking
Use opportunistic locking, introduced in Ganeti 2.7, to allow parallel creationof VMs in the Ganeti backend. When this option is set, Ganeti iallocatorwill allocate the VM only to nodes that not locked (e.g. by other VM...
Merge branch 'master' into develop
Conflicts: Changelog astakosclient/astakosclient/keypath.py ci/utils.py docs/admin-guide.rst snf-astakos-app/astakos/im/cookie.py snf-astakos-app/astakos/im/functions.py snf-astakos-app/astakos/im/quotas.py snf-astakos-app/astakos/im/views/projects.py...
cyclades: Do not print IP pool for IPv6 only nets
Do not print IP pool of Ganeti network in case the network is an IPv6only network. The Ganeti network has a dummy IPv5 subnet, just becauseit is needed. Only change this dummy subnet to /30 to reduce space in...
cyclades: Pass 'nfdhcp' tag to IPv6 networks
Pass 'nfdhcp' tag even if network is IPv6 only.
cyclades: Code refactoring to backend module
cyclades: Create IPv6 Addresses from dispatcher
When ports are created from the API they do not have an IPv6 address.The IPv6 address is only available after the MAC address of theNIC is known which is only available after the message from theGaneti backend has been received. However, dispatcher did not created...
Cyclades: Rename 'Can not' to 'Cannot' to all msgs
cyclades: Refactor code
Move code relative with allocating ips and floating IPs to 'logic.ips'module.
cyclades: Workaround for race condition in Ganeti
Workaround for race where OP_INSTANCE_REMOVE starts executing on Ganetibefore OP_INSTANCE_CREATE. If this is the case, OP_INSTANCE_REMOVE willnot wait for locks, instead it will fail because the instance has not...
cyclades: Series of fixes regarding networks & ips
cyclades: Delete backend networks with network
Delete backend network when network is deleted (marked as deleted=True)in DB. Backend networks are useless as history and they may be recreatedif needed. Also fix some tests.
cyclades: Create ports without 'device_id'
Allow creation of ports that are not connected to any instance. Suchports will be in 'DOWN' state. To allow this, 'machine' attribute ofNetworkInterface model has been made to allow null values. Finally, the'logic.ports' module has been remove, and the corresponding code has...
cyclades: Add accounting for IP Addresses
Create IPAddressLog DB table to hold information about allocation of IPaddresses to virtual servers. The information that is currently savedcontains the IP address, the ID of the virtual server, the ID of thevirtual network along with the datetime that the address has been...
cyclades: Update state of NICs if VM creation fail
Set the state of NICs(ports) to ERROR if the OP_INSTANCE_CREATE jobfails.
cyclades: Rename Port state from BUILDING to BUILD
Neutron API defines the 'BUILD' status. This commit renames BUILDING state of NIC to BUILD.
cyclades: Create network in backend if missing
Automatically create a network in a Ganeti backend if missing.Currently, this was done only for private networks. This commit changesthis to be done for any kind of networks.
Revert "cyclades: Fix bug when deleting instances"
This reverts commit 8331c929facc5849b98e0fb945d047a4f4504b3a. Beforethis commit is applied we must extend DeleteInstance method ofGanetiRAPIClient to support the 'depends' attribute.
cyclades: Fix bug when deleting instances
If OP_INSTANCE_REMOVE runs before OP_INSTANCE_CREATE the job will fail.Dispatcher will ask Ganeti if the instance exists, and if not it willrelease it's IPv4 address. However the instance may not exist because it...
cyclades: Fix bug when creating networks
cyclades: Refactor backend code for new networks
cyclades: Fix code for networks logic and API
cyclades: Make logic tests pass
Refactor Cyclades code so that it follows the new models for Networks,Subnets and IPAddresses. This refactor is not complete. Instead is thenecessary refactor for making tests for server API calls succeed.
cyclades: Make API server tests pass
cyclades: Replace FloatingIP with IPAddress
This commit just replaces all references to FloatingIP objects withreferences to IPAddress object, in order to be able to just load thecode. But the code is left unchanged, so all tests will fail.
cyclades: Include 'index' when comparing NICs
cyclades: Clear FloatingIP when deleting NIC
Override 'delete' method of NetworkInterface model, to clear the'machine' flag of the corresponding NIC, if any.
cyclades: Ignore Ganeti NICs with unknown ID
Do not process Ganeti NICs that do not have a valid ID and so areunknown to Cyclades, because processing these NICs would require tocreate them in DB and then rename them in Ganeti with the correspondingidentifier....
cyclades: Use NIC UUID in firewall tags
Use NICs UUID instead of index to generate firewall tags. Make the'set_firewall_profile' action to take the NICs ID as argument. Also,update the firewall settings.
cyclades: Use UUIDs to update VM NICs
Callback functions of snf-dispatcher updated the NICs of a VM bydeleting all NICs from DB, and creating the new NICs that were describedin the message. However, since NICs have UUIDs, this is no longerrequired. This commit update callbacks to update the NICs based on their...
gtools: Make eventd send job fields
Make snf-ganeti-eventd send 'job_fields' for instance and networkopcodes, and modify the corresponding backend functions andsnf-dispatcher callbacks.
cyclades: Fix getting action from Ganeti opcode
Parse the fields of the Ganeti command, to distinquish between'CONNECT' and 'DISCONNECT' in case of 'OP_INSTANCE_SET_PARAMS'.
cyclades: Make reconciliation timeouts constants
Remove hard-coded timeouts from code and make them constants. Also donot perform reconciliation for recent building NICs.
cyclades: Use NIC uuid when deleting NIC
cyclades: Use Ganeti NIC UUIDs
Since Ganeti 2.8, it is supported to refer to devices (NICs and Disks)not only by their index but also by their name or UUID. This commitupdates Synnefo to refer to devices by their name. Synnefo will set thename of the devices which will be a UUID. We do not use Ganeti's UUIDs...
Use opportunistic locking
Use opportunistic locking, introduced in Ganeti 2.7, to allow parallel creationof VMs in the Ganeti backend. When this option is set, Ganeti iallocatorwill allocate the VM only to nodes that not locked (e.g. by other VMcreation). This may result in unbalanced clusters, but `hbal` can be...
Remove deprecated network type in ganeti
Pass network type info in tags during create
Remove hotplug from InstanceCreate
New style format for modifying a NIC
cyclades: Do not release externally reserved IPs
Do not automatically release an externally reserved IP if it is releasedfrom a Ganeti backend. The IP should be released with snf-managenetwork-modify management commands.
cyclades: Make disk_templates work with Ganeti<2.8
'enabled_disk_templates' cluster attribute has been added in Ganeti 2.8.If this attribute is missing, return the ipolicy disk templates.
cyclades: Refactor backend-update-status cmd
The command has been changed to no longer take any arguments or options.Instead, this command always updates the resources and the enabled disktemplates of all online Ganeti backends.
cyclades: Fix wrong quotas when creating server
Catch exception when talking to Ganeti inside 'server_command',otherwise the pending commission will be rejected. Also, accept thecommission in case of build, because the VM will be created in DB.
cyclades: Helper function for commissioning
Create 'quotas.handle_resource_commission' function for handlingcommissions for VMs and Networks.
cyclades: refactor server creation command
Split the server creation command in more steps in order to bedecorated with the 'server_command' function and follow the logic of allother server commands. The main change is that the commission job is notaccepted when the VM is stored in DB, but when the OP_INSTANCE_CREATE...
Merge branch 'hotfix-0.14.6' into develop
Conflicts: Changelog docs/admin-guide.rst snf-cyclades-app/synnefo/api/management/commands/network-remove.py snf-cyclades-app/synnefo/api/servers.py snf-cyclades-app/synnefo/api/tests/servers.py snf-cyclades-app/synnefo/logic/backend.py...
cyclades: Simplify code
Simplify code by removing unnecessary temp variable.
cyclades: Do not release resources if already deleted
Ensure that a commission to release vm resources is issued only once.If a vm is marked `deleted', then resources must have already beenreleased.
cyclades: Do not save stale objects after a commit
Call to issue_and_accept_commission saves the resource object (eg a vm)and commits the transaction. This has the side-effect that the resourceobject becomes stale: its lock is released and another thread may acquire...
cyclades: Update NICs even if job failed
Make snf-ganeti-eventd send the NICs of the instance not only onsuccess, but also if the job has failed or has been canceled. Also,update snf-dispatcher to handle those messages. This step is required toclear BUILDING NICs that fail.
cyclades: Create NIC before send job to Ganeti
Create NICs in building state before enqueuing corresponding jobs toGaneti. This has already been done when creating the instance, but notwhen connecting it to other networks.
cyclades: Fix bug in snf-dispatcher logic
This commit reverts commits #07602322 and #30514662 which introduced abug in dispatcher's logic. These commit fixed the issue that, in a casethe Cyclades DB is unsynced with Ganeti, a resource that does not exist...
cyclades: Fix bug in handling of reboot type.
'type' attribute of reboot OS API call was directly mapped to the'reboot_type' option of Ganeti reboot job. However these two aresemantically different. The 'SOFT' and 'HARD' reboot types of OS API aremapped to 'shutdown_timeout' option of Ganeti jobs. However, setting...
cyclades: Do not pass 'hotplug' if disabled
Fix passing of hotplug argument to GanetiRAPIClient, in case theGANETI_USE_HOTPLUG is unset. If the Ganeti version does not supporthotplug, passing hotplug=False, will make the jobs fail at Ganeti opcodevalidation. This commit fixes this by passing the argument, only when...
cyclades: Fix check for firewall profile
cyclades: Remove firewall tag when removing NIC
Remove firewall tag from ganeti instance when disconnecting them fromnetworks. Until now, this was not needed because a vm could not bedisconnected from public networks. Since floating IPs, a vm may bedynamically be connected and disconnected to public networks, and so a...
cyclades: Add 'name' to all commissions.
Make all quotaholder commissions to have a name. Since, Cyclades doesnot store the association of a commission with a resource, we includethe resource in the commission name.
cyclades: Set firewall profile per NIC
Set firewall profile per NIC, because since Floating IPs an instance canhave more than one NICs in a public network. Extend the API call to takethe NIC index as argument, and modify the Ganeti instance tags to beformated with the NIC index.
cyclades-rapi: Add bulk option to GetJobs
cyclades: Simple code refactoring
cyclades: Support IPv6 only networks
Make Cyclades support IPv6 only networks. Such networks will havethe 'subnet' attribute set to None, in the same way that IPv4 onlynetworks have the 'subnet6' attribute set to None.
Because currently Ganeti does not support IPv6 only networks, we create the...
Merge branch 'hotfix-0.14.2' into develop
Conflicts: Changelog snf-astakos-app/astakos/im/messages.py snf-astakos-app/astakos/im/views/target/__init__.py snf-cyclades-app/synnefo/logic/backend.py snf-cyclades-app/synnefo/logic/management/commands/reconcile-servers.py...
cyclades: Fix corner case in snf-dispatcher
Same as commit 0514662, but for servers.
cyclades: Fix type error
Create network may return a list of job IDs.
Delete network from DB when job fails but the action of network isDESTROY. This case appears when someone tries to remove a network thathas been deleted from Ganeti backend, but not yet from DB.
cyclades: Fix exception message
Fix exception message when trying to connect an instance to a non-activepublic network.
cyclades: Wrap diagnostic creation in transaction
Fix bug in snf-dispatcher causing wrong updates of VMs from ganeti.Creation if instance diagnostics must run inside a transaction, becauseotherwise, the lock of the vm (select_for_update) is released too early....
cyclades: Check if a NIC is a floating IP.
Extend NetworkInterface model with a property showing if the IPv4address of the NIC is a floating IP or not. Also, simplify somerelevant code.
cyclades: Various fixes regarding floating IPs
Fix some issues regarding floating ips introduced by rebasing branch.
cyclades: Add network policy at server create
Add 'DEFAULT_INSTANCE_NETWORKS' setting that can be used by theadministrator to define the list of networks that each server that iscreated must be connected to. Each created VM will have a NIC connectedto each of these networks. This settings can include a list of network...
cyclades: Do not release floating IPs
Update 'release_instance_nics' backend function which is called toprocess NIC modifications in the Ganeti backend, to not return aIPv4 address back to pool if this address is a floating IP.
cyclades: Support many NICs when creating vms
Support arbitraty number of NICs when creating Ganeti instances.
cyclades: Major refactor to api and logic apps
Major refactor to cyclades api and logic apps that removes most codefrom the api views and moves it to logic app, so that the same logiccode can be used by different apps (e.g. EC2 API). Code is moved into...
cyclades: Add backend function for resizing vm
Add 'resize_instance' backend function for resizing a vm. This commandissues an OP_INSTANCE_MODIFY job with the specified beparams, whichcurrently are vcpus, minmem and maxmem.
Refs #3870
cyclades: Handle Ganeti msgs for resized VMs
Handle 'OP_INSTANCE_SET_PARAMS' notifications from Ganeti that have'beparams' attribute, which corresponds to resized VMs. In suchcase, the corresponding flavor is found an the VM in DB is updated tohave this flavor....
cyclades: Fixes relative to reconciliation
Get available backends once and work only with them, since availablebackends may change during reconciliation. Also temporary remove supportfor communicating with each backend in a separate process.
Revert "cyclades: Speed up reconciliation"
This reverts commit cf2241c45a22dac71e31dbf32f4700c475804c12.
cyclades: Speed up reconciliation
Speed up reconciliation by using mulitprocessing to get in parallelthe instances from all Ganeti backends.
cyclades: Handle errors when using multiprocessing
Check the process exitcode to determine if a process finishedsuccessfully.
cyclades: Fix deadlock when creating servers
Fix deadlock between snf-dispatcher and backend allocator, by makingsnf-dispatcher take an exclusive lock to the backend which hosts the vm,before trying to get the exclusive locks to the IP pools in order to...
cyclades: Pass disk origin for all 'ext' flavors
cyclades: Sypport backends with Xen hypervisor
dispatcher: Handle NICs in callbacks.
Update 'update_db' callback to handle instance NICs together withinstance status.
Also update the relevant tests.
cyclades: simplify comparison of NICs