Commit 38c8fdfd authored by Wang Shilong's avatar Wang Shilong Committed by Oleg Drokin
Browse files

LU-12777 test: fix to pass facet to facet_fstype



Function facet_fstype() expect mgs1 mds1 etc as its
argument, and we used it wrong to pass $mds1 which will
cause following error.

line 1192: lustre-ost1/ost1_FSTYPE: bad substitution

And we fail to detect this is ZFS based OSD, and pool
reimporting will be missed thus failed to mount.

Test-Parameters: trivial clientdistro=el8 testlist=conf-sanity \
                 fstype=zfs envdefinitions=ONLY=103
Test-Parameters: trivial clientdistro=el8 testlist=conf-sanity \
                 fstype=ldiskfs envdefinitions=ONLY=103
Change-Id: Id8fd5b9f17e666614e83e5c1a2399fde8b91b023
Signed-off-by: default avatarWang Shilong <wshilong@ddn.com>
Reviewed-on: https://review.whamcloud.com/36298

Tested-by: default avatarjenkins <devops@whamcloud.com>
Reviewed-by: default avatarJian Yu <yujian@whamcloud.com>
Tested-by: default avatarMaloo <maloo@whamcloud.com>
Reviewed-by: default avatarJames Nunez <jnunez@whamcloud.com>
Reviewed-by: default avatarOleg Drokin <green@whamcloud.com>
parent cc697263
......@@ -7408,34 +7408,34 @@ test_renamefs() {
echo "rename $FSNAME to $newname"
if ! combined_mgs_mds ; then
local facet=$(mgsdevname)
local dev=$(mgsdevname)
do_facet mgs \
"$TUNEFS --fsname=$newname --rename=$FSNAME -v $facet"||
error "(7) Fail to rename MGS"
if [ "$(facet_fstype $facet)" = "zfs" ]; then
"$TUNEFS --fsname=$newname --rename=$FSNAME -v $dev" ||
error "(7) Fail to rename MGS"
if [ "$(facet_fstype mgs)" = "zfs" ]; then
reimport_zpool mgs $newname-mgs
fi
fi
for num in $(seq $MDSCOUNT); do
local facet=$(mdsdevname $num)
local dev=$(mdsdevname $num)
do_facet mds${num} \
"$TUNEFS --fsname=$newname --rename=$FSNAME -v $facet"||
error "(8) Fail to rename MDT $num"
if [ "$(facet_fstype $facet)" = "zfs" ]; then
"$TUNEFS --fsname=$newname --rename=$FSNAME -v $dev" ||
error "(8) Fail to rename MDT $num"
if [ "$(facet_fstype mds${num})" = "zfs" ]; then
reimport_zpool mds${num} $newname-mdt${num}
fi
done
for num in $(seq $OSTCOUNT); do
local facet=$(ostdevname $num)
local dev=$(ostdevname $num)
do_facet ost${num} \
"$TUNEFS --fsname=$newname --rename=$FSNAME -v $facet"||
error "(9) Fail to rename OST $num"
if [ "$(facet_fstype $facet)" = "zfs" ]; then
"$TUNEFS --fsname=$newname --rename=$FSNAME -v $dev" ||
error "(9) Fail to rename OST $num"
if [ "$(facet_fstype ost${num})" = "zfs" ]; then
reimport_zpool ost${num} $newname-ost${num}
fi
done
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment