History | View | Annotate | Download (33.4 kB)
cyclades: Various fixes for volumes and snapshots
cyclades: Fix typo
cyclades: Only IPv4 addresses in port forwarding
Fix bug that caused calling of port forwarding setting with IPv6addresses.
snf_django: Change error status code if request method is not valid
Return 405 (NotAllowed) instead of 400 (BadRequest)Add Allow header in the response containing the list of valid methods
Encrypt instance ids in the stats URLs
cyclades: Change behaviour of servers fqdn
Change behaviour of 'CYCLADES_SERVERS_FQDN' setting: * If this setting is set to 'None', do not fall back to the public IP address of the machine. * Return the value of the setting even if the machine has no public...
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: 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: 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: 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: Optimize DB queries of /servers API
Use 'prefetch_related' attribute of Django queryset to prefetch theNetworkInterface and IPaddress objects that are related with aVirtualMachine object. Also, modify functions that operate on serverNICs and IPs, to to use only the prefetched objects, which means that...
cyclades: Make API server 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: 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: Change format of 'attachment' attribute
Change the format of the 'attachment' attribute. Until now, eachattachment had an identifier of the form 'nic-$vm_id-$nic_id'. Thiscommit changes the identifier to just '$nic_id', since from now onis unique for the lifetime of a NIC.
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.
Request Django=>1.4, <1.5
Drop support for Django 1.2. Remove compatibility code that were used inorder to support Django 1.2 and 1.4. Finally update django documentationlink in the docs.
Merge branch 'hotfix-0.14.8' into develop
Merge hotfix-0.14.8 which ports Synnefo to wheezy and Django 1.4.5
Conflicts: ci/ci_squeeze.conf ci/ci_wheezy.conf ci/schemas/one_node_squeeze/packages.conf ci/schemas/one_node_squeeze/squeeze.conf ci/schemas/one_node_squeeze/wheezy.conf...
wheezy: urls module doesn't export defaults
cyclades: Add missing commit_on_success decorator
cyclades: Mock vm removal if creation fails
In case creating a VM fails before the OP_INSTANCE_CREATE job isenqueued in Ganeti, the VM and its NICs must be deleted, and theresources must be released from Quotaholder, which is exactly what isdone when a VM is deleted from Ganeti. Instead of duplicating the code,...
cyclades: Fix bug during server creation
Commit #32a0b85, modified server creation, by refetching the object fromDB after issuing commission to quotaholder. However, the new object isnot having the 'config_url' attributed, which is added to the vm object...
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: Make index field of NIC optional
Change 'index' field of NIC model to be optional, because the index ofbuilding NICs is unknown. Also, change all API responses to return onlythe active NICs.
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: extend VM info with 'port_forwarding'
Extend servers info API response with 'SNF:port_forwarding' attribute,describing port fowarding rules (DNAT) that are applied to vms. Thedescription of such rules is done via the new CYCLADES_PORT_FORWARDING...
cyclades: Extend servers info with fqdn attribute
Extend the servers info API response with the 'SNF:fqdn' attribute,containg the vm's domain name in a DNS. This attribue is configurable bythe 'CYCLADES_SERVERS_FQDN' setting. If this setting is set to None,...
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: Simple code refactoring
cyclades: Common filtering based on changes-since
Add 'filter_modified_since' function in snf_django api utils, forparsing 'changes-since' HTTP parameter and filter the DB objects thatare updated after that date. Otherwise the deleted objects are returned.
cyclades: Export OS-EXT-IPS:type for floating IPs.
Cyclades API should return "floating" for the OS-EXT-IPS:type attribute.
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: Separate logic for networks from API
Remove code handling networks from network API views to logic.networks
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: 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: 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: api_method_not_allowed typo's
cyclades: Add 'links' to compute endpoints
Add 'links' attribute to API responses for servers, networks, flavorsand images endpoints.
cyclades: Add 'user_id' and 'tenant_id' to API
Add 'user_id' to API responses, and add a dummy 'tenant_id' to be equalwith the 'user_id'. Also always include metadata.
cyclades: Add 'addresses' to servers API response
cyclades: Make servers response compatible with OS
cyclades: Pass disk origin for all 'ext' flavors
cyclades: Rename meta to metadata at Cyclades URLs
For compatibility with OpenStack Compute API v2, rename 'meta' to'metadata' to Cyclades API URLs. Specifically, to the following ones:
cyclades: Remove "values" term from API
For compatibility with OpenStack Compute API v2, we remove theterm 'values' from all JSON requests and responses.
Refs #3768
cyclades: Remove 'Ref' suffix from servers API
Rename 'flavorRef' to 'flavor' and 'imageRef' to 'image', to responses of/servers API. 'flavorRef' and 'imageRef' are still preserved to to requestparameters of POST /servers.
cyclades: Always add attachments to server info
Update /servers API, to include attachments to /servers responses,even if the server has no NICs.
cyclades: Move common code to seperate function
Move common between API method and management command for creating aserver to a separate function.
cyclades: Fix typo in comment
Merge branch 'feature-quotas' into develop
Conflicts: docs/dev-guide.rst
Merge branch 'feature-api-docs' into develop
Minor Conflict: docs/cyclades-api-guide.rst
cyclades: refactor code relative to commission
Refactor Cyclades code that handles commissioning with Quotaholder. Thiscommit removes the 'uses_commission' decorator. Instead it introducesthe 'issue_and_accept_commission' function that is responsible for...
Restore quotas if enqueuing job to Ganeti fails
When creating a server, we commit the VM model in DB and reserve thecorresponding quotas in Quotaholder before enqueuing theOP_INSTANCE_CREATE job (because messages from dispatcher may arrivebefore committing). In case enqueuing job to Ganeti fails we must...
cyclades: Fix typo in create_server
State of public NIC should be 'BUILDING'
Cyclades: reserve public IP after commission
When creating a server, do not reserve a public IP address beforeissuing commission to quotaholder. This bug resulted in unsynchronizedIP pools between Cyclades and Ganeti, and needed externalreconciliation to synchronize them....
Merge branch 'develop' into feature-api-docs
Add Server Create documentation
Remove VM/Network DeletedError and BuildingError
Handle these errors explicitly in the code instead of the "api_method" decorator.
Use common 'api_method' decorator to cyclades api
Update Cyclades API methods to use the new common 'api_method'decorator. Also, update all the relevant tests.
Move cloud faults to 'snf_django.lib.api.faults'
Gather all faults from all synnefo projects into common'snf_django.lib.api.faults'.
Create public NIC when creating VM
Until now, a server's public NetworkInterface was not created in the DBuntil the arrival of the message from Ganeti hooks. However, the IPv4address of the NIC is reserved before sending the OP_INSTANCE_CREATEjob to Ganeti....
pep8 fixes
Fix transaction handling when creating server
Better handling of transactions when creating a server. Commit thecreation of VM in DB, before enqueuing the job to the Ganeti backend.If communication with Ganeti fails, then the VM is deleted from the DB....
Fix image 'backend_id' for archipelago
Archipelago needs as disk origin, the hashmap of the imageinstead of its url in the backend.
Fix handling of firewallProfile action
Refs #3097
Fix variable scope
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 bugs from merging
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
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.
Sort all API list_* responses
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
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.
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...
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
Return ServiceUnavailable when pools are depleted
Return ServiceUnavailable, instead of OverLimit, when pools of bridges,mac-prefixes or IPs run out of resources.
Merge branch 'devel-0.12' into ui-0.11
Handle every exception in manually transactions
Improve exception message when no backends
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)...
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....
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...