Fix ceph incremental backup fail
Cinder _rbd_diff_transfer() uses "import-diff" and "export-diff" cmdline to do a incremental backup, it will fail without a ceph-conf file. Delay to delete temporary ceph-conf file in class RBDConnector during ceph volume backup. Change-Id: Ib74c85266b8c812f7a40dac293847a28768eae9a Partial-Bug: #1578036
This commit is contained in:
parent
455acbbcf1
commit
1fe844efaf
@ -120,8 +120,9 @@ class RBDConnector(base.BaseLinuxConnector):
|
||||
rbd_volume = linuxrbd.RBDVolume(rbd_client, volume)
|
||||
rbd_handle = linuxrbd.RBDVolumeIOWrapper(
|
||||
linuxrbd.RBDImageMetadata(rbd_volume, pool, user, conf))
|
||||
finally:
|
||||
except Exception:
|
||||
fileutils.delete_if_exists(conf)
|
||||
raise
|
||||
|
||||
return rbd_handle
|
||||
|
||||
@ -223,6 +224,7 @@ class RBDConnector(base.BaseLinuxConnector):
|
||||
if device_info:
|
||||
rbd_handle = device_info.get('path', None)
|
||||
if rbd_handle is not None:
|
||||
fileutils.delete_if_exists(rbd_handle.rbd_conf)
|
||||
rbd_handle.close()
|
||||
|
||||
def check_valid_device(self, path, run_as_root=True):
|
||||
|
Loading…
Reference in New Issue
Block a user