Whamcloud - gitweb
LU-11749 tests: sanity-sec 23b exec commands on right node 46/33846/3
authorSebastien Buisson <sbuisson@ddn.com>
Thu, 13 Dec 2018 09:02:47 +0000 (18:02 +0900)
committerOleg Drokin <green@whamcloud.com>
Wed, 6 Feb 2019 06:34:56 +0000 (06:34 +0000)
In sanity-sec test 23b, make sure commands are executed on
client 1, then client 2.
Otherwise, ACL mapping cannot be correctly demonstrated.

Test-Parameters: trivial clientcount=2 envdefinitions=ONLY=23b testlist=sanity-sec,sanity-sec,sanity-sec,sanity-sec,sanity-sec,sanity-sec
Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: Iffa3946be149313af696907fa6c83a6ea58cb3f6
Reviewed-on: https://review.whamcloud.com/33846
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity-sec.sh

index 8410b84..3e04aab 100755 (executable)
@@ -1814,18 +1814,18 @@ test_23b() { #LU-9929
                error "add idmap $ID0:$fs_id to nodemap c0 failed"
        wait_nm_sync c0 idmap
 
                error "add idmap $ID0:$fs_id to nodemap c0 failed"
        wait_nm_sync c0 idmap
 
-       # set/getfacl default acl on client0 (unmapped gid=500)
-       rm -rf $testdir
-       mkdir -p $testdir
+       # set/getfacl default acl on client 1 (unmapped gid=500)
+       do_node ${clients_arr[0]} rm -rf $testdir
+       do_node ${clients_arr[0]} mkdir -p $testdir
        # Here, USER0=$(getent passwd | grep :$ID0:$ID0: | cut -d: -f1)
        # Here, USER0=$(getent passwd | grep :$ID0:$ID0: | cut -d: -f1)
-       setfacl -R -d -m group:$USER0:rwx $testdir ||
+       do_node ${clients_arr[0]} setfacl -R -d -m group:$USER0:rwx $testdir ||
                error "setfacl $testdir on ${clients_arr[0]} failed"
                error "setfacl $testdir on ${clients_arr[0]} failed"
-       unmapped_id=$(getfacl $testdir | grep -E "default:group:.*:rwx" |
-                       awk -F: '{print $3}')
+       unmapped_id=$(do_node ${clients_arr[0]} getfacl $testdir |
+                       grep -E "default:group:.*:rwx" | awk -F: '{print $3}')
        [ "$unmapped_id" = "$USER0" ] ||
                error "gid=$ID0 was not unmapped correctly on ${clients_arr[0]}"
 
        [ "$unmapped_id" = "$USER0" ] ||
                error "gid=$ID0 was not unmapped correctly on ${clients_arr[0]}"
 
-       # getfacl default acl on client2 (mapped gid=60010)
+       # getfacl default acl on client 2 (mapped gid=60010)
        mapped_id=$(do_node ${clients_arr[1]} getfacl $testdir |
                        grep -E "default:group:.*:rwx" | awk -F: '{print $3}')
        fs_user=$(do_node ${clients_arr[1]} getent passwd |
        mapped_id=$(do_node ${clients_arr[1]} getfacl $testdir |
                        grep -E "default:group:.*:rwx" | awk -F: '{print $3}')
        fs_user=$(do_node ${clients_arr[1]} getent passwd |