diff options
| author | John Garbutt <john@johngarbutt.com> | 2013-03-14 15:41:47 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2013-05-15 14:13:06 +0000 |
| commit | 72e75dbcea66e6e4e2b0f5a931dcd647b2032ad6 (patch) | |
| tree | 652f3a37e97a713ace7a016566dbcd1ad3be42df /nova/compute | |
| parent | af7823f5e7d4533f35841936a6c6fe1cdece6233 (diff) | |
xenapi: ensure vdi is not too big when resizing down
Fix for bug 1155066
This change adds some rollback into the resize disk down
code within xenapi, and reports a better error message
when the disk is too big to resize down.
On a successful rollback, the user is notified of the error
by the instance actions, rather than leaving
the server in the error state.
The user is then able to free up some disk space such that
the resize can work correctly.
Change-Id: Ibad568ab3cfb9caaf4fe002572c8cda973d501a7
Diffstat (limited to 'nova/compute')
| -rwxr-xr-x | nova/compute/manager.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py index 79903f854..7bc8281d4 100755 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -4117,6 +4117,13 @@ class ComputeManager(manager.SchedulerDependentManager): reservations=None): try: yield + except exception.InstanceFaultRollback, error: + self._quota_rollback(context, reservations) + msg = _("Setting instance back to ACTIVE after: %s") + LOG.info(msg % error, instance_uuid=instance_uuid) + self._instance_update(context, instance_uuid, + vm_state=vm_states.ACTIVE) + raise error.inner_exception except Exception, error: with excutils.save_and_reraise_exception(): self._quota_rollback(context, reservations) |
