]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
tests: improve ceph-disk.sh setup/teardown
authorLoic Dachary <ldachary@redhat.com>
Wed, 1 Apr 2015 12:44:17 +0000 (14:44 +0200)
committerLoic Dachary <ldachary@redhat.com>
Sun, 5 Apr 2015 23:58:18 +0000 (01:58 +0200)
commitc583b57670c37affa6d8005aa97718d92d1de788
treee62f00db05b175c99358a681dbaa888dff24474a
parenteaf89661d9cb51551697ef14118dd27212a874f5
tests: improve ceph-disk.sh setup/teardown

Address all possible failure cases, when ceph-disk.sh completes or when
it starts with leftover from a previous interrupted run. It is assumed
that ceph-disk.sh will crash at any point.

* umount all mount points that belong to ceph-disk.sh (check the
  absolute path of the directory)
* dmsetup remove all device mapper nodes found to hold a loop device
  that ceph-disks.sh no longer uses
* losetup --detach all loop devices that ceph-disks.sh no longer uses

Signed-off-by: Loic Dachary <ldachary@redhat.com>
src/test/ceph-disk.sh