summaryrefslogtreecommitdiffstats
path: root/nova/scheduler/manager.py
diff options
context:
space:
mode:
authorRussell Bryant <rbryant@redhat.com>2012-09-21 13:51:15 -0400
committerRussell Bryant <rbryant@redhat.com>2012-09-21 14:35:10 -0400
commit75fa03557fd6f1e7c62079e9e89556f1af139202 (patch)
treec029f610a94b06d75c7cfd098642cbbf8c1b7afb /nova/scheduler/manager.py
parentb8b048166db93f4634eca372e00f36d5ac5741bb (diff)
downloadnova-75fa03557fd6f1e7c62079e9e89556f1af139202.tar.gz
nova-75fa03557fd6f1e7c62079e9e89556f1af139202.tar.xz
nova-75fa03557fd6f1e7c62079e9e89556f1af139202.zip
Set volume status to error if scheduling fails.
Fix bug 1053931. When scheduling volume creation fails, the volume was left with a status of 'creating'. This patch changes the scheduler manager to set the status to 'error' if scheduling fails. This matches the behavior of the cinder scheduler manager in this case. This particular issue was addressed in Cinder as a part of commit f758bde47439be52a743b2b4181d4900f2c1bc8a. Change-Id: Ieb453ab05b3b84de53f72323c536a9567555df1e
Diffstat (limited to 'nova/scheduler/manager.py')
-rw-r--r--nova/scheduler/manager.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/nova/scheduler/manager.py b/nova/scheduler/manager.py
index feffb584b..824dc9eb0 100644
--- a/nova/scheduler/manager.py
+++ b/nova/scheduler/manager.py
@@ -76,9 +76,9 @@ class SchedulerManager(manager.Manager):
context, volume_id, snapshot_id, image_id)
except Exception as ex:
with excutils.save_and_reraise_exception():
- self._set_vm_state_and_notify('create_volume',
- {'vm_state': vm_states.ERROR},
- context, ex, {})
+ LOG.warning(_("Failed to schedule create_volume: %(ex)s") %
+ locals())
+ db.volume_update(context, volume_id, {'status': 'error'})
def live_migration(self, context, instance, dest,
block_migration, disk_over_commit):