mirror of
https://github.com/ceph/ceph
synced 2025-01-30 23:13:44 +00:00
tests: teardown on ceph-disk error
The activate_dev error must kill all process with teardown before attempting to umount the devices when an error happens. Otherwise the device fails to be unmounted and the loop devices are never freed. Signed-off-by: Loic Dachary <ldachary@redhat.com>
This commit is contained in:
parent
51f5feccac
commit
8d52dc185e
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2014 Cloudwatt <libre.licensing@cloudwatt.com>
|
||||
# Copyright (C) 2014 Red Hat <contact@redhat.com>
|
||||
# Copyright (C) 2014, 2015 Red Hat <contact@redhat.com>
|
||||
#
|
||||
# Author: Loic Dachary <loic@dachary.org>
|
||||
#
|
||||
@ -350,6 +350,7 @@ function test_activate_dev() {
|
||||
|
||||
activate_dev_body $disk $journal $newdisk
|
||||
status=$?
|
||||
test $status != 0 && teardown
|
||||
|
||||
destroy_dev vdf.disk $disk
|
||||
destroy_dev vdg.disk $journal
|
||||
@ -399,6 +400,7 @@ function test_activate_dmcrypt_dev() {
|
||||
|
||||
activate_dmcrypt_dev_body $disk $journal $newdisk
|
||||
status=$?
|
||||
test $status != 0 && teardown
|
||||
|
||||
destroy_dmcrypt_dev vdf.disk $disk
|
||||
destroy_dmcrypt_dev vdg.disk $journal
|
||||
|
Loading…
Reference in New Issue
Block a user