From c144305d3e6b68bc9f85641a5038013fdc07b5a2 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Wed, 4 Dec 2013 17:05:44 +0100 Subject: [PATCH] tests: update pvmove-test Do not lock test when trying to grab cluster lock. There seems to be still something weird in this test so it still needs some inspection. --- test/shell/pvmove-restart.sh | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/test/shell/pvmove-restart.sh b/test/shell/pvmove-restart.sh index c8da45eaf..e1d5381c8 100644 --- a/test/shell/pvmove-restart.sh +++ b/test/shell/pvmove-restart.sh @@ -33,16 +33,37 @@ PVMOVE=$! # Let's wait a bit till pvmove starts and kill it sleep 1 kill -9 $PVMOVE +wait # Simulate reboot - forcibly remove related devices dmsetup remove $vg-$lv1 dmsetup remove $vg-pvmove0 +if test -e LOCAL_CLVMD ; then + # giveup all clvmd locks (faster then restarting clvmd) + # no deactivation happen, nodes are already removed + vgchange -an $vg + # Restart clvmd + #kill $(cat LOCAL_CLVMD) + #while test -e "/var/run/clvmd.pid"; do echo -n .; sleep .1; done # wait for the pid removal + #aux prepare_clvmd +fi + +if test -e LOCAL_LVMETAD ; then + # Restart lvmetad + kill $(cat LOCAL_LVMETAD) + aux prepare_lvmetad +fi + # Only PVs should be left in table... dmsetup table # Restart pvmove -vgchange -ay $vg +# use exclusive activation to have usable pvmove without cmirrord +#vgchange -vvvv -ay $vg +vgchange -aey $vg +dmsetup table +#pvmove pvmove --abort