Whamcloud - gitweb
LU-18744 tests: fix sanity-sec test_27ab 87/58187/3
authorSebastien Buisson <sbuisson@ddn.com>
Mon, 24 Feb 2025 12:05:54 +0000 (13:05 +0100)
committerOleg Drokin <green@whamcloud.com>
Thu, 6 Mar 2025 08:09:25 +0000 (08:09 +0000)
When nodemap is activated in sanity-sec test_27ab, we need to make
sure the default nodemap grants root access, so that clients and
servers can be stopped and restarted.
Also fix an incorrect call to 'lctl nodemap_add_idmap'.

Test-Parameters: trivial
Fixes: e3051ad0f1 ("LU-18109 utils: adding nodemap offset capability")
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I0adafae67c7637c616c687590bd01ff12f4d6bf2
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58187
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity-sec.sh

index c8f404d..bf2a516 100755 (executable)
@@ -2467,6 +2467,10 @@ test_27ab() { #LU-18109
 
        activedefault=$(do_facet mgs $LCTL get_param -n nodemap.active)
        if ((activedefault != 1)); then
+               do_facet mgs $LCTL nodemap_modify --name default \
+                       --property trusted --value 1
+               do_facet mgs $LCTL nodemap_modify --name default \
+                       --property admin --value 1
                do_facet mgs $LCTL nodemap_activate 1
                wait_nm_sync active
                stack_trap cleanup_active EXIT
@@ -2542,7 +2546,7 @@ test_27ab() { #LU-18109
                        error "cannot delete idmap range 500-509:0"
 
        #expected error, invalid secondary range supplied
-       do_facet mgs $LCTL nodemap_add --name $nm1 \
+       do_facet mgs $LCTL nodemap_add_idmap --name $nm1 \
                 --idtype uid --idmap 500-509:200000-200010 &&
                 error "Invalid range 200000-200010 was supplied"