diff options
| author | Unmesh Gurjar <unmesh.gurjar@vertex.co.in> | 2012-04-18 11:10:02 +0530 |
|---|---|---|
| committer | Unmesh Gurjar <unmesh.gurjar@vertex.co.in> | 2012-04-18 11:10:02 +0530 |
| commit | 4eafbbeb6545dddedb88f8e3d14c7dc13bbf24c5 (patch) | |
| tree | bca0fac355b1171216d53ad6834cb431d7424980 /nova | |
| parent | c457ec03806269785c994af9b75383a0f52d628d (diff) | |
| download | nova-4eafbbeb6545dddedb88f8e3d14c7dc13bbf24c5.tar.gz nova-4eafbbeb6545dddedb88f8e3d14c7dc13bbf24c5.tar.xz nova-4eafbbeb6545dddedb88f8e3d14c7dc13bbf24c5.zip | |
Updated instance state on resize error.
Fixes bug 980685.
Set instance vm_state to ERROR if network node down during resize.
Change-Id: I2e2f7a98be4b2edfc7d51a4d8d9e31b7b418f2ba
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/compute/manager.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py index bf6ff476a..c77f7fc4c 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -1317,7 +1317,14 @@ class ComputeManager(manager.SchedulerDependentManager): instance_type_ref = self.db.instance_type_get(context, migration_ref.new_instance_type_id) - network_info = self._get_instance_nw_info(context, instance_ref) + try: + network_info = self._get_instance_nw_info(context, instance_ref) + except Exception, error: + with utils.save_and_reraise_exception(): + msg = _('%s. Setting instance vm_state to ERROR') + LOG.error(msg % error) + self._set_instance_error_state(context, instance_uuid) + self.db.migration_update(context, migration_id, {'status': 'migrating'}) |
