]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: deepsea: umount only existing OSD data partitions
authorNathan Cutler <ncutler@suse.com>
Sat, 10 Jun 2017 16:12:33 +0000 (18:12 +0200)
committerNathan Cutler <ncutler@suse.com>
Sun, 11 Jun 2017 04:22:47 +0000 (06:22 +0200)
This fixes the "end" (unwind) phase of the deepsea task so it unmounts OSD data
partitions only if they exist and are block devices (umount on a non-existent
partition can cause bogus test failure).

Signed-off-by: Nathan Cutler <ncutler@suse.com>
qa/tasks/deepsea.py

index d2d62e1e763addc5b7788621ed191d9cd303b484..6f571eff7a3212be240d23ccd57347beef63950f 100644 (file)
@@ -170,7 +170,7 @@ class DeepSea(Task):
                 .format(_remote.hostname))
             _remote.run(args=[
                 'sudo', 'sh', '-c',
-                'umount /dev/vdb2 ; umount /dev/vdc2'
+                'for f in vdb2 vdc2 ; do test -b /dev/$f && umount /dev/$f || true ; done'
                 ])
         super(DeepSea, self).end()