summaryrefslogtreecommitdiffstats
path: root/nova/volume
diff options
context:
space:
mode:
authorJohn Griffith <john.griffith@solidfire.com>2012-09-13 11:44:51 -0600
committerJohn Griffith <john.griffith@solidfire.com>2012-09-13 13:38:12 -0600
commitb7f140351acf63c0054fc772edff2328fac3fcfb (patch)
tree643f920acae72b9d86cfa2b8795cbeabd090ab2f /nova/volume
parent9d791c1225d4923a8e25060490b931c669e4424d (diff)
downloadnova-b7f140351acf63c0054fc772edff2328fac3fcfb.tar.gz
nova-b7f140351acf63c0054fc772edff2328fac3fcfb.tar.xz
nova-b7f140351acf63c0054fc772edff2328fac3fcfb.zip
Add a resume delete on volume manager startup
Currently if for some reason the volume service was stopped during the zero out operation of a volume delete there was no way to get the volume removed from the system (it would be present in deleting status forever). This change adds a simple check of volumes in the DB with status of deleting, and if any are found it restarts the delete process on them. addresses bug #1011150 Change-Id: I6aa26e9eaa94da4b620f01160931cbfcad9dadf7
Diffstat (limited to 'nova/volume')
-rw-r--r--nova/volume/manager.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/nova/volume/manager.py b/nova/volume/manager.py
index 77f4aee23..0631925ad 100644
--- a/nova/volume/manager.py
+++ b/nova/volume/manager.py
@@ -105,6 +105,12 @@ class VolumeManager(manager.SchedulerDependentManager):
else:
LOG.info(_("volume %s: skipping export"), volume['name'])
+ LOG.debug(_('Resuming any in progress delete operations'))
+ for volume in volumes:
+ if volume['status'] == 'deleting':
+ LOG.info(_("Resuming delete on volume: %s"), volume['id'])
+ self.delete_volume(ctxt, volume['id'])
+
def create_volume(self, context, volume_id, snapshot_id=None,
reservations=None):
"""Creates and exports the volume."""