Whamcloud - gitweb
LU-15429 tests: mount_mds_client() fix
authorElena Gryaznova <elena.gryaznova@hpe.com>
Tue, 11 Jan 2022 17:23:30 +0000 (20:23 +0300)
committerAndreas Dilger <adilger@whamcloud.com>
Mon, 13 May 2024 22:37:39 +0000 (22:37 +0000)
mount/umount client is to be executed on active facet/host,
not on mds1_HOST. Without this fix test_140a() fails on
failover setup:
  CMD: lm0101 umount /mnt/lustre2 2>&1
  CMD: lm0102 rmdir /mnt/lustre2
  lm0102: rmdir: failed to remove '/mnt/lustre2':
                 No such file or directory
  test_140a: FAIL: no clients with recovery disabled

To reproduce the failure just run:
  ONLY="107 140a" sh recovery-small.sh
on failover setup where mds1_HOST != mds1failover_HOST.

Lustre-commit: 1d2e2195873e82a603531e34f3f7d4c634490209
Lustre-change: https://review.whamcloud.com/46043

Fixes: 8bd04b4e57 ("LU-12722 target: disable recovery for local clients")
Test-Parameters: trivial env=ONLY="140a 140b" testlist=recovery-small
Signed-off-by: Elena Gryaznova <elena.gryaznova@hpe.com>
HPE-bug-id: LUS-10669
Change-Id: Ifbdedfda840e8421fa8a969f73131ca23982a28b
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/55041
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/tests/test-framework.sh

index 2d87a55..db84144 100755 (executable)
@@ -2547,16 +2547,16 @@ zconf_umount() {
 
 # Mount the file system on the MDS
 mount_mds_client() {
-       local mds_HOST=${SINGLEMDS}_HOST
-       echo $mds_HOST
-       zconf_mount $mds1_HOST $MOUNT2 $MOUNT_OPTS ||
-               error "unable to mount $MOUNT2 on MDS"
+       local host=$(facet_active_host $SINGLEMDS)
+       echo $host
+       zconf_mount $host $MOUNT2 $MOUNT_OPTS ||
+               error "unable to mount $MOUNT2 on $host"
 }
 
 # Unmount the file system on the MDS
 umount_mds_client() {
-       local mds_HOST=${SINGLEMDS}_HOST
-       zconf_umount $mds1_HOST $MOUNT2
+       local host=$(facet_active_host $SINGLEMDS)
+       zconf_umount $host $MOUNT2
        do_facet $SINGLEMDS "rmdir $MOUNT2"
 }