Statistics
| Branch: | Tag: | Revision:

root / snf-cyclades-app / synnefo / logic @ 6a439d95

# Date Author Comment
6a439d95 01/21/2014 11:38 am Dionysis Grigoropoulos

cyclades: Update snf-manage subnet-* commands

  • Update snf-manage commands to use the new userid and public fields
    introduced in commit bdedfd9d79be7f1c00764b5d56a326d30b30b474
a8817717 01/20/2014 06:34 pm Christos Stavrakakis

cyclades: Fix broken tests

Fix tests that were broken by commit #7ef05bd.

1b3f1792 01/20/2014 05:06 pm Christos Stavrakakis

cyclades: Fix quota bug in snf-dispatcher

Clear the 'vm.serial' field after processing a job that was not
expected. When processing such a job, we reject the pending commission
and issue a new one that reflects the unexpected job. However, since we
reject the commission that is associated with the 'vm.task_job_id' job,...

7ef05bd4 01/20/2014 03:52 pm Christos Stavrakakis

cyclades: Fix corner case in reconciliation

Do not perform reconciliation for building servers that the
OP_INSTANCE_CREATE job is completed after quering Ganeti about the state
of servers.

49e3c862 01/20/2014 03:31 pm Christos Stavrakakis

cyclades: Display IPs in stats-cyclades

Display free and total public IPv4 addresses when pretty-printing
Cyclades stats.

c915a198 01/13/2014 04:55 pm Giorgos Korfiatis

cyclades: Fix passing arg shutdown_timeout in logic

c397dbce 01/10/2014 05:52 pm Christos Stavrakakis

cyclades: Add shutdown_timeout to server commands

Add support for specifying a timeout when stopping, rebooting or
destroying a server.

624f0d07 01/08/2014 04:13 pm Dionysis Grigoropoulos

cyclades: Fix a bug in subnet creation

Since commit ba6ad3460931223d262badebcecbb4124ac136d8 subnets were
always created with an empty name field due to a bug.

b6f688dd 01/08/2014 04:13 pm Dionysis Grigoropoulos

cyclades: Fix a bug in check_name_length

Function check_name_length would crash if the input was a unicode
string.

45ead074 12/20/2013 01:59 pm Christos Stavrakakis

cyclades: Lock objects in reconciliation

Make reconciliation mechanism take an exclusive lock on objects before
issuing messages for reconciliation events. This will make
reconciliation mechanism more slow, but will ensure correct quotas when
reconciliation is run while the service is online.

3af1fb4b 12/20/2013 01:59 pm Christos Stavrakakis

cyclades: Fixes causing unsynced quotas

  • clear QuotaHolderSerial objects when resolving pending commissions.
  • Fix wrong name of Ganeti opcodes.
  • Do not update vm's flavor before issuing new commission
bdedfd9d 12/19/2013 05:22 pm Christos Stavrakakis

cyclades: Add 'userid' and 'public' to subnets

Extend 'Subnet' model with 'userid' and 'public' attributes. This is
required in order to avoid an expensive join when listing subnets. This
commit also includes a database migration for existing subnets.

5920f82c 12/19/2013 05:22 pm Christos Stavrakakis

cyclades: Add 'ipversion' to IPAddress model

40576cf5 12/19/2013 05:22 pm Christos Stavrakakis

cyclades: Optimize dispatcher DB queries

01def7a4 12/19/2013 04:36 pm Dionysis Grigoropoulos

cyclades: Properly handle subnet/floating_ip IDs

  • Propery handle IDs that weren't an integer
689d7a07 12/19/2013 04:36 pm Dionysis Grigoropoulos

cyclades: Update help msg on snf-manage commands

371ab004 12/18/2013 07:17 pm Christos Stavrakakis

cyclades: Allow deletion of ports from deleted VMs

Fix corner case where a port seems to be still attached to a VM although
the VM has already been deleted.

b7e79bf3 12/18/2013 11:51 am Christos Stavrakakis

cyclades: Do not prefetch related in get()

883c1f94 12/17/2013 05:11 pm Christos Stavrakakis

cyclades: Optimize network related DB queries

Use 'prefetch_related' and 'select_related' to optimize DB queries.

ba6ad346 12/17/2013 09:58 am Dionysis Grigoropoulos

cyclades: Add a function to check name legnth

  • Add a function logic/utils.py to check the length of a string and
    raise an API fault with the corresponding message.
  • Check the length of the name of servers/ports/networks/subnets
784a3f1e 12/17/2013 09:58 am Dionysis Grigoropoulos

cyclades: Fix a bug in subnet creation

  • Do not allow subnet creation on deleted networks
e2b37fb9 12/16/2013 07:52 pm Christos Stavrakakis

cyclades: Fix typo in stats-cyclades cmd

7bfff8a6 12/16/2013 06:55 pm Christos Stavrakakis

cyclades: Update backend only when needed

Make dispatcher ask Ganeti about the enabled/ipolicy disk templates only
after an OP_CLUSTER_SET_PARAMS. Otherwise, dispatcher will be
overwhelmed by gnt-cluster verify jobs.

84813b31 12/16/2013 06:55 pm Christos Stavrakakis

cyclades: Fix bug in network link validation

01858899 12/16/2013 01:04 pm Christos Stavrakakis

cyclades: Include port in floating-ip-list command

cad9202c 12/16/2013 01:04 pm Christos Stavrakakis

cyclades: Fix error msg when deleting floating IPs

a3acfc5b 12/16/2013 01:04 pm Christos Stavrakakis

cyclades: Disable conflict checks for IPv6 nets

5d5d8f19 12/10/2013 04:54 pm Constantinos Venetsanopoulos

Vocabulary fixes: Dettach -> Detach

62232bba 12/10/2013 04:48 pm Christos Stavrakakis

cyclades: Add setting for Ganeti clone providers

Add new 'GANETI_CLONE_PROVIDERS' setting to containg the list of
ExtStorage providers that support cloning. For these providers the
hashmap of the image is passed as an ExtStorage parameter('origin').
Also, since the disk is already filled with data, snf-image performs...

129b94d5 12/10/2013 04:28 pm Christos Stavrakakis

cyclades: Setting for max NICs per Ganeti instance

Add new 'GANETI_MAX_NICS_PER_INSTANCE' setting which represents the
maximum number of NICs that is allowed for each Ganeti instance. The
value of this setting must be less than 'max:nic-count` option of
Ganeti's ipolicy.

00429c48 12/10/2013 04:28 pm Christos Stavrakakis

cyclades: Pass arbitrary params to ext providers

Add 'GANETI_DISK_PROVIDER_KWARGS' setting, which contains a dictionary
of arbitrary parameters for each of Ganeti's ExtStorage providers and
which will be passed to the 'disks' option of CreateInstance Ganeti job.

7b438672 12/10/2013 02:32 pm Christos Stavrakakis

cyclades: Ignore messages about deleted resources

Ignore messages from Ganeti about servers and networks that have already
been marked as deleted in the Cyclades DB. Processing of these messages
may asynchronize Cyclades with Astakos quotas.

1113f89d 12/09/2013 05:53 pm Christos Stavrakakis

cyclades: Order pools by id

16a7ced5 12/09/2013 04:54 pm Christos Stavrakakis

cyclades: Remove testing try/exception statement

e21ac0fa 12/09/2013 02:13 pm Christos Stavrakakis

cyclades: Fix deadlock when releasing floating IPs

036b07b6 12/09/2013 12:55 pm Christos Stavrakakis

cyclades: Fix bug in getting a free floating IP

Fix wrong query which resulted in getting non-floating IPs.

adf766e9 12/08/2013 01:59 pm Christos Stavrakakis

cyclades: Fix division by zero bug

Ganeti reports zero available and total disk if no vg is set. This
caused a division by zero error in the default backend allocator.

40a815f8 12/08/2013 01:59 pm Christos Stavrakakis

cyclades: Fix DB locking issues causing deadlocks

Fix deadlock issues that is caused by Postgresql's locks on foreign
keys. For example, creation of a BackendNetwork row will result in a
shared lock in the 'backend_id' rows. Because updating a VM's NICs
acquired an exclusive lock on the backend that the VM lived, this...

2fa6faca 12/08/2013 01:59 pm Christos Stavrakakis

cyclades: Fix typo in log msg

dce3fc8b 12/04/2013 01:13 pm Christos Stavrakakis

cyclades: Require subnet for IP_LESS_ROUTED nets

e4def9d6 12/04/2013 01:07 pm Christos Stavrakakis

cyclades: Remove DEFAULT_ROUTING_TABLE setting

Do not have a default value from 'link' attribute of IP_LESS_ROUTED
networks. Instead if the admin does not specify a value in
network-create command, uniquely name the networks by with the
BACKEND_PREFIX_ID and network id, e.g. snf-link-42.

d193a5c8 12/04/2013 11:46 am Christos Stavrakakis

cyclades: Add --drained option to network-create

1229a55f 12/03/2013 03:21 pm Christos Stavrakakis

cyclades: Some verbla fixes to snf-manage commands

2052c40e 12/02/2013 04:52 pm Christos Stavrakakis

cyclades: Optimize server-list command

Optimize server-list command by prefetching related fields if needed.

f3c5f1df 12/02/2013 04:03 pm Stratos Psomadakis

Add support for snf-vncauthproxy >= 1.5

6176e251 12/02/2013 12:51 pm Christos Stavrakakis

cyclades: Fix wrong state of deleted networks

Before deleting a network, the network is marked as drained to be
excluded from automatic IP allocation. The state of the network that is
exposed in the API is always 'SNF:DRAINED' if the drained flag is set....

2e19e7dc 11/29/2013 05:08 pm Christos Stavrakakis

cyclades: Fix broken unittest

1bf69a52 11/29/2013 04:10 pm Giorgos Korfiatis

cyclades: Lock objects in modifying commands

475d4a85 11/29/2013 04:00 pm Christos Stavrakakis

cyclades: Move all management commands to logic

Move all management commands from 'api/management/commands' to
'logic/management/commands'.

91884d63 11/29/2013 02:26 pm Giorgos Korfiatis

Add some missing Copyright notices

Also add 2013 in package COPYRIGHT files.

57374655 11/28/2013 01:30 pm Christos Stavrakakis

cyclades: Change logging level to error

c32c74d9 11/26/2013 03:27 pm Christos Stavrakakis

cyclades: Fix bug by wrong indentation

e74a5b4b 11/26/2013 03:20 pm Christos Stavrakakis

cyclades: Improve messages for default networks

Improve log and exception messages when failing to connect new server to
default and forced server networks.

bc4dfc43 11/26/2013 01:29 pm Christos Stavrakakis

cyclades: Include 'vlmc' and 'archipelago'

Fix image ID for both 'vlmc' and 'archipelago' ext providers.

ee995ae2 11/26/2013 01:11 pm Christos Stavrakakis

Merge branch 'master' into develop

Conflicts:
ci/schemas/one_node_wheezy/wheezy.conf
docs/admin-guide.rst
snf-cyclades-app/synnefo/api/actions.py
snf-cyclades-app/synnefo/api/servers.py
snf-cyclades-app/synnefo/logic/backend.py
snf-cyclades-app/synnefo/logic/callbacks.py...

1709a768 11/25/2013 04:25 pm Dionysis Grigoropoulos

cyclades: Fix a bug in logic/subnets.py

  • Don't allow creation of subnets on a network that is initilized in a
    backend
b81e0ba5 11/25/2013 01:40 pm Christos Stavrakakis

cyclades: Rename hotplug to hotplug_if_possible

Use 'hotplug_if_possible' option when adding/removing NICs from
instances. 'hotplug' option will fail if the instance is already
stopped. Also, pass 'hotplug' option only if it is enabled.

0f89715b 11/25/2013 01:13 pm Dionysis Grigoropoulos

cyclades: Update some snf-manage commands

  • Update network-remove, server-remove, floating-ip-remove, port-remove
    to extend RemoveCommand class added in commit
    ec15e2ab68f90dcc7310863c9293708055fbfb7d
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
eb5f7eb0 11/25/2013 01:13 pm Dionysis Grigoropoulos

cyclades: Fix a bug in logic/subnets.py

  • Fix a potential crash if the gateway IP was the last available IP of
    the subnet
  • Create the corresponding test
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"...

b2272468 11/22/2013 02:38 pm Christos Stavrakakis

cyclades: Add name to Ganeti NICs

Add 'name' attribute to newly created NICs. Currently, the name of the
NICs will not be used to refer to NICs, as it will be in Synnefo 0.15.
Names are added only to ease the migration to version 0.15. Also, this
commit updates snf-dispatcher to preserve the name of the NIC, if any,...

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...
aee560b0 11/18/2013 02:57 pm Christos Stavrakakis

cyclades: Do not retry all Ganeti failed creations

Make snf-dispatcher retry only the OP_INSTANCE_CREATE jobs that failed
due to opportunistic locking. Such jobs include the 'ECODE_TEMP_NORES'
error code in the opcode result. This commit makes snf-ganeti-eventd...

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.

7b4a61dc 11/18/2013 12:46 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...