]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tests: ceph-disk cryptsetup close must try harder 7001/head
authorLoic Dachary <ldachary@redhat.com>
Wed, 6 Jan 2016 22:36:57 +0000 (23:36 +0100)
committerLoic Dachary <ldachary@redhat.com>
Wed, 6 Jan 2016 22:42:11 +0000 (23:42 +0100)
Similar to how it's done in dmcrpyt_unmap in master (
132e56615805cba0395898cf165b32b88600d633 ), the infernalis tests helper
that were deprecated by the addition of the deactivate / destroy
ceph-disk subcommand must try cryptsetup close a few times in some
contexts.

Signed-off-by: Loic Dachary <loic@dachary.org>
qa/workunits/ceph-disk/ceph-disk-test.py

index a2bbd018d30af7f22b8632edbe79bee5a388765f..0336e44a63354f74fe52a4821dd42a1db434b40d 100644 (file)
@@ -157,6 +157,7 @@ class CephDisk:
                 if partition['dmcrypt']:
                     holder = partition['dmcrypt']['holders'][0]
                     self.sh("cryptsetup close $(cat /sys/block/" + holder + "/dm/name) || true")
+                    self.sh("cryptsetup close $(cat /sys/block/" + holder + "/dm/name) || true")
         except:
             pass
         try:
@@ -166,6 +167,7 @@ class CephDisk:
             if partition['dmcrypt']:
                 holder = partition['dmcrypt']['holders'][0]
                 self.sh("cryptsetup close $(cat /sys/block/" + holder + "/dm/name) || true")
+                self.sh("cryptsetup close $(cat /sys/block/" + holder + "/dm/name) || true")
         except:
             pass
         self.sh("""