cyclades: Command to export Cyclades statistics
Add new 'snf-manage stats-cyclades' management command to export basicstatistics about Cyclades, like number of servers, network and resourceutilization. The command can either export the statistics either in JSON...
cyclades: Export Cyclades detailed stats from API
Add '/admin/stats/detail' API endpoint to export basic statistics aboutCyclades. Access to this view is only allowed to the users that belongto specific Astakos groups, as specified in the new setting'ADMIN_STATS_PERMITTED_GROUPS.' Also, added the new 'user_in_groups' API...
cyclades: Fix bugs relative with quotas
gtools: Fix Ganeti allocation parameters
When retrying a failed job, remove 'pnode' and 'snode' fields if theywere implicitly set by Ganeti iallocator. Ganeti will fail if bothiallocator and node are specified in the job.
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.
cyclades: Resolve undecided serial in force mode
Reject a serial with pending=True only when we need to force a newcommission on a given resource.
Also improve handling of serial state: make sure pending is set to Falsewhen we decide whether to accept or reject a serial. Mark a serial to...
cyclades: Pass action params in server_command
Commission to be issued depends on extra parameters for some actions,e.g., on the flavor when resizing a vm.
cyclades: Allow deletion of ports from public nets
Move check about deleting a port from a public network. This check isonly enforced in the API, but is allowed in logic layer, e.g. snf-managecommands.
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: Update disk_templates if empty
Make backend_allocator to refresh the available disk templates of abackend if there are empty.
cyclades: Check drained only if not destroying
Check drained flag only if network actions is not destroy. When networkis being destroyed the network is automatically marked as drained toexclude it from IP allocations.
cyclades: Check for all finalized states
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: Fix some broking tests
cyclades: Fix a bug in network and subnet create
cyclades: Add a new function in logic/subnets.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 compatibility issues with networks
From version 2.7, Ganeti returns the network's UUID field in nics'networks' attribute. Instead use 'networks.names' attribute to getthe network name.
cyclades: fix typo in snf-dispatcher
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: Small fixes to network reconciliation
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...
gtools: Fix compatibility issues with ganeti-2.7
cyclades: Fix bug in network reconciliation
Skip reconciliation for a network that does not exist in the DB, ifreconciliation is running without the '--fix' option.
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: Simplify code to 'logic.subnets' module
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: Handle 'drained' flag of networks
cyclades: Fix corner case in reconciliation
If at the end of reconciliation the state of the network is not ACTIVE,try to recompute the state of the network based on the state of thenetworks in each backend. This step is mostly needed in case that thenetwork does not exist in any backend.
cyclades: Fix reconciliation of floating IP pools
Remove special handling of floating IP pools in reconciliationmechanism since floating IP pools are treated the same way with othernetworks.
cyclades: Pass 'nfdhcp' tag to IPv6 networks
Pass 'nfdhcp' tag even if network is IPv6 only.
cyclades: Optimize *-list commands
Use prefetch_related and select-related to importive the DB queries thatare generated by *-list snf-manage commands.
cyclades: Code refactoring to backend module
cyclades: Fix init of networks in backend-add
Fix which networks are going to be initialized in the new backend andhow the are printed in the output!
cyclades: Fix network-create management command
Fix when network is created in the Ganeti backends. The network must becreated in the Ganeti backends only after IPv4 or/and IPv6 subnet hasbeen created. This commit moves the code that created the network in the...
cyclades: Fix bugs in subnets and ports
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: Merge subnet-create with network-create
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: Add missing 'ips' module
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: 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: 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: Add snf-manage subnet-inspect
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: Reconcile pools only for IPv4+dhcp subs
Perform IP pools reconciliation only for networks with an IPv4 subnetthat has enabled the dhcp option.
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: Fix bug in floating-ip-list
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: PEP8 Fix
cyclades: Fix bug in port-create
Check if floating-ip belongs to the given network
cyclades: Common code for creating ports
Merge code for creating ports that was duplicated between'logic.servers' and 'logic.ports' modules.
cyclades: Various refactors in subnets
cyclades: Fix stale references to moved function
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: Common module for pretty-printing
Create common module for pretty-printing database objects. Currently itcontains only functions for pretty-printing networks and ports.
cyclades: Make tests work with multiple IP pools
Refactor tests so that they are aware that a network can have multipleIP pools. Also, add extra check to PoolManager methods in order to checkwhether a value is contained in the pool.
cyclades: Various fixes to networks/subnets/pools
cyclades: Fix reconciliation for network and pools
cyclades: Small bug fixes in logic/subnets.py
cyclades: Update docstrings, remove old functions
cyclades: Fix some bugs in subnets
snf-cyclades-app: Use the new AstakosClient
Change AstakosClient to use ASTAKOS_AUTH_URL as entry point to theAstakos service, instead of ASTAKOS_BASE_URL it was using until now.
Remove ASTAKOS_BASE_URL from Cyclades settings, replace it withASTAKOS_AUTH_URL. Modify Cyclades to determine ASTAKOS_ACCOUNT_URL and...
cyclades: Remove stale references to vm.router
cyclades: Fix output of network-inspect command
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.
cyclades: Set external_router for public networks
Set 'external_router' attribute of created networks to True, if anetwork is a public network.
cyclades: Use existing IP when creating port
Extend port creation with the option to use an existing IPAddress. Thiswill be used to create a port with an existing Floating IP. Also, extendport-creata management command with the '--floating-ip' option.
cyclades: Fixes to port-create command
Verbal and code-style fixes to port-create command.
cyclades: PEP8 fix
cyclades: Fix snf-manage floating-ip-list
A minor fix to the snf-manage floating-ip-list command to complyto the new models
cyclades: snf-manage floating-ip-attach
snf-manage floating-ip-attach <address> --machine <server_id/router_id>
cyclades: Bug fixes in subnets
cyclades: move subnets.py from api to logic
Move api/subnets.py to logic/subnets.py, for further code refactoring
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 network inspect management command
cyclades: Add backend code to Ports API/logic
Add backend code to create and remove ports from Ganeti backends. Alsoadd some imporovements and fixes to logic, API code and managementcommands.
cyclades: Fix bug when creating networks
Resolve some undefined names
Add missing imports; remove call to sqlite3_changes; set key and valin render_meta.
cyclades: Add snf-manage port-remove command
cyclades: Add logic ports.py
Created a new file for ports in logic directory. This will havethe code about port manipulation in the backend. For now it is justused for db filling.Use the new function 'create' in the ports API.
cyclades: Refactor backend code for new networks
cyclades: Create IPv4 pool when creating network
Create IPv4 address pool when creating the network. This is a temporarycommit to make logic network work, since subnet and pool creation mustbe moved out of the network creation part.
cyclades: Add method to get ip stats to network
Extend Network model with a method to get the number of free and totalIPv4 addresses of the network. Also, add method to IPAddress model torelease its IPv4 address if any. Finally, update backend-list management...
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...