Statistics
| Branch: | Tag: | Revision:

root / snf-cyclades-app / synnefo / logic @ ce55f724

# Date Author Comment
ce55f724 08/06/2013 03:58 pm Christos Stavrakakis

cyclades: Fix typo

d311e54f 08/06/2013 09:56 am Christos Stavrakakis

cyclades: Fix condition for network netmask size

108ef251 08/06/2013 08:40 am Christos Stavrakakis

cyclades: Check that IPv6 network netmask is /64

Check that IPv6 network netmask is /64, because this is imposed by the
'mac2eui64' utility that generates EUI-64 addresses from 48-bit MAC
addresses.

Refs #4201

a4658bbe 08/06/2013 08:40 am Christos Stavrakakis

cyclades: Move code for validating network values

Move code for network parameters validation from 'api' module to 'logic'.

d758784b 08/05/2013 02:39 pm Christos Stavrakakis

Fix stale import statements

Commit 7cfc0ce moved code from webproject to snf_django. This commit
fixes some stale imports that skipped renaming.

7cfc0cef 08/05/2013 12:45 pm Christos Stavrakakis

snf-django: Move ListCommand to snf-django

snf-webproject contained the generic ListCommand, and because of this it
had a dependency from snf-django-lib. This commit moves this command from
snf-webproject to snf-django-lib and removes this dependency. Also,...

9122ffab 07/25/2013 04:42 pm Christos Stavrakakis

cyclades: Add 'name' to all commissions.

Make all quotaholder commissions to have a name. Since, Cyclades does
not store the association of a commission with a resource, we include
the resource in the commission name.

671db71c 07/25/2013 01:31 pm Christos Stavrakakis

cyclades: Add network to multiple backends

Update snf-manage network-create command to take a list of comma
seperated backend IDs to create the network to.

cbf1a3f3 07/24/2013 09:15 pm Christos Stavrakakis

cyclades: Add check for link during network create

Add a check when creating IP_LESS_ROUTED networks, that the connectivity
link is not already used by another network.

b47f167a 07/24/2013 09:15 pm Christos Stavrakakis

cyclades: Fixes in network management commands

Merge code from logic/networks.py and network management commands.

b2791a77 07/24/2013 09:15 pm Christos Stavrakakis

cyclades: Set firewall profile per NIC

Set firewall profile per NIC, because since Floating IPs an instance can
have more than one NICs in a public network. Extend the API call to take
the NIC index as argument, and modify the Ganeti instance tags to be
formated with the NIC index.

70a0afab 07/24/2013 09:15 pm Christos Stavrakakis

cyclades-rapi: Add bulk option to GetJobs

63f9eb8e 07/24/2013 09:15 pm Christos Stavrakakis

cyclades: Reconciliation for pending vm tasks

Extend reconciliation mechanism, to detect instances with stale pending
tasks, by looking if the corresponding job, 'vm.task_job_id', is still
running in the Ganeti backend.

Also refactor code that performed reconciliation for buildign vms, to...

12cb6933 07/22/2013 04:53 pm Christos Stavrakakis

cyclades: Minor improvements in manage commands

6e9255ab 07/22/2013 04:53 pm Christos Stavrakakis

cyclades: Fix import of renamed settings

48f5b1bc 07/17/2013 02:57 pm Christos Stavrakakis

cyclades: No commission for public networks

Do not issue commission for public networks, since they do not have an
owner.

8f2aa316 07/17/2013 02:57 pm Christos Stavrakakis

cyclades: Consider IPv6 only networks in allocator

Backend allocator excludes backends that do not have a free IPv4
address. Since, from now on, not all instances are connected to a public
network, this check is only needed when 'SNF:ANY_PUBIC' network is used.

b88c1549 07/17/2013 02:57 pm Christos Stavrakakis

cyclades: Implement NetworkReconciler class

Refactory network reconciliation. Implement NetworkReconciler class to
hold all reconciliation functions.

89b2b908 07/17/2013 02:57 pm Christos Stavrakakis

cyclades: Move NetworkReconciler to reconciliation

Move NetworkReconciler class from network-create command to
reconciliation module.

be4d8469 07/17/2013 02:57 pm Christos Stavrakakis

cyclades: Add tests for network reconciliation

8d325d4b 07/17/2013 02:57 pm Christos Stavrakakis

cyclades: Simple code refactoring

5aeb4e93 07/17/2013 02:57 pm Christos Stavrakakis

cyclades: Support IPv6 only networks

Make Cyclades support IPv6 only networks. Such networks will have
the 'subnet' attribute set to None, in the same way that IPv4 only
networks have the 'subnet6' attribute set to None.

Because currently Ganeti does not support IPv6 only networks, we create the...

5962d9a6 07/17/2013 02:57 pm Christos Stavrakakis

cyclades: Add tests for IPv6 only networks

Add tests to check creation and usage of IPv6 only networks. Tests also
cover creation of other type of networks.

c75ab92e 07/17/2013 02:57 pm Christos Stavrakakis

cyclades: Refactor code relative to networks

Move code checks from network-create management command to
logic/networks.py.

Also create common decorator for management commands to convert api
faults to command errors.

0208770b 07/17/2013 02:57 pm Christos Stavrakakis

cyclades: Refactor logic tests

Create tests module to hold all tests for logic.

890f3d4c 07/12/2013 01:22 pm Christos Stavrakakis

Merge branch 'hotfix-0.14.2' into develop

Conflicts:
Changelog
snf-astakos-app/astakos/im/messages.py
snf-astakos-app/astakos/im/views/target/__init__.py
snf-cyclades-app/synnefo/logic/backend.py
snf-cyclades-app/synnefo/logic/management/commands/reconcile-servers.py...

5d3e597a 07/09/2013 04:43 pm Christos Stavrakakis

cyclades: Fix reconciliation of building vms

When reconciling a building vm, you first have to reconciliation it's
creation and then it's operstate. Otherwise it is possible to end up
having wrong quotas.

07602322 07/08/2013 03:05 pm Christos Stavrakakis

cyclades: Fix corner case in snf-dispatcher

Same as commit 0514662, but for servers.

6193628f 07/08/2013 12:04 pm Christos Stavrakakis

cyclades: Fix typo bug in management command

527c7a7b 07/05/2013 04:52 pm Christos Stavrakakis

cyclades: Fix type error

Create network may return a list of job IDs.

f05a25af 07/05/2013 04:52 pm Christos Stavrakakis

cyclades: Fix wrong unit of ram

75dc539e 07/05/2013 04:13 pm Christos Stavrakakis

cyclades: Parallel server reconciliation

Major refactor to reconcile-servers management command to make it work
in parallel for each backend. Also, removed all --detect options, and
detect all incosistencies by default.

595bc9b0 07/05/2013 04:13 pm Christos Stavrakakis

cyclades: Add tests for server reconciliation

05146623 07/04/2013 11:24 am Christos Stavrakakis

cyclades: Fix corner case in snf-dispatcher

Delete network from DB when job fails but the action of network is
DESTROY. This case appears when someone tries to remove a network that
has been deleted from Ganeti backend, but not yet from DB.

8e440b3a 07/03/2013 06:32 pm Christos Stavrakakis

cyclades: Fix typo in reconciliation

9766a80e 07/03/2013 03:55 pm Christos Stavrakakis

reconciliation: Strip Ganeti IP addresses

Strip spaces from Ganeti IP addresses, since they are not automatically
ignored in newer versions of ipaddr.

82d23461 07/03/2013 02:43 pm Christos Stavrakakis

reconciliation: Get servers from DB ater ganeti

Change server reconciliation, to get the instances from DB after getting
instances from Ganeti, to decrease the possibility for races.

736b9244 07/02/2013 04:00 pm Christos Stavrakakis

cyclades: Fix exception message

Fix exception message when trying to connect an instance to a non-active
public network.

952b2a48 07/02/2013 03:00 pm Christos Stavrakakis

cyclades: Wrap diagnostic creation in transaction

Fix bug in snf-dispatcher causing wrong updates of VMs from ganeti.
Creation if instance diagnostics must run inside a transaction, because
otherwise, the lock of the vm (select_for_update) is released too early....

9446e7e5 07/02/2013 01:24 pm Christos Stavrakakis

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

660b9f3b 07/02/2013 12:32 pm Christos Stavrakakis

cyclades: Remove PUBLIC_USE_POOL setting

Remove PUBLIC_USE_POOL setting, since in order to use floating IPs, the
cyclades must be responsible for managing all IP pools.

0c50c760 07/02/2013 12:32 pm Christos Stavrakakis

cyclades: Check if a NIC is a floating IP.

Extend NetworkInterface model with a property showing if the IPv4
address of the NIC is a floating IP or not. Also, simplify some
relevant code.

816d7588 07/02/2013 12:31 pm Christos Stavrakakis

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 server
will have one NIC for each of this addresses after the
'DEFAULT_INSTANCE_NETWORKS' and before any private networks that the...

9115d567 07/02/2013 12:31 pm Christos Stavrakakis

Distinquish between networks and Floating IP pools

Extend Network model with the 'floating_ip_pool' boolean field, to
indicate whether a Network can be a floating IP pool or not. Networks
that are floating IP pools must exist in all Backends, and so
'snf-manage backend-add' should try to add them....

f8675683 07/02/2013 12:31 pm Christos Stavrakakis

cyclades: Various fixes regarding floating IPs

Fix some issues regarding floating ips introduced by rebasing branch.

2cd55da6 07/02/2013 12:31 pm Christos Stavrakakis

Fixes to tests

ece5581b 07/02/2013 12:31 pm Christos Stavrakakis

cyclades: Separate logic for networks from API

Remove code handling networks from network API views to logic.networks

b407551d 07/02/2013 12:31 pm Christos Stavrakakis

cyclades: Add 'floating-ip-list' management cmd

cb66110b 07/02/2013 12:31 pm Christos Stavrakakis

cyclades: Add network policy at server create

Add 'DEFAULT_INSTANCE_NETWORKS' setting that can be used by the
administrator to define the list of networks that each server that is
created must be connected to. Each created VM will have a NIC connected
to each of these networks. This settings can include a list of network...

72dea98f 07/02/2013 12:31 pm Christos Stavrakakis

cyclades: Do not release floating IPs

Update 'release_instance_nics' backend function which is called to
process NIC modifications in the Ganeti backend, to not return a
IPv4 address back to pool if this address is a floating IP.

fd22fc77 07/02/2013 12:31 pm Christos Stavrakakis

cyclades: Update reconcilliation for floating IPs

Update network reconcilliation to consider floating IPs reconcilling IP
pools. Floating IPs that are reserved and usused, will appear as
asynced. This commit fixes this, by considering unused floating IPs as...

e7f74e7d 07/02/2013 12:31 pm Christos Stavrakakis

cyclades: Check if network exists in backend

Raise 503 if a user tries to add a floating IP to a VM that resides in a
Ganeti backend that the coressponding network does not exist.

2c022086 07/02/2013 12:31 pm Christos Stavrakakis

cyclades: Support many NICs when creating vms

Support arbitraty number of NICs when creating Ganeti instances.

9ba6bb95 07/02/2013 12:31 pm Christos Stavrakakis

cyclades: Extend /servers with floating IP actions

Extend '/servers/action' API endpoint, to support 'addFloatingIP'
and 'removeFloatingIP' actions.

7ab30015 07/02/2013 12:31 pm Christos Stavrakakis

cyclades: refactor reconciliation

Refactor reconciliation code to use namedtuples and improve performance
for retrieving info from database.

a67419d8 07/02/2013 12:31 pm Christos Stavrakakis

cyclades: reconciliation for resizing VMs

41a7fae7 07/02/2013 12:31 pm Christos Stavrakakis

cyclades: Major refactor to api and logic apps

Major refactor to cyclades api and logic apps that removes most code
from the api views and moves it to logic app, so that the same logic
code can be used by different apps (e.g. EC2 API). Code is moved into...

34c03a51 07/02/2013 12:31 pm Christos Stavrakakis

cyclades: Handle 'EmptyPool' in util method

Refactor cyclades code to handle 'EmptyPool' exception in
'get_network_free_address' function.

2cd3f389 07/02/2013 12:31 pm Christos Stavrakakis

cyclades: Add backend function for resizing vm

Add 'resize_instance' backend function for resizing a vm. This command
issues an OP_INSTANCE_MODIFY job with the specified beparams, which
currently are vcpus, minmem and maxmem.

Refs #3870

ca4d59e3 07/02/2013 12:31 pm Christos Stavrakakis

cyclades: Handle Ganeti msgs for resized VMs

Handle 'OP_INSTANCE_SET_PARAMS' notifications from Ganeti that have
'beparams' attribute, which corresponds to resized VMs. In such
case, the corresponding flavor is found an the VM in DB is updated to
have this flavor....

10d9cd27 07/02/2013 12:31 pm Christos Stavrakakis

cyclades: Fix assertion on mocked client

8bb3a316 06/28/2013 09:44 pm Christos Stavrakakis

cyclades: Fix bug in testcase

abe6915b 06/28/2013 09:12 pm Christos Stavrakakis

Merge branch 'release-0.14' into develop

Conflicts:
snf-astakos-app/astakos/im/views/target/redirect.py
snf-cyclades-app/synnefo/logic/backend.py
version

e77a29ab 06/28/2013 08:45 pm Christos Stavrakakis

cyclades: Fixes relative to reconciliation

Get available backends once and work only with them, since available
backends may change during reconciliation. Also temporary remove support
for communicating with each backend in a separate process.

b12ab2d0 06/25/2013 03:23 pm Christos Stavrakakis

Revert "cyclades: Speed up reconciliation"

This reverts commit cf2241c45a22dac71e31dbf32f4700c475804c12.

cf2241c4 06/25/2013 11:36 am Christos Stavrakakis

cyclades: Speed up reconciliation

Speed up reconciliation by using mulitprocessing to get in parallel
the instances from all Ganeti backends.

e8aa2f64 06/21/2013 05:42 pm Christos Stavrakakis

cyclades: Fix bug in allocating archipelago VMs

This commit fixes a bug that caused backend allocator to send
archipelago VMs backends to backends not in ARCHIPELAGO_BACKENDS
setting. The flavor disk template is parsed before the backend
allocation, so the disk_template at this point is ext and not ext_vlmc,...

79f65825 06/21/2013 01:40 pm Christos Stavrakakis

cyclades: Handle errors when using multiprocessing

Check the process exitcode to determine if a process finished
successfully.

d986cb32 06/21/2013 12:54 pm Christos Stavrakakis

cyclades: Speed up reconciliation

Speed up reconciliation by using mulitprocessing to get in parallel
the instances from all Ganeti backends.

e63050ca 06/19/2013 02:30 pm Christos Stavrakakis

cyclades: Speed up server reconciliation

Speed up reconciliation, by increasing the time interval to get Ganeti
job status for VMs in building state.

40d53b77 06/19/2013 11:07 am Christos Stavrakakis

cyclades: Fix deadlock when creating servers

Fix deadlock between snf-dispatcher and backend allocator, by making
snf-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...

5ba43517 06/17/2013 03:57 pm Christos Stavrakakis

cyclades: Validate MAC prefix in pool-create cmd

b2222a7f 06/13/2013 05:10 pm Christos Stavrakakis

cyclades: Pass disk origin for all 'ext' flavors

18c4414d 06/07/2013 03:15 pm Giorgos Korfiatis

cyclades: Rename service token

Rename CYCLADES_ASTAKOS_SERVICE_TOKEN to CYCLADES_SERVICE_TOKEN for
uniformity.

e3ff6830 06/03/2013 11:49 am Georgios D. Tsoukalas

make synnefo URLs consistent and configurable

https://service.deployment.vendor.tld/service-base/api-prefix/hard/path |___________________________________| |__________| |________| |_______|
BASE_HOST BASE_PATH PREFIX Hardcoded...

6dafedf6 05/31/2013 05:12 pm Christos Stavrakakis

cyclades: Add 'drained' flag to Network

Extend Network model with the 'drained' attribute, to indicate whether a
network should be used in public IP allocation when creating servers.
This option is only useful for public networks.

7f79fa49 05/24/2013 04:17 pm Christos Stavrakakis

cyclades: Export hypervisor to backend-list cmd

4c9ac139 05/21/2013 02:09 pm Christos Stavrakakis

cyclades: Add --hypervisor option to backend cmds

Add '--hypervisor' option to 'backend-add' and 'backend-modify'
management commands.

Refs #3772

bd87213f 05/21/2013 02:07 pm Christos Stavrakakis

cyclades: Sypport backends with Xen hypervisor

Support Ganeti backends with Xen hypervisor:
  • Extend 'Backend' model with the 'hypervisor' attribute, which
    currently can be 'kvm' or 'xen'. Use 'kvm' as default value to
    easy database migration. Also add the corresponding schema migration....
c6c889f7 05/14/2013 02:09 pm Christos Stavrakakis

cyclades: Various fixes to tests

fd95834e 05/14/2013 01:25 pm Christos Stavrakakis

dispatcher: Handle NICs in callbacks.

Update 'update_db' callback to handle instance NICs together with
instance status.

Also update the relevant tests.

be4d8aed 05/14/2013 01:25 pm Christos Stavrakakis

cyclades: simplify comparison of NICs

95059648 05/14/2013 01:25 pm Christos Stavrakakis

Remove 'snf-events-net' queue and binding

Remove 'snf-events-net' queue (together with the corresponding routing
key and binding) from the queues that snf-dispatcher is consuming
messages. This queue is no longer needed, because messages for instance
NICs will be sended by snf-ganeti-eventd to 'snf-events-op' queue....

acfc71ef 05/14/2013 01:25 pm Christos Stavrakakis

cyclades: Fix deadlock when connecting vms

Fix deadlock caused by 'get_or_create' method, since it acquires an
implicit shared lock. Take an exclusive lock on network to fix this
deadlock.

27cda06b 05/14/2013 01:24 pm Christos Stavrakakis

cyclades: Fixes relevant to lazy networks

de1fed2b 05/14/2013 01:24 pm Christos Stavrakakis

cyclades: Simplify reconcile-networks checks

Refactor and simplify checks of reconcile-networks to take advantage
of lazy networks.

1d04ef8b 05/13/2013 01:36 pm Christos Stavrakakis

cyclades: update tests for lazy networks

e34b35d9 05/13/2013 01:36 pm Christos Stavrakakis

cyclades: Update 'backend-add' for lazy networks

Do not create private networks when adding a new backend. Since,
"lazy networks" this is no longer needed.

99af08a4 05/13/2013 12:38 pm Christos Stavrakakis

cyclades: Implement lazy networks

Implement "lazy networks", which are not created to all Ganeti backends
upon creation, but only when an instance that resides in a Ganeti is
connected to that network.

Update 'create_network' to create the Network object in DB without...

2509ce17 04/30/2013 05:05 pm Christos Stavrakakis

cyclades: refactor code relative to commission

Refactor Cyclades code that handles commissioning with Quotaholder. This
commit removes the 'uses_commission' decorator. Instead it introduces
the 'issue_and_accept_commission' function that is responsible for...

184a2a8c 04/30/2013 05:05 pm Christos Stavrakakis

Mock quotaholder for Cyclades tests

Create 'mocked_quotaholder' context manager to bypass commission and use
it in Cyclades tests. Also this commit does some various fixes to other
tests.

6cc65c86 04/22/2013 10:10 am Christos Stavrakakis

Remove transaction from 'backend-add' command

Do not run 'backend-add' command inside transaction, because if
'snf-dispatcher' is running, it will receive messages that will arrive
from a Ganeti backend that does not exist in the DB and will not be able
to process them.

04a1b675 04/08/2013 06:17 pm Christos Stavrakakis

Move astakos lib from snf-common to snf-django-lib

1a736ca8 04/08/2013 04:27 pm Christos Stavrakakis

Use 'python-objpool' instead of 'synnefo.lib.pool'

Use the python-objpool package for pooling resources as object, instead
of the pooling code that existed in snf-common ('synnefo.lib.pool')

Refs #3524

28578e52 04/02/2013 01:49 pm Christos Stavrakakis

Use pprint_table in server-show command

939d71dd 03/21/2013 05:05 pm Christos Stavrakakis

Create public NIC when creating VM

Until now, a server's public NetworkInterface was not created in the DB
until the arrival of the message from Ganeti hooks. However, the IPv4
address of the NIC is reserved before sending the OP_INSTANCE_CREATE
job to Ganeti....

76a13815 03/20/2013 07:42 pm Christos Stavrakakis

Move UserCache from cyclades.common to lib.astakos

Move UserCache from synnefo.management.common to synnefo.lib.astakos.
Also, update ListCommand with 'astakos_url' and 'astakos_token' class
attributes, which must be declared only when 'user_uuid_field' is used.

225cea18 03/14/2013 03:58 pm Christos Stavrakakis

Move common code for mngmt commands to webproject

Move cyclades functions that are useful for all managament commands, like
pprint_table or parse_filters, to snf-webproject.

b0e7f310 03/14/2013 03:58 pm Christos Stavrakakis

Add ListCommand to be used for all *-list commands

Create a generic ListCommand to be user for all *-list management
commands. ListCommand handles must tasks that are common to all
management commands, like retrieving objects from db, filtering
results and formating output to a pretty table, json or csv....

426e4bda 03/11/2013 06:45 pm Christos Stavrakakis

Merge branch 'release-0.13' into develop

Conflicts:
version