Skip to contentSkip to conversation

master - test: mirrored mirrorlog is not supposed to work in cluster

PATCH Marian Csontos 1 participant 1 message Feb 14, 2018

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=dd6fbcbb6941b0d534689258f7f07f567ee6f352
Commit:        dd6fbcbb6941b0d534689258f7f07f567ee6f352
Parent:        c3642957c5427d69b6aac45d2d1088786967cabd
Author:        Marian Csontos <[email protected]>
AuthorDate:    Tue Feb 13 18:34:08 2018 +0100
Committer:     Marian Csontos <[email protected]>
CommitterDate: Wed Feb 14 13:10:52 2018 +0100

test: mirrored mirrorlog is not supposed to work in cluster

---
 test/shell/lvconvert-mirror.sh   |   11 ++++++++---
 test/shell/lvcreate-operation.sh |   11 ++++++++++-
 2 files changed, 18 insertions(+), 4 deletions(-)
test/shell/lvconvert-mirror.sh +8 -3
index 449f605..76ff166 100644
@@ -293,15 +293,20 @@ lvcreate -aey -l15 -n $lv1 $vg
 not lvconvert --type mirror -m1 --corelog --stripes 2 $vg/$lv1
 lvremove -ff $vg
 
-test -e LOCAL_CLVMD && exit 0
-
-# FIXME - cases which needs to be fixed to work in cluster
 # Linear to mirror with mirrored log using --alloc anywhere
 lvcreate -aey -l2 -n $lv1 $vg "$dev1"
+if test -e LOCAL_CLVMD; then
+# This is not supposed to work in cluster
+not lvconvert --type mirror -m +1 --mirrorlog mirrored --alloc anywhere $vg/$lv1 "$dev1" "$dev2"
+else
 lvconvert --type mirror -m +1 --mirrorlog mirrored --alloc anywhere $vg/$lv1 "$dev1" "$dev2"
 should check mirror $vg $lv1
+fi
 lvremove -ff $vg
 
+# FIXME - cases which needs to be fixed to work in cluster
+test -e LOCAL_CLVMD && exit 0
+
 # Should not be able to add images to --nosync mirror
 # but should be able to after 'lvchange --resync'
 lvcreate -aey --type mirror -m 1 -l1 -n $lv1 $vg --nosync
test/shell/lvcreate-operation.sh +10 -1
index 63d05db..38d50cd 100644
@@ -37,7 +37,14 @@ lvcreate -n$lv3 -l4 --permission r -s $vg/$lv1
 cleanup_lvs
 
 # Skip the rest for cluster
-test -e LOCAL_CLVMD && exit 0
+if test -e LOCAL_CLVMD; then
+
+# ---
+# Create mirror on two devices with mirrored log using --alloc anywhere - should always fail in cluster
+not lvcreate --type mirror -m 1 -l4 -n $lv1 --mirrorlog mirrored $vg --alloc anywhere "$dev1" "$dev2"
+cleanup_lvs
+
+else
 
 # ---
 # Create mirror on two devices with mirrored log using --alloc anywhere
@@ -49,4 +56,6 @@ cleanup_lvs
 not lvcreate --type mirror -m 1 -l4 -n $lv1 --mirrorlog mirrored $vg --alloc anywhere "$dev1"
 cleanup_lvs
 
+fi
+
 vgremove -ff $vg