cyclades: Add script for adding name to NICs
Add migration script for adding a unique name to the NICs of all Ganetiinstances. Also, this script updates the firewall instance tags toinclude the NIC names and not the NIC index.
cyclades: Add name to Ganeti NICs
Add 'name' attribute to newly created NICs. Currently, the name of theNICs 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, thiscommit updates snf-dispatcher to preserve the name of the NIC, if any,...
cyclades: Catch exception in verify_personality
The verify_personality function assumes that the contents of apersonality is encoded in base64 and tries to decode them. But if theclient didn't encode them a TypeError `Incorrect padding' will beraised. Catch this exception and raise a BadRequest.
cyclades: Do not retry all Ganeti failed creations
Make snf-dispatcher retry only the OP_INSTANCE_CREATE jobs that faileddue to opportunistic locking. Such jobs include the 'ECODE_TEMP_NORES'error code in the opcode result. This commit makes snf-ganeti-eventd...
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: Check for all finalized states
plankton: Fix check about object permissions
Update check after getting an objects permissions to fail only if animage gets permissions from a None path and the object has permissions.Also, instead of just logging a warning, raise an exception.
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.
cyclades: Retrieve image names only if needed
Retrieve images from plankton only if the user asked for the image name.Otherwise just display the image ID. This will significantly speed upthe execution time of 'server-list' management command.
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...
Resolve some undefined names
Add missing imports; remove call to sqlite3_changes; set key and valin render_meta.
cyclades: Fix broken test
Mock getting image from plankton.
cyclades: Fix broken tests from commit #8936368
Commit #8936368 used the "size" attribute of images. This commitfixes mocked images of tests to contain this attribute.
Pass hashmap instead of location to snf-image
Update Cyclades, to pass as 'img_id' the hashmap('checksum') of theimage, instead of the location URL. In that way, snf-image does not anyaccess to the Pithos database.
Revert "wheezy: Rename depricated HttpRequest attribute"
This reverts commit cfc4b87c301504627e6a75ab2e4d32c8cd7a6e15. Thiscommit is reverted because it breaks compatibility with Django 1.2. Thisshould be applied for Synnefo 0.15.
Revert "wheezy: fix is_safe attribute of template filters"
This reverts commit 730fb3b0a0607bba95b90db1c6154cb7febb9187. Thiscommit is reverted because it breaks compatibility with Django 1.2. Thisshould be applied for Synnefo 0.15.
Revert "wheezy: Remove setup_environ"
This reverts commit a813a25117f3db14d5517f630d6d0e163a58b0f8. Thiscommit is reverted because it breaks compatibility with Django 1.2. Thisshould be applied for Synnefo 0.15.
reconciliation: Strip Ganeti IP addresses
Strip spaces from Ganeti IP addresses, since they are not automaticallyignored in newer versions of ipaddr.
wheezy: Rename depricated HttpRequest attribute
From django docs:""" HttpRequest.raw_post_data renamed to HttpRequest.body
This attribute was confusingly named HttpRequest.raw_post_data, but itactually provided the body of the HTTP request. It’s been renamed to...
wheezy: fix is_safe attribute of template filters
In Django 1.4 'is_safe' and 'needs_autoescape' attributes has been madekeyword arguments of @register.filter
wheezy: Remove setup_environ
From Django docs:""" This function temporarily modified sys.path in order to make the parent“project” directory importable under the old flat startproject layout.This function is now deprecated, as its path workarounds are no longer...
cyclades: Remove commit_manually decorator
Replace commit_manually decorator with commit_on_success. Since networkis no longer created in DB in the API request, the manually decorator isno longer needed.
wheezy: Temporary disable reconciliation tests
Temporary disable reconciliation tests because they still run withfixture data, that are not loaded correctly.
wheezy: urls module doesn't export defaults
wheezy: Update Django dependency to <=1.4.5
Fix missing import and broken test
Update South dependency to >=0.7.3
helpdesk: Fix network interface queryset
helpdesk: Exclude nics of deleted vms
when helpdesk users search using ip address
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...
Merge branch 'feature-ui-footer-extra-message' into hotfix-0.14.6
cyclades: Fix unbound reference
Set backend to None if not specified.
branding: new setting FOOTER_EXTRA_MESSAGE
FOOTER_EXTRA_MESSAGE setting appears above Copyright message at theCompute templates and the Dashboard UI. Accepts html tags.
cyclades: Simplify code
Simplify code by removing unnecessary temp variable.
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...
common: Strip trailing slash from endpoints
Remove trailing slash from the endpoints' publicURL field in servicedefinitions. These values end up in the response of POST /tokens, and,according to the keystone API, should not end in slash. A trailing slash...
cyclades: Add newline
cyclades: Fix bug in snf-dispatcher logic
This commit reverts commits #07602322 and #30514662 which introduced abug in dispatcher's logic. These commit fixed the issue that, in a casethe Cyclades DB is unsynced with Ganeti, a resource that does not exist...
Move context_processors from common to middleware
cyclades ui: Enable RDP clipboard sharing by default
in default RDP connection profile served by synnefo
cyclades ui: Prefer os meta to identify connection user
How vm connection user gets resolved:
- Use the last user in `users` vm metadata if exists- Use the last user in `users` vm image metadata if exists- Use root if vm's image osfamily metadata is Linux...
cyclades ui: Update OS images names
use libguestfs naming convention
redhat -> rhelsuse -> opensuse (also cloned as sles)
plankton: Make pithos backend pool size a setting
Make the pool size of the pithos backends a configurable setting,namely PITHOS_BACKEND_POOL_SIZE.
cyclades: Fix corner case in snf-dispatcher
Same as commit 0514662, but for servers.
cyclades: Add disk template to flavors fixture
Delete network from DB when job fails but the action of network isDESTROY. This case appears when someone tries to remove a network thathas been deleted from Ganeti backend, but not yet from DB.
cyclades: Fix misleading message in network-remove
reconciliation: Get servers from DB ater ganeti
Change server reconciliation, to get the instances from DB after gettinginstances from Ganeti, to decrease the possibility for races.
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, becauseotherwise, the lock of the vm (select_for_update) is released too early....
cyclades: Fix --image-name option in server-list
Fix regressions in snf-manage list commands
Revert "cyclades: Speed up reconciliation"
This reverts commit cf2241c45a22dac71e31dbf32f4700c475804c12.
cyclades: Fix bug in setup.py
muliprocessing is included in python 2.6
cyclades: Speed up reconciliation
Speed up reconciliation by using mulitprocessing to get in parallelthe instances from all Ganeti backends.
cyclades: Fix bug in allocating archipelago VMs
This commit fixes a bug that caused backend allocator to sendarchipelago VMs backends to backends not in ARCHIPELAGO_BACKENDSsetting. The flavor disk template is parsed before the backendallocation, so the disk_template at this point is ext and not ext_vlmc,...
cyclades: Fix VMs console incorrect background
cyclades: remove VMAPI_BASE_URL references
vmapi: Return cloud faults from vmapi endpoint
vmapi skippede from commit 269ac8d.
cyclades: Speed up server reconciliation
Speed up reconciliation, by increasing the time interval to get Ganetijob status for VMs in building state.
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...
helpdesk: Typo fix
cyclades: Set supported serialization in stats view
cyclades: Implement show extension API endpoint
Dummy implementation of /extensions/<alias> endpoint that always returns404.
cyclades: Implement /extensions API endpoint
cyclades: Validate MAC prefix in pool-create cmd
cyclades: api_method_not_allowed typo's
cyclades: Test invalid http method endpoint calls
cyclades: Sync API tests with latest API changes
helpdesk: Include UI_MEDIA_URL in template context
variable used as prefix for vm os icon urls
helpdesk: Detect existing accounts with no active vms
cyclades: Fix typo in links
cyclades ui: In sync with latest API changes
Handle updated servers/detail response format.
cyclades: Add 'links' to images API
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
plankton: Handle case of images without name
cyclades: Remove obsolete settings
Remove obsolete GANETI_DISK_TEMPLATES and DEFAULT_GANETI_DISK_TEMPLATEsettings.
cyclades: Rename poolsize settings for uniformity
Rename ASTAKOS_POOLSIZE to CYCLADES_ASTAKOSCLIENT_POOLIZE;expose it to the conf file.
cyclades: Pass disk origin for all 'ext' flavors
cyclades: remove API_ROOT_URL from conf
cyclades: Enable jsonp response in admin stats api
cyclades: Remove "help" url in empty vms page
Include snf-webproject in snf-*-app required packages
webproject contains django command line utils which are imported from synnefoapps packages.
webproject: Disable APPEND_SLASH setting by default
cyclades: Implement /admin/stats API call
Implement API call to server statistics about servers and networks.