Merge "Backup manager: Synchronously call remove_export"
This commit is contained in:
commit
85530461b4
|
@ -1068,7 +1068,7 @@ class BackupManager(manager.SchedulerDependentManager):
|
||||||
if not is_snapshot:
|
if not is_snapshot:
|
||||||
rpcapi.terminate_connection(ctxt, device, properties,
|
rpcapi.terminate_connection(ctxt, device, properties,
|
||||||
force=force)
|
force=force)
|
||||||
rpcapi.remove_export(ctxt, device)
|
rpcapi.remove_export(ctxt, device, sync=True)
|
||||||
else:
|
else:
|
||||||
rpcapi.terminate_connection_snapshot(ctxt, device,
|
rpcapi.terminate_connection_snapshot(ctxt, device,
|
||||||
properties, force=force)
|
properties, force=force)
|
||||||
|
|
|
@ -231,9 +231,12 @@ class VolumeAPI(rpc.RPCAPI):
|
||||||
return cctxt.call(ctxt, 'terminate_connection', volume_id=volume['id'],
|
return cctxt.call(ctxt, 'terminate_connection', volume_id=volume['id'],
|
||||||
connector=connector, force=force)
|
connector=connector, force=force)
|
||||||
|
|
||||||
def remove_export(self, ctxt, volume):
|
def remove_export(self, ctxt, volume, sync=False):
|
||||||
cctxt = self._get_cctxt(volume.service_topic_queue)
|
cctxt = self._get_cctxt(volume.service_topic_queue)
|
||||||
cctxt.cast(ctxt, 'remove_export', volume_id=volume['id'])
|
if sync:
|
||||||
|
cctxt.call(ctxt, 'remove_export', volume_id=volume.id)
|
||||||
|
else:
|
||||||
|
cctxt.cast(ctxt, 'remove_export', volume_id=volume.id)
|
||||||
|
|
||||||
def publish_service_capabilities(self, ctxt):
|
def publish_service_capabilities(self, ctxt):
|
||||||
cctxt = self._get_cctxt(fanout=True)
|
cctxt = self._get_cctxt(fanout=True)
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
`Bug #1920237 <https://bugs.launchpad.net/cinder/+bug/1920237>`_: The
|
||||||
|
backup manager calls volume remove_export() but does not wait for it to
|
||||||
|
complete when detaching a volume after backup. This caused problems
|
||||||
|
when a subsequent operation started on that volume before it had fully
|
||||||
|
detached.
|
Loading…
Reference in New Issue