Merge "Fix ceph: only close rbd image after snapshot iteration is finished" into stable/stein

This commit is contained in:
Zuul 2019-08-23 16:24:07 +00:00 committed by Gerrit Code Review
commit 9422e0a596
1 changed files with 7 additions and 7 deletions

View File

@ -645,8 +645,6 @@ class CephBackupDriver(driver.BackupDriver):
base_name, read_only=True))
try:
snaps = base_rbd.list_snaps()
finally:
base_rbd.close()
if snaps is None:
return False
@ -654,6 +652,8 @@ class CephBackupDriver(driver.BackupDriver):
for snap in snaps:
if snap['name'] == snap_name:
return True
finally:
base_rbd.close()
return False