Statistics
| Branch: | Tag: | Revision:

root / snf-cyclades-app / synnefo / logic @ 91430ce0

# Date Author Comment
91430ce0 11/25/2013 01:13 pm Dionysis Grigoropoulos

cyclades: Better handling of deleted subnets

  • Fix a bug where snf-manage subnet-list printed deleted subnets too
  • Fix a query, that also returned deleted subnets
74267398 11/25/2013 11:33 am Christos Stavrakakis

cyclades: Add shutdown_timeout to RAPI client

Add missing 'shutdown_timeout' option to reboot, shutdown and destroy
methods of Ganeti RAPI client. The Ganeti RAPI daemon will ignore this
options until Ganeti 2.10.

51136096 11/25/2013 11:33 am Christos Stavrakakis

cyclades: Map reboot type to shutdown timeout

Fix handling of reboot type option. If 'hard' reboot type is specified
this is mapped to zero shutdown timeout of OP_INSTANCE_REBOOT Ganeti
job. This is only supported from Ganeti>=2.10 and snf-ganeti. In other...

edbc1d5a 11/23/2013 07:59 pm Christos Stavrakakis

cyclades: Remove duplicate constants

1cb7846c 11/23/2013 07:52 pm Christos Stavrakakis

cyclades: Fix removal of stale NICs in BUILD state

Until now, NICs that did not exist in the Ganeti backend and were in
BUILD state were removed after a timeout (BUILDING_NIC_TIMEOUT). This
was dangerous, because if an OP_INSTANCE_CONNECT job had been "stuck"...

d9f2a9e1 11/21/2013 01:28 pm Christos Stavrakakis

cyclades: Command to export Cyclades statistics

Add new 'snf-manage stats-cyclades' management command to export basic
statistics about Cyclades, like number of servers, network and resource
utilization. The command can either export the statistics either in JSON...

bda47e03 11/21/2013 01:28 pm Christos Stavrakakis

cyclades: Export Cyclades detailed stats from API

Add '/admin/stats/detail' API endpoint to export basic statistics about
Cyclades. Access to this view is only allowed to the users that belong
to specific Astakos groups, as specified in the new setting
'ADMIN_STATS_PERMITTED_GROUPS.' Also, added the new 'user_in_groups' API...

1fdd8d69 11/20/2013 08:08 pm Christos Stavrakakis

cyclades: Fix bugs relative with quotas

  • Reject previous unaccepted serials if action is 'DESTROY'. This is
    required because multiple DESTROY actions may be pending for the same
    resource (e.g. VM). The one who succeeds will be accepted, while all
    others will be rejected. This isn't optimal since it causes circular...
73517357 11/18/2013 12:48 pm Christos Stavrakakis

gtools: Fix Ganeti allocation parameters

When retrying a failed job, remove 'pnode' and 'snode' fields if they
were implicitly set by Ganeti iallocator. Ganeti will fail if both
iallocator and node are specified in the job.

368d879e 11/15/2013 01:38 pm Giorgos Korfiatis

cyclades: Generalize issue_and_accept_commission

Use issue_and_accept_commission for any action where one needs to
automatically accept the commission after issuing and committing.

16b959ce 11/15/2013 01:33 pm Giorgos Korfiatis

cyclades: Issue commission based on action

Make issue_commission() the single point where provisions are computed
and the appropriate astakosclient call is issued.

fb540e3a 11/15/2013 01:32 pm Giorgos Korfiatis

cyclades: Resolve undecided serial in force mode

Reject a serial with pending=True only when we need to force a new
commission on a given resource.

Also improve handling of serial state: make sure pending is set to False
when we decide whether to accept or reject a serial. Mark a serial to...

64bca363 11/15/2013 01:32 pm Giorgos Korfiatis

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.

6e73f499 11/14/2013 12:14 pm Christos Stavrakakis

cyclades: Allow deletion of ports from public nets

Move check about deleting a port from a public network. This check is
only enforced in the API, but is allowed in logic layer, e.g. snf-manage
commands.

3a09d155 11/13/2013 11:28 am Christos Stavrakakis

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...

c9e99213 11/13/2013 11:06 am Christos Stavrakakis

cyclades: Update disk_templates if empty

Make backend_allocator to refresh the available disk templates of a
backend if there are empty.

32b1ed4a 11/13/2013 09:44 am Christos Stavrakakis

cyclades: Check drained only if not destroying

Check drained flag only if network actions is not destroy. When network
is being destroyed the network is automatically marked as drained to
exclude it from IP allocations.

af1832fe 11/13/2013 09:18 am Christos Stavrakakis

cyclades: Check for all finalized states

c12627c7 11/12/2013 02:31 pm Christos Stavrakakis

cyclades: Handle snf-ganeti bug

Create IPv6 only networks as /29 because snf-ganeti can not create /30
networks.

a1dae38d 11/12/2013 01:34 pm Christos Stavrakakis

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...

ddffd973 11/12/2013 01:06 pm Christos Stavrakakis

cyclades: Fix some broking tests

44bd008a 11/11/2013 04:43 pm Dionysis Grigoropoulos

cyclades: Fix a bug in network and subnet create

  • Fix a bug if the user specified no allocation pools
  • Fix a wrong error message in logic/subnets.py
0d1f9117 11/11/2013 04:00 pm Dionysis Grigoropoulos

cyclades: Add a new function in logic/subnets.py

  • Add a function in logic/subnets.py that parses allocation pools
  • Add a new option in snf-manage network-create for allocation pools
  • Update subnet-create to use the new function
727fb2f9 11/11/2013 03:29 pm Christos Stavrakakis

cyclades: Retry failed instance creation

Handle special case where an OP_INSTANCE_CREATE job which uses the
opportunistic locking feature fails. This failure is probably due to the
fact that all nodes may be already locked. In this case, make
snf-dispatcher retry the failed job with opportunistic locking turned...

dee2e82c 11/11/2013 03:29 pm Christos Stavrakakis

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 get
the network name.

66932293 11/11/2013 03:29 pm Christos Stavrakakis

cyclades: fix typo in snf-dispatcher

0dd40027 11/11/2013 03:29 pm Christos Stavrakakis

cyclades: Fix case where 'dfree' is None

If Ganeti has not enabled 'plain' or 'drbd' disk template, then it
reports 'dfree' as None. Fix this corner case by treating None as 0.

2796f26a 11/11/2013 03:29 pm Christos Stavrakakis

cyclades: Small fixes to network reconciliation

  • Pass missing argument to function
  • Fix corner case where there are no externally reserved IPs.
4b052f94 11/11/2013 03:29 pm Dimitris Aragiorgis

cyclades: New style format for modifying a NIC

Signed-off-by: Dimitris Aragiorgis <>

9c7c6a57 11/11/2013 03:29 pm Dimitris Aragiorgis

cyclades: Remove hotplug from InstanceCreate

Signed-off-by: Dimitris Aragiorgis <>

d9b5b020 11/11/2013 03:29 pm Dimitris Aragiorgis

cyclades: Pass network type info as network tag

Signed-off-by: Dimitris Aragiorgis <>

3f68fa52 11/11/2013 03:28 pm Dimitris Aragiorgis

cyclades: Remove deprecated network type in ganeti

Signed-off-by: Dimitris Aragiorgis <>

b36d45e6 11/11/2013 03:28 pm Christos Stavrakakis

cyclades: Use opportunistic locking

Use opportunistic locking, introduced in Ganeti 2.7, to allow parallel creation
of VMs in the Ganeti backend. When this option is set, Ganeti iallocator
will allocate the VM only to nodes that not locked (e.g. by other VM...

2b4becab 11/11/2013 03:28 pm Christos Stavrakakis

gtools: Fix compatibility issues with ganeti-2.7

  • SimpleConfigReader has been removed. Use SimpleStore
  • QUEUE_DIR has been moven from ganeti.constants to ganeti.pathutils
  • _QueuedJob.Restore takes 2 more arguments
  • cyclades: Group info is returned as list instead of string
94ea30c8 11/11/2013 03:26 pm Christos Stavrakakis

cyclades: Fix bug in network reconciliation

Skip reconciliation for a network that does not exist in the DB, if
reconciliation is running without the '--fix' option.

80a548e3 11/11/2013 12:59 pm Christos Stavrakakis

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...

f23fbacf 11/11/2013 11:26 am Christos Stavrakakis

cyclades: Simplify code to 'logic.subnets' module

bac6ed1e 11/09/2013 07:48 pm Christos Stavrakakis

cyclades: Do not print IP pool for IPv6 only nets

Do not print IP pool of Ganeti network in case the network is an IPv6
only network. The Ganeti network has a dummy IPv5 subnet, just because
it is needed. Only change this dummy subnet to /30 to reduce space in...

8f335041 11/08/2013 05:19 pm Christos Stavrakakis

cyclades: Handle 'drained' flag of networks

  • Export 'SNF:DRAINED' status for drained networks.
  • Do not allow creation of new ports in drained networks.
  • Do not allow allocation of new IPs in drained networks.
ec4e0acc 11/08/2013 04:49 pm Christos Stavrakakis

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 the
networks in each backend. This step is mostly needed in case that the
network does not exist in any backend.

84a0469b 11/07/2013 09:32 pm Christos Stavrakakis

cyclades: Fix reconciliation of floating IP pools

Remove special handling of floating IP pools in reconciliation
mechanism since floating IP pools are treated the same way with other
networks.

a2bd0802 11/07/2013 04:31 pm Christos Stavrakakis

cyclades: Pass 'nfdhcp' tag to IPv6 networks

Pass 'nfdhcp' tag even if network is IPv6 only.

68129b44 11/07/2013 04:28 pm Christos Stavrakakis

cyclades: Optimize *-list commands

Use prefetch_related and select-related to importive the DB queries that
are generated by *-list snf-manage commands.

d2036274 11/07/2013 04:28 pm Christos Stavrakakis

cyclades: Code refactoring to backend module

  • Create function 'ensure_network_is_active' to check if a network
    exists in backend and create it if not.
  • Create function 'create_job_dependencies' to transaform a list of job
    IDs to the 'depends' attribute as expected by Ganeti....
6b5cdb0f 11/07/2013 04:28 pm Christos Stavrakakis

cyclades: Fix init of networks in backend-add

Fix which networks are going to be initialized in the new backend and
how the are printed in the output!

7b5263e4 11/06/2013 09:51 pm Christos Stavrakakis

cyclades: Fix network-create management command

Fix when network is created in the Ganeti backends. The network must be
created in the Ganeti backends only after IPv4 or/and IPv6 subnet has
been created. This commit moves the code that created the network in the...

3549cb2f 11/06/2013 06:58 pm Dionysis Grigoropoulos

cyclades: Fix bugs in subnets and ports

  • Return subnets from public networks, in GET subnets
  • Fix a bug in list ports, where only attached ports to servers were
    listed
bfb3f9c2 11/06/2013 05:50 pm Christos Stavrakakis

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 the
NIC is known which is only available after the message from the
Ganeti backend has been received. However, dispatcher did not created...

3785b737 11/06/2013 02:56 pm Dionysis Grigoropoulos

cyclades: Merge subnet-create with network-create

  • Merge snf-manage subnet-create into snf-manage network-create
8d5795b4 11/06/2013 02:00 pm Christos Stavrakakis

Cyclades: Rename 'Can not' to 'Cannot' to all msgs

ee688a71 11/06/2013 01:28 pm Christos Stavrakakis

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 corresponding
Ganeti instance may not exist, so all actions will fail.

3aecadc8 11/05/2013 11:07 am Christos Stavrakakis

cyclades: Fix default/forced server networking

Fix the default behaviour for networking of servers that are being
created. There are two settings controlling this behaviour:

  • CYCLADES_DEFAULT_SERVER_NETWORKS: This setting contains list of
    networks to connect a newly created server to, if the user has not...
3c96580c 11/04/2013 04:29 pm Christos Stavrakakis

cyclades: Add missing 'ips' module

0292883e 11/04/2013 03:52 pm Christos Stavrakakis

cyclades: Refactor code

Move code relative with allocating ips and floating IPs to 'logic.ips'
module.

01f5f8d9 11/04/2013 03:20 pm Christos Stavrakakis

cyclades: Workaround for race condition in Ganeti

Workaround for race where OP_INSTANCE_REMOVE starts executing on Ganeti
before OP_INSTANCE_CREATE. If this is the case, OP_INSTANCE_REMOVE will
not wait for locks, instead it will fail because the instance has not...

3f18f035 11/04/2013 12:18 pm Christos Stavrakakis

cyclades: Forbid new ports no deleting network

Do not allow creation of new ports and reservation of floating IPs on
network that are being deleted. Currently the state of the network
changes only when the network gets deleted from all backends. So we
check if a network is being deleted by checking if the action of the...

d2c3c533 11/04/2013 12:18 pm Christos Stavrakakis

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 specify
the IPv4 address of a floating IP. So in order to create a server
connected to a private network and a public network, the 'networks'...

c82f57ad 11/04/2013 12:18 pm Christos Stavrakakis

cyclades: Series of fixes regarding networks & ips

  • Do not delete the network from the DB if it has associated floating
    IPs. This should never be the case because a check is made before
    deleting the network, however this check is added for safety.
  • Do not allow deleting a network if there are still ports configured on...
e8234183 11/04/2013 12:18 pm Christos Stavrakakis

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 recreated
if needed. Also fix some tests.

e4758367 11/04/2013 11:12 am Dionysis Grigoropoulos

cyclades: Add snf-manage subnet-inspect

  • Add snf-manage subnet-inspect
  • Update return_end and return_start function in IPPool
09b76b7e 11/02/2013 02:39 pm Christos Stavrakakis

cyclades: Fix permissions when looking up ports

Look up of ports should check the port userid and not the network
userid.

99988465 11/02/2013 01:43 pm Christos Stavrakakis

cyclades: Create server with existing ports

Extend POST /servers API call to support creation of servers that will
be using existing ports. Networking of the instance is defined via the
'networks' attribute which can contain either network UUIDs or port
UUIDs. In case of network UUIDs, the user can also request for a...

ae2da8a2 11/02/2013 01:08 pm Christos Stavrakakis

cyclades: Fix double double creation of IP log

The port creation command called 'associate_port_with_machine' function
in order to associate the port with the machine and create an
IPAddressLog entry. However, this is already done by the connect
function which sends the job in the Ganeti backend. This resulted in...

4cbd934b 11/01/2013 04:17 pm Christos Stavrakakis

cyclades: Reconcile pools only for IPv4+dhcp subs

Perform IP pools reconciliation only for networks with an IPv4 subnet
that has enabled the dhcp option.

fae6e5f0 11/01/2013 04:17 pm Christos Stavrakakis

cyclades: Create ports without 'device_id'

Allow creation of ports that are not connected to any instance. Such
ports will be in 'DOWN' state. To allow this, 'machine' attribute of
NetworkInterface model has been made to allow null values. Finally, the
'logic.ports' module has been remove, and the corresponding code has...

6731a6ac 11/01/2013 04:10 pm Christos Stavrakakis

cyclades: Fix bug in floating-ip-list

ff863a80 11/01/2013 12:45 am Christos Stavrakakis

cyclades: Add accounting for IP Addresses

Create IPAddressLog DB table to hold information about allocation of IP
addresses to virtual servers. The information that is currently saved
contains the IP address, the ID of the virtual server, the ID of the
virtual network along with the datetime that the address has been...

5055b4c7 11/01/2013 12:03 am Marios Kogias

cyclades: PEP8 Fix

51a681ac 10/31/2013 04:40 pm Marios Kogias

cyclades: Fix bug in port-create

Check if floating-ip belongs to the given network

6b8dc47c 10/30/2013 06:27 pm Christos Stavrakakis

cyclades: Common code for creating ports

Merge code for creating ports that was duplicated between
'logic.servers' and 'logic.ports' modules.

b7311f3d 10/30/2013 04:56 pm Dionysis Grigoropoulos

cyclades: Various refactors in subnets

  • Remove unused functions and imports from logic/subnets.py
  • Remove --network-id option from snf-manage subnet-modify and make
    it an argument
  • Fix --ip-version, --dhcp and --gateway options in snf-manage
    subnet-create...
b48697f0 10/30/2013 02:26 pm Christos Stavrakakis

cyclades: Fix stale references to moved function

96feddae 10/30/2013 12:56 pm Christos Stavrakakis

cyclades: Update state of NICs if VM creation fail

Set the state of NICs(ports) to ERROR if the OP_INSTANCE_CREATE job
fails.

3a6be177 10/30/2013 12:51 pm Christos Stavrakakis

cyclades: Rename Port state from BUILDING to BUILD

Neutron API defines the 'BUILD' status. This commit renames BUILDING
state of NIC to BUILD.
d5a4a8d1 10/30/2013 12:36 pm Christos Stavrakakis

cyclades: Common module for pretty-printing

Create common module for pretty-printing database objects. Currently it
contains only functions for pretty-printing networks and ports.

3b2984dc 10/30/2013 12:40 am Christos Stavrakakis

cyclades: Make tests work with multiple IP pools

Refactor tests so that they are aware that a network can have multiple
IP pools. Also, add extra check to PoolManager methods in order to check
whether a value is contained in the pool.

f82dfec6 10/29/2013 07:38 pm Christos Stavrakakis

cyclades: Various fixes to networks/subnets/pools

  • Fix IP pools of subnets to take into account the 'offset' when searching
    if a pool contains an IP address and when converting from value to index
    and from index to value.
  • Fix the way subnets are created from 'logic/networks'...
0e0a6ef9 10/29/2013 07:38 pm Christos Stavrakakis

cyclades: Fix reconciliation for network and pools

Fix reconciliation to work with multiple IP pools per network:
  • Fix reconcile-networks command to check if a reserved_ip in a Ganeti
    network is reserved in the pool that contains this IP (if any)
  • Fix reconcile-pools to reconcile each of the networks IP pools and...
99718617 10/29/2013 04:03 pm Dionysis Grigoropoulos

cyclades: Small bug fixes in logic/subnets.py

316787ab 10/29/2013 04:03 pm Dionysis Grigoropoulos

cyclades: Update docstrings, remove old functions

  • Update docstrings in api/subnets.py and logic/subnets.py
  • Remove duplicate and unused functions from logic/subnets.py
8646e606 10/29/2013 04:03 pm Dionysis Grigoropoulos

cyclades: Fix some bugs in subnets

  • Fix a bug, where a user could change the name of a subnet without
    being the owner of said subnet.
  • Fix two bugs in snf-manage subnet-create. Fix no-dhcp option and a
    potential crash if the user specified an invalid IP version type....
e407f159 10/29/2013 04:00 pm Ilias Tsitsimpis

snf-cyclades-app: Use the new AstakosClient

Change AstakosClient to use ASTAKOS_AUTH_URL as entry point to the
Astakos service, instead of ASTAKOS_BASE_URL it was using until now.

Remove ASTAKOS_BASE_URL from Cyclades settings, replace it with
ASTAKOS_AUTH_URL. Modify Cyclades to determine ASTAKOS_ACCOUNT_URL and...

014df29c 10/29/2013 03:40 pm Christos Stavrakakis

cyclades: Remove stale references to vm.router

a859190b 10/29/2013 02:57 pm Christos Stavrakakis

cyclades: Fix output of network-inspect command

437e1eee 10/29/2013 02:42 pm Christos Stavrakakis

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 changes
this to be done for any kind of networks.

3d63d954 10/29/2013 02:22 pm Christos Stavrakakis

cyclades: Set external_router for public networks

Set 'external_router' attribute of created networks to True, if a
network is a public network.

79f4eec0 10/25/2013 03:41 pm Christos Stavrakakis

cyclades: Use existing IP when creating port

Extend port creation with the option to use an existing IPAddress. This
will be used to create a port with an existing Floating IP. Also, extend
port-creata management command with the '--floating-ip' option.

6d5c0344 10/25/2013 03:03 pm Christos Stavrakakis

cyclades: Fixes to port-create command

Verbal and code-style fixes to port-create command.

54f13218 10/25/2013 02:30 pm Christos Stavrakakis

cyclades: PEP8 fix

666b9edc 10/25/2013 12:35 am Marios Kogias

cyclades: Fix snf-manage floating-ip-list

A minor fix to the snf-manage floating-ip-list command to comply
to the new models

d9c36253 10/25/2013 12:35 am Marios Kogias

cyclades: snf-manage floating-ip-attach

snf-manage floating-ip-attach <address> --machine <server_id/router_id>

5d83d2ff 10/24/2013 04:49 pm Dionysis Grigoropoulos

cyclades: Bug fixes in subnets

9eb0710b 10/24/2013 12:36 pm Dionysis Grigoropoulos

cyclades: move subnets.py from api to logic

Move api/subnets.py to logic/subnets.py, for further code refactoring

c8914c67 10/21/2013 05:26 pm Christos Stavrakakis

Revert "cyclades: Fix bug when deleting instances"

This reverts commit 8331c929facc5849b98e0fb945d047a4f4504b3a. Before
this commit is applied we must extend DeleteInstance method of
GanetiRAPIClient to support the 'depends' attribute.

8331c929 10/18/2013 05:46 pm Christos Stavrakakis

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 will
release it's IPv4 address. However the instance may not exist because it...

4ac628d3 10/18/2013 04:16 pm Christos Stavrakakis

cyclades: Fix network inspect management command

86961519 10/18/2013 03:44 pm Christos Stavrakakis

cyclades: Add backend code to Ports API/logic

Add backend code to create and remove ports from Ganeti backends. Also
add some imporovements and fixes to logic, API code and management
commands.

fe3b2809 10/18/2013 02:50 pm Christos Stavrakakis

cyclades: Fix bug when creating networks

3d5906fe 10/16/2013 06:21 pm Giorgos Korfiatis

Resolve some undefined names

Add missing imports; remove call to sqlite3_changes; set key and val
in render_meta.

0069a20c 10/16/2013 11:19 am Marios Kogias

cyclades: Add snf-manage port-remove command