Merge "Fix ceph: only close rbd image after snapshot iteration is finished"
This commit is contained in:
commit
3fd38895f2
@ -645,16 +645,16 @@ class CephBackupDriver(driver.BackupDriver):
|
||||
base_name, read_only=True))
|
||||
try:
|
||||
snaps = base_rbd.list_snaps()
|
||||
|
||||
if snaps is None:
|
||||
return False
|
||||
|
||||
for snap in snaps:
|
||||
if snap['name'] == snap_name:
|
||||
return True
|
||||
finally:
|
||||
base_rbd.close()
|
||||
|
||||
if snaps is None:
|
||||
return False
|
||||
|
||||
for snap in snaps:
|
||||
if snap['name'] == snap_name:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def _backup_rbd(self, backup, volume_file, volume_name, length):
|
||||
|
Loading…
x
Reference in New Issue
Block a user