History | View | Annotate | Download (24.8 kB)
cyclades: Handle 'drained' flag of networks
Cyclades: Rename 'Can not' to 'Cannot' to all msgs
cyclades: Do not allow any action on 'ERROR' vms
Do not allow any action, other than 'DESTROY' in servers that are in'ERROR' state. If the server is in 'ERROR' state then the correspondingGaneti instance may not exist, so all actions will fail.
cyclades: Fix default/forced server networking
Fix the default behaviour for networking of servers that are beingcreated. There are two settings controlling this behaviour:
cyclades: Refactor code
Move code relative with allocating ips and floating IPs to 'logic.ips'module.
cyclades: Forbid new ports no deleting network
Do not allow creation of new ports and reservation of floating IPs onnetwork that are being deleted. Currently the state of the networkchanges only when the network gets deleted from all backends. So wecheck if a network is being deleted by checking if the action of the...
cyclades: Create server in public net with FIP
Remove 'floating_ips' extension attribute to POST /servers API call.Instead use the 'fixed_ip' attribute of 'networks' attribute to specifythe IPv4 address of a floating IP. So in order to create a serverconnected to a private network and a public network, the 'networks'...
cyclades: Fix permissions when looking up ports
Look up of ports should check the port userid and not the networkuserid.
cyclades: Create server with existing ports
Extend POST /servers API call to support creation of servers that willbe using existing ports. Networking of the instance is defined via the'networks' attribute which can contain either network UUIDs or portUUIDs. In case of network UUIDs, the user can also request for a...
cyclades: Fix double double creation of IP log
The port creation command called 'associate_port_with_machine' functionin order to associate the port with the machine and create anIPAddressLog entry. However, this is already done by the connectfunction which sends the job in the Ganeti backend. This resulted in...
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: Common code for creating ports
Merge code for creating ports that was duplicated between'logic.servers' and 'logic.ports' modules.
cyclades: Rename Port state from BUILDING to BUILD
Neutron API defines the 'BUILD' status. This commit renames BUILDING state of NIC to BUILD.
cyclades: Remove stale references to vm.router
cyclades: PEP8 fix
cyclades: snf-manage floating-ip-attach
snf-manage floating-ip-attach <address> --machine <server_id/router_id>
cyclades: Refactor code for allocating IPs
Refactor code that was used for allocating IP addresses and creatingNetworkInterfaces. The new code is more suitable to the new DB schemawhere each network may have many IPv4 subnets and each subnet mayhave many IP pools. Also, the new functions are using prefetch related...
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: 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: Add 'ip_type' attribute to NIC
Extend NetworkInterface model with the 'ip_type' attribute to showwhether the IP is a floating or fixed.
Signed-off-by: Christos Stavrakakis <cstavr@grnet.gr>
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...
cyclades: Refactor code for renaming a server
Created function for renaming a server.
cyclades: Return the newest vm object upon creation
The server_command decorator commits the just created object and retrievesit back from the database. Return the latter, because the former is stalein memory.
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: Handle errors during vm creation
Commit #f2080d1 mocked an OP_INSTANCE_REMOVE when enqueuing anOP_INSTANCE_CREATE job to Ganeti failed. However, this may result inreleasing IPs that may get reserved in Ganeti, because we can neverreally know if the job has reached Ganeti or not (e.g. timeout). For...
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...
cyclades: Apply old commits to moved files
Code from file 'api/servers.py' has been moved to 'logic/servers.py'.During the merge of hotfix-0.14.6 the develop, this code was lost. Thiscommit applies commits #f2080d1, #ea9b0fb, #32a0b85 to the new file.
cyclades: Store action to the VM
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: Add check for net action with no hotplug
In case hotplug is disabled, via GANETI_USE_HOTPLUG setting, networkactions should be allowed only on STOPPED vms. This commit adds thischeck and a unittest for this case. Also it makes some other checks...
cyclades: Import settings from django.conf
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: 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...
cyclades: Fix typo bug in management command
cyclades: Fix wrong unit of ram
cyclades: Rename "public" to "SNF:ANY_PUBLIC"
Rename reserved work for automatically choosing a public network from"public" to "SNF:ANY_PUBLIC". Also add the setting description to conffiles.
cyclades: Remove PUBLIC_USE_POOL setting
Remove PUBLIC_USE_POOL setting, since in order to use floating IPs, thecyclades must be responsible for managing all IP pools.
cyclades: Choose floating-ips when creating server
Extend POST /servers API call, to take an optional attribute'floating_ips', which is a list of floating IP addresses. The serverwill have one NIC for each of this addresses after the'DEFAULT_INSTANCE_NETWORKS' and before any private networks that the...
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: Check if network exists in backend
Raise 503 if a user tries to add a floating IP to a VM that resides in aGaneti backend that the coressponding network does not exist.
cyclades: Support many NICs when creating vms
Support arbitraty number of NICs when creating Ganeti instances.
cyclades: Extend /servers with floating IP actions
Extend '/servers/action' API endpoint, to support 'addFloatingIP'and 'removeFloatingIP' actions.
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: Handle 'EmptyPool' in util method
Refactor cyclades code to handle 'EmptyPool' exception in'get_network_free_address' function.