Browse Source

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

changes/01/678601/1
Zuul 3 weeks ago
parent
commit
9422e0a596
1 changed files with 7 additions and 7 deletions
  1. 7
    7
      cinder/backup/drivers/ceph.py

+ 7
- 7
cinder/backup/drivers/ceph.py View File

@@ -645,15 +645,15 @@ class CephBackupDriver(driver.BackupDriver):
645 645
                                         base_name, read_only=True))
646 646
         try:
647 647
             snaps = base_rbd.list_snaps()
648
-        finally:
649
-            base_rbd.close()
650 648
 
651
-        if snaps is None:
652
-            return False
649
+            if snaps is None:
650
+                return False
653 651
 
654
-        for snap in snaps:
655
-            if snap['name'] == snap_name:
656
-                return True
652
+            for snap in snaps:
653
+                if snap['name'] == snap_name:
654
+                    return True
655
+        finally:
656
+            base_rbd.close()
657 657
 
658 658
         return False
659 659
 

Loading…
Cancel
Save