Remove unneeded arg from _clean_db (vol manager)
The context arg is not used by this method. Change-Id: Ie6dbec8b1a69c2180ac4f3812678d4837b4aac47
This commit is contained in:
parent
fdf7775f76
commit
de8d05dffa
|
@ -882,7 +882,7 @@ class VolumeManager(manager.CleanableManager,
|
||||||
volume.id)
|
volume.id)
|
||||||
for s in snapshots:
|
for s in snapshots:
|
||||||
if s.status != fields.SnapshotStatus.DELETING:
|
if s.status != fields.SnapshotStatus.DELETING:
|
||||||
self._clear_db(context, is_migrating_dest, volume,
|
self._clear_db(is_migrating_dest, volume,
|
||||||
'error_deleting')
|
'error_deleting')
|
||||||
|
|
||||||
msg = (_("Snapshot %(id)s was found in state "
|
msg = (_("Snapshot %(id)s was found in state "
|
||||||
|
@ -902,8 +902,7 @@ class VolumeManager(manager.CleanableManager,
|
||||||
resource=volume)
|
resource=volume)
|
||||||
# If this is a destination volume, we have to clear the database
|
# If this is a destination volume, we have to clear the database
|
||||||
# record to avoid user confusion.
|
# record to avoid user confusion.
|
||||||
self._clear_db(context, is_migrating_dest, volume,
|
self._clear_db(is_migrating_dest, volume, 'available')
|
||||||
'available')
|
|
||||||
return
|
return
|
||||||
except Exception:
|
except Exception:
|
||||||
with excutils.save_and_reraise_exception():
|
with excutils.save_and_reraise_exception():
|
||||||
|
@ -913,8 +912,7 @@ class VolumeManager(manager.CleanableManager,
|
||||||
if unmanage_only is True:
|
if unmanage_only is True:
|
||||||
new_status = 'error_unmanaging'
|
new_status = 'error_unmanaging'
|
||||||
|
|
||||||
self._clear_db(context, is_migrating_dest, volume,
|
self._clear_db(is_migrating_dest, volume, new_status)
|
||||||
new_status)
|
|
||||||
|
|
||||||
# If deleting source/destination volume in a migration or a temp
|
# If deleting source/destination volume in a migration or a temp
|
||||||
# volume for backup, we should skip quotas.
|
# volume for backup, we should skip quotas.
|
||||||
|
@ -958,7 +956,7 @@ class VolumeManager(manager.CleanableManager,
|
||||||
msg = "Unmanaged volume successfully."
|
msg = "Unmanaged volume successfully."
|
||||||
LOG.info(msg, resource=volume)
|
LOG.info(msg, resource=volume)
|
||||||
|
|
||||||
def _clear_db(self, context, is_migrating_dest, volume_ref, status):
|
def _clear_db(self, is_migrating_dest, volume_ref, status):
|
||||||
# This method is called when driver.unmanage() or
|
# This method is called when driver.unmanage() or
|
||||||
# driver.delete_volume() fails in delete_volume(), so it is already
|
# driver.delete_volume() fails in delete_volume(), so it is already
|
||||||
# in the exception handling part.
|
# in the exception handling part.
|
||||||
|
|
Loading…
Reference in New Issue