1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

tests: adapt waiting for pvmove start

Previous commit cause the pvmove could actually be started in unexpected
order - so make sure, we are not starting new pvmove in same VG until
the previous one is started.
This commit is contained in:
Zdenek Kabelac 2023-04-25 19:51:52 +02:00
parent 7f2939d328
commit ffead4f333
3 changed files with 4 additions and 9 deletions

View File

@ -2025,11 +2025,6 @@ wait_pvmove_lv_ready() {
test -e LOCAL_LVMPOLLD && die "Waiting for lvmpolld timed out" test -e LOCAL_LVMPOLLD && die "Waiting for lvmpolld timed out"
die "Waiting for pvmove LV to get activated has timed out" die "Waiting for pvmove LV to get activated has timed out"
# TODO: remove, uneedeed ??
# Adding settle here, to avoid remove, before processing of 'add' is finished
# (masking systemd-udevd issue)
#udev_wait 2 || true
} }
# Holds device open with sleep which automatically expires after given timeout # Holds device open with sleep which automatically expires after given timeout

View File

@ -53,10 +53,10 @@ cmd3=(pvmove -i1 $backgroundarg $mode -n $vg1/$lv1 "$dev4" "$dev6")
if test -z "$backgroundarg" ; then if test -z "$backgroundarg" ; then
"${cmd1[@]}" & "${cmd1[@]}" &
aux wait_pvmove_lv_ready "$vg-pvmove0"
"${cmd2[@]}" & "${cmd2[@]}" &
"${cmd3[@]}" & "${cmd3[@]}" &
aux wait_pvmove_lv_ready "$vg-pvmove0" "$vg-pvmove1" "$vg1-pvmove0" aux wait_pvmove_lv_ready "$vg-pvmove1" "$vg1-pvmove0"
lvs -a $vg $vg1
else else
LVM_TEST_TAG="kill_me_$PREFIX" "${cmd1[@]}" LVM_TEST_TAG="kill_me_$PREFIX" "${cmd1[@]}"
LVM_TEST_TAG="kill_me_$PREFIX" "${cmd2[@]}" LVM_TEST_TAG="kill_me_$PREFIX" "${cmd2[@]}"

View File

@ -42,13 +42,13 @@ cmd2=(pvmove -i1 $backgroundarg $mode "$dev2" "$dev3")
if test -z "$backgroundarg" ; then if test -z "$backgroundarg" ; then
"${cmd1[@]}" & "${cmd1[@]}" &
aux wait_pvmove_lv_ready "$vg-pvmove0"
"${cmd2[@]}" & "${cmd2[@]}" &
aux wait_pvmove_lv_ready "$vg-pvmove0" "$vg-pvmove1" aux wait_pvmove_lv_ready "$vg-pvmove1"
else else
LVM_TEST_TAG="kill_me_$PREFIX" "${cmd1[@]}" LVM_TEST_TAG="kill_me_$PREFIX" "${cmd1[@]}"
LVM_TEST_TAG="kill_me_$PREFIX" "${cmd2[@]}" LVM_TEST_TAG="kill_me_$PREFIX" "${cmd2[@]}"
fi fi
# remove specific device # remove specific device
pvmove --abort "$dev1" pvmove --abort "$dev1"