summaryrefslogtreecommitdiffstats
path: root/nova/compute
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Handle UnexpectedTaskState and InstanceNotFound exceptions"Jenkins2013-07-011-40/+61
|\
| * Handle UnexpectedTaskState and InstanceNotFound exceptionssridevik2013-07-011-40/+61
| | | | | | | | | | | | | | | | | | | | | | | | UnexpectedTaskState and InstanceNotFound are thrown when a delete of the instance happens before the ongoing action is completed. These are to be handled gracefully. These exceptions have to be logged and not reraised, as they are false alarms. Fixes: bug #1186447 Change-Id: I0647935c4452d4294f49a4c0d08e480584ebec7c
* | Merge "Fix for failure of periodic instance cleanup"Jenkins2013-07-011-3/+4
|\ \ | |/ |/|
| * Fix for failure of periodic instance cleanupDavid McNally2013-06-261-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The periodic task to identify and (optionally) delete instances which are running on the host but marked as deleted in the nova database currently fails if the option to delete is selected. This failure is because the instance data returned from the query in nova.compute.manager:_get_instances_on_driver does not include the system metadata expected by nova.compute.flavors:extract_instance_type. This change alters _get_instances_on_driver so the calling function can specify columns_to_join which is used in the call to instance_get_all_by_filters (leaving this set to None, rather than [] as it is currently, joins the default columns which includes the required system metadata). bug: 1190206 Change-Id: I44aecebdb4d0e20e52fdd59b46a022483cdd19d5
* | Merge "Allow retrying network allocations separately"Jenkins2013-06-281-19/+50
|\ \
| * | Allow retrying network allocations separatelyChris Behrens2013-06-261-19/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a new config option, 'network_allocate_retries', that allows one to retry network allocations. The default is 0 for no retries to match the current behavior. The network allocations currently get retried by a full retry of a build via the scheduler, if those are enabled. This patch reduces the need to re-schedule for simple network allocation issues. The retrying happens in the network alloc async greenthread, so for virt drivers that support the new NetworkModel, the retrying potentially happens in the background while the image is being downloaded, etc. DocImpact Change-Id: I1a5fdcccbb736fc0b1d8c0cbc3b45a8372a6aef7
* | | Merge "Ignore lifecycle events for non-existent instances"Jenkins2013-06-281-1/+5
|\ \ \
| * | | Ignore lifecycle events for non-existent instancesPeter Feiner2013-06-271-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since event delivery is asynchronous, there's an inherent yet benign race in the event handler querying the database for a deleted instance. Fixes bug #1180501. Change-Id: I8e478fb13bedfc86730018ba849ecc71d4286f0d
* | | | Remove broken config_drive image_href support.Chris Behrens2013-06-261-18/+15
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | image_href support has not been working since at least shortly before Folsom release. This is a good indication that this functionality is not used. As far as I can tell, the docs also do not match what was supported. An image ID was required, but docs show examples with full hrefs. DocImpact http://docs.openstack.org/developer/nova/api_ext/ext_config_drive.html References to supporting image_hrefs should be removed. This patch also removes the hack that passed a config_drive_id via the Instance dictionary when config_drive_id is not a valid Column for Instance. Fixes bug 1186401 Change-Id: Iced7bc8e278cb9f208183f1dbb7a293675a47eae
* | | Merge "Cells: Add support for global cinder"Jenkins2013-06-261-3/+1
|\ \ \
| * | | Cells: Add support for global cinderChris Behrens2013-06-111-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements cinder support for compute cells when cinder is a global installation. Adds syncing of the block device mapping table between child cells and API cells. Implements blueprint cells-cinder-support Change-Id: Ife5be9922db0742c8ee4f970517396be86597cce
* | | | Merge "Refactor db.security_group_get() instance join behavior"Jenkins2013-06-261-3/+4
|\ \ \ \ | |_|_|/ |/| | |
| * | | Refactor db.security_group_get() instance join behaviorDan Smith2013-06-221-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, security_group['instances'] is always joined when we do a db.security_group_get(). This patch adds the growingly- conventional columns_to_join argument to the call, allowing us to selectively choose when we want to make this expensive join operation. Related to unified-object-model Change-Id: I1945365c8cf03c027fd143f677cbd6d63a7f8122
* | | | Refresh volume connections when starting instancesBrent Eagles2013-06-251-2/+14
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patches adds network and block device information to the signature of the power_on method on the virtualization driver. The relevant call sites are also modified to provide the required information. The libvirt implementation of power_on has been altered to re-establish network and volume related connections. Fixes bug: 1188326 Change-Id: If617b570e082e3aa321414a2680a3aa0754f6153
* | | Merge "Fix orphaned instance from get_by_uuid() and _from_db_object()"Jenkins2013-06-241-1/+2
|\| |
| * | Fix orphaned instance from get_by_uuid() and _from_db_object()Dan Smith2013-06-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to set _context on the Instance object we create during get_by_uuid(), but more specifically during _from_db_object(). In order to properly initialize things like nested objects that themselves need a _context, we should pass it to _from_db_object() always. Same thing for InstanceInfoCache. Related to blueprint unified-object-model Change-Id: I09ab6b5d7d8961b69294536885e8432943b3a611
* | | Merge "Handle NoMoreFixedIps in _shutdown_instance."Jenkins2013-06-241-1/+1
|\ \ \
| * | | Handle NoMoreFixedIps in _shutdown_instance.Yufang Zhang2013-06-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug 1192893 If no fixed ips is found, continue to perform the rest of the instance shutdown, instead of propogating the exception. Steps to reproduce: 1. Create a network 2. Reserve all fixed ips of the network 3. Try to create an instance but failed 4. Try to delete the instance Results: Cannot delete the instance due to the 'NoMoreFixedIps' exception. Change-Id: I42776c427773f1f81c16062a9aaa54850ec68bfd
* | | | Add invalid number checking in flavor creation apijiataotj2013-06-241-7/+7
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Flavor creation api doesn't check whether 'memory_mb' argument number is integer,add invalid number checking into the flavor creation function to remind the user to input right value Fixes bug #1171278 Change-Id: I8308f66c485d8c872864661148e9eac7b685e406
* | | Merge "Fix sys_meta access in prep for instance object"Jenkins2013-06-222-9/+7
|\ \ \
| * | | Fix sys_meta access in prep for instance objectChris Behrens2013-06-212-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix various places that access instance['system_metadata'] as if it's a list of sqlalchemy models. A helper util method was created in a previous patch set in nova/utils... so this patch converts things to use it. Left one use in _init_instance() in compute/manager.py because it's being addressed with a different patch set. Related to blueprint unified-object-model Change-Id: I876a6c57f64d61d64069c884bf0414c3596e1aa0
* | | | Merge "Allow reboot or rebuild from vm_state=Error"Jenkins2013-06-211-8/+23
|\ \ \ \
| * | | | Allow reboot or rebuild from vm_state=ErrorPhil Day2013-06-161-8/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In general most operations are only valid on an instance that has booted successfully at least once so this change extends the instance state check logic to include evidence that the instance has been successfully started at least once. This enables more operations to be allowed in against instances in an Error state. For example reboot and rebuild are useful recover options for an instance which has reached an error state, but not if the instance failed during its initial build. With this change the only actions allowed on an instance which has never booted successfully are delete and force_delete. Soft delete is not allowed, as the restore is in effect a start unless there is specific virt driver support. In addition the following actions are now allowed against instances in an Error state providing the instance has booted at least once: Reboot, Rebuild, and Rescue. Fixes bug: 1183946 Change-Id: I63fd8d2a182df5cf12754892e8076933b3b1e79f
* | | | | Make _poll_unconfirmed_resizes() use objectsDan Smith2013-06-201-2/+2
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the _poll_unconfirmed_resizes() periodic task use objects for looking up the instance state information. This patch also makes compute_confirm_resize() take instance objects. Although this method will be obsolete after a full conversion to objects, this makes it send a full instance object to the conductor manager, which is then converted to a dict for passing to compute_api (for now). This will allow a more complete conversion of the use of it to objects, and then the dict hack will be removed when the method itself goes away. Related to blueprint unified-object-model Change-Id: I03c1a28a1bbd9732f803e140e93d214dd5c7792e
* | | | Merge "Remove a layer of nesting in _poll_unconfirmed_resizes()"Jenkins2013-06-201-56/+58
|\ \ \ \
| * | | | Remove a layer of nesting in _poll_unconfirmed_resizes()Dan Smith2013-06-191-56/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This simply changes the logic atop _poll_unconfirmed_resizes() and de-indents everything that was nested underneath by four spaces. It makes it much easier to work on without the useless extra level of nesting. Change-Id: I0d65fe2d1fc2649e0527ecbed1e6682b3da52b2b
* | | | | Merge "Use InstanceList for _heal_instance_info_cache()"Jenkins2013-06-201-6/+6
|\| | | |
| * | | | Use InstanceList for _heal_instance_info_cache()Dan Smith2013-06-191-6/+6
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes _heal_instance_info_cache() use InstanceList for the all-by-host query. Related to blueprint unified-object-model Change-Id: I93872a35ff249bbeb7d02bfe54a7d83676aa447a
* | | | Merge "Adding fixed_ip in create.end notification"Jenkins2013-06-201-7/+8
|\ \ \ \ | |/ / / |/| | |
| * | | Adding fixed_ip in create.end notificationKaushik Chandrashekar2013-06-141-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sending the network information for an instance in the create.end notification. Fixes bug 1185076 Change-Id: Iabe088ed23736d7b1ee97624761445023aab22c2
* | | | Merge "Remove trivial cases of unused variables (1)"Jenkins2013-06-181-1/+1
|\ \ \ \
| * | | | Remove trivial cases of unused variables (1)Stanislaw Pitucha2013-06-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Kill some of the variables marked as unused by flakes8. This should allow to enable F841 check in the future. Only trivial cases with no function calls and obviously pure functions (like datetime.now(), or len()) are cleaned up here. Part 1, split to reduce conflicts. Change-Id: I82854349574ec4bcb9336aba626eefdaed81a8c8
* | | | | Merge "Add rpc client side version control."Jenkins2013-06-181-1/+18
|\ \ \ \ \
| * | | | | Add rpc client side version control.Russell Bryant2013-06-141-1/+18
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a first pass at client side version control for rpc. It allows you to configure a max version of messages that clients are allowed to send. You can find one example of how clients need to adapt in the conductor rpcapi. All other changes in rpc apis since the grizzly release are not applicable to this. Some future improvements to this could be reporting the versions supported by running services and having that be discoverable via the API. We could also consider allow setting these client side version caps via the API. For now, recommended values for these config options while attempting a rolling upgrade will just have to be documented. The config options allow specifying specific rpc api version numbers if desired, but an alias of 'grizzly' is also supported. So typically at the start of a rolling upgrade you'd have: [upgrade_levels] compute=grizzly conductor=grizzly scheduler=grizzly ... etc ... And as you update all instances of a service, you would remove that bit from your configuration across the deployment using your config management system of choice. DocImpact Implements blueprint rpc-version-control. Change-Id: I2c0fd6dd7484c87823846d7c31d6525d93cd1b43
* | | | | Merge "Allow confirm_resize if instance is in 'deleting' status"Jenkins2013-06-171-1/+2
|\ \ \ \ \ | |_|_|/ / |/| | | |
| * | | | Allow confirm_resize if instance is in 'deleting' statusAditi Raveesh2013-06-131-1/+2
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Deleting an instance puts it into 'deleting' task_state. If the instance is in 'resized' vm_status, this tries a confirm_resize on the instance. confirm_resize currently expects the task_state to be None. It should instead expect None/deleting task_state. Fixes bug: 1189391 Change-Id: I6a3f82eab9ed2242bfd38bc1ac760dbb4b3d8c4a
* | | | Merge "Fix bad vm_state change in reboot_instance()"Jenkins2013-06-151-15/+33
|\ \ \ \
| * | | | Fix bad vm_state change in reboot_instance()Phil Day2013-06-141-15/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently reboot_instance() in the compute manager changes the vm_state to active before it does anything else. This means that if there is an error in the reboot operation then the vm_state is left as active although the instance may not be running. This change leaves the vm_state alone until the reboot has completed If the reboot fails but the power_state shows that it is running then we log the fault but leave it in an active or rescued state If the reboot fails and the power_state shows that it is not running then we set vm_state to error See also https://bugs.launchpad.net/nova/+bug/1183946 which make recovery from an Error state possible. Fixes bug: 1188343 Change-Id: Idabd358d3bcaf63e21ff59188f805143dbaf9ada
* | | | | Merge "Fix quota checks while resizing up by admin"Jenkins2013-06-151-4/+9
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Fix quota checks while resizing up by adminAarti Kriplani2013-06-041-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes LP 1184594 Fixing a bug when admin issues a resize up for a user, it checks for admin's quota instead of user's quota. Change-Id: Ida5db9039396df0a08c699711b72882e2ef136f8
* | | | | Merge "Make sync_power_state routines use InstanceList"Jenkins2013-06-132-22/+11
|\ \ \ \ \
| * | | | | Make sync_power_state routines use InstanceListDan Smith2013-06-132-22/+11
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the periodic sync_power_states task use InstanceList objects instead of querying conductor directly. This also affects handle_lifecycle_event() as well, which now uses Instance to fetch the instance for the event. Note that none of the power state sync code was covered by unit tests, so this adds that as well to verify the behavior and instance object usage. Also note that compute_stop is already instance-object- ready, so passing one to it is okay. Related to blueprint unified-object-model Change-Id: I4e34e0a2b9db77468305aaf1782feb74bcfdccbd
* | | | | Merge "Sending volume IO usage broken"Jenkins2013-06-132-7/+10
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Sending volume IO usage brokenMichael Kerrin2013-06-072-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is my fault, I didn't test the sending of notifications enough when fixing bug 1182102, when the volume IO usage notifications were been sent too often. This was merged as part of https://review.openstack.org/#/c/29915 The issue was that the code worked for the first IO usage event (the one I looked at). Then when constructing the event payload for the second and following IO usage events the code path ended up comparing a datetime object from the db with a cached string representation of the last_refreshed date that was passed into the conductor via the RPC. Since last_refreshed argument to vol_usage_update in the db layer is not needed and is causing these issues. I have removed last_refreshed argument from the db layer and deprecated it from the conduction API. Change-Id: I2030eb7912c56134ea688a6e8bbfcdeddca28307
* | | | | Merge "Fix and enable H403 tests"Jenkins2013-06-133-12/+22
|\ \ \ \ \
| * | | | | Fix and enable H403 testsDirk Mueller2013-06-123-12/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Multi-line doc-strings should end on a new, separate line. Change-Id: I4cf0cfe92b634ef77971863a4df41ef43531bc20
* | | | | | Merge "Remove unused methods from VirtAPI"Jenkins2013-06-131-8/+0
|\ \ \ \ \ \
| * | | | | | Remove unused methods from VirtAPIDan Smith2013-06-071-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The instance_get_all_by_host() and instance_get_by_uuid() methods are no longer needed by any virt drivers, so remove them from the virtapi.. Related to blueprint unified-object-model Change-Id: Ib51bf3b3e068d69e7a75f7312f03db6c85e7cf49
* | | | | | | Merge "Remove usage of locals() from manager.py"Jenkins2013-06-131-91/+99
|\ \ \ \ \ \ \
| * | | | | | | Remove usage of locals() from manager.pyEugene Nikanorov2013-06-121-91/+99
| | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fixes bug 1171936 Change-Id: Ic137327b8637104cd4b330850becd80ba20c1e1c