== sanity-sec test 64i: Nodemap quota enforcement with local_admin RBAC and offsets ========================================================== 11:29:18 (1788276558) mdt.lustre-MDT0000.identity_upcall=NONE mdt.lustre-MDT0001.identity_upcall=NONE oleg150-server: error: nodemap 'c0' does not exist oleg150-server: nodemap_del: Invalid argument pdsh@oleg150-client: oleg150-server: ssh exited with exit code 1 On MGS 192.168.201.150, active = nodemap.active=1 osd-ldiskfs.lustre-MDT0000.quota_slave_dt.enabled=u osd-ldiskfs.lustre-MDT0001.quota_slave_dt.enabled=u Current MOUNT: total 72 drwxr-xr-x 19 root root 4096 Sep 1 11:28 . drwxr-xr-x 4 root root 0 Sep 1 10:55 .. drwxrwxrwx 2 quota_usr root 4096 Sep 1 10:29 d17.sanity-sec drwxrwxrwx 2 quota_usr root 4096 Sep 1 10:34 d18.sanity-sec drwxrwxrwx 2 quota_usr root 4096 Sep 1 10:43 d21.sanity-sec drwxr-xr-x 2 root root 4096 Sep 1 10:49 d25c.sanity-sec drwxr-xr-x 2 root root 4096 Sep 1 10:52 d35.sanity-sec drwxr-xr-x 2 root root 4096 Sep 1 11:01 d51.sanity-sec drwxr-xr-x 3 root root 4096 Sep 1 11:02 d55.sanity-sec drwxr-xr-x 3 root root 4096 Sep 1 11:15 d60.sanity-sec drwxr-xr-x 2 root root 4096 Sep 1 11:15 d61.sanity-sec drwxr-xr-x 2 root root 4096 Sep 1 11:20 d64a.sanity-sec drwxr-xr-x 5 root root 4096 Sep 1 11:22 d64b.sanity-sec drwxr-xr-x 2 root root 4096 Sep 1 11:22 d64c.sanity-sec drwxr-xr-x 2 root root 4096 Sep 1 11:24 d64d.sanity-sec drwxr-xr-x 2 root root 4096 Sep 1 11:26 d64e.sanity-sec drwxrwx---+ 2 root 5000 4096 Sep 1 11:27 d64g.sanity-sec drwxrwxrwx 2 root root 4096 Sep 1 11:28 d64h.sanity-sec drwxr-xr-x 2 100000 root 4096 Sep 1 11:29 d64i.sanity-sec On MGS 192.168.201.150, c0.offset = nodemap.c0.offset= { start_uid: 100000, limit_uid: 100000, start_gid: 100000, limit_gid: 100000, start_projid: 100000, limit_projid: 100000 } Current MOUNT: total 72 drwxr-xr-x 19 root root 4096 Sep 1 11:28 . drwxr-xr-x 4 root root 0 Sep 1 10:55 .. drwxrwxrwx 2 quota_usr root 4096 Sep 1 10:29 d17.sanity-sec drwxrwxrwx 2 quota_usr root 4096 Sep 1 10:34 d18.sanity-sec drwxrwxrwx 2 quota_usr root 4096 Sep 1 10:43 d21.sanity-sec drwxr-xr-x 2 root root 4096 Sep 1 10:49 d25c.sanity-sec drwxr-xr-x 2 root root 4096 Sep 1 10:52 d35.sanity-sec drwxr-xr-x 2 root root 4096 Sep 1 11:01 d51.sanity-sec drwxr-xr-x 3 root root 4096 Sep 1 11:02 d55.sanity-sec drwxr-xr-x 3 root root 4096 Sep 1 11:15 d60.sanity-sec drwxr-xr-x 2 root root 4096 Sep 1 11:15 d61.sanity-sec drwxr-xr-x 2 root root 4096 Sep 1 11:20 d64a.sanity-sec drwxr-xr-x 5 root root 4096 Sep 1 11:22 d64b.sanity-sec drwxr-xr-x 2 root root 4096 Sep 1 11:22 d64c.sanity-sec drwxr-xr-x 2 root root 4096 Sep 1 11:24 d64d.sanity-sec drwxr-xr-x 2 root root 4096 Sep 1 11:26 d64e.sanity-sec drwxrwx---+ 2 root 5000 4096 Sep 1 11:27 d64g.sanity-sec drwxrwxrwx 2 root root 4096 Sep 1 11:28 d64h.sanity-sec drwxr-xr-x 2 100000 root 4096 Sep 1 11:29 d64i.sanity-sec Test 1: admin_nodemap=1, local_admin in RBAC, trusted=1 Expected: root can bypass quota (write succeeds) On MGS 192.168.201.150, c0.rbac = nodemap.c0.rbac=file_perms,quota_ops,server_upcall,local_admin 15+0 records in 15+0 records out 15728640 bytes (16 MB, 15 MiB) copied, 0.70373 s, 22.4 MB/s Waiting for MDT destroys to complete Test 2: admin_nodemap=1, local_admin NOT in RBAC, trusted=1 Expected: root must respect quota (write fails with EDQUOT) On MGS 192.168.201.150, c0.rbac = nodemap.c0.rbac=file_perms,quota_ops,server_upcall dd output: dd: error writing '/mnt/lustre/d64i.sanity-sec/f64i.sanity-sec': Disk quota exceeded 10+0 records in 9+0 records out 9437184 bytes (9.4 MB, 9.0 MiB) copied, 0.433291 s, 21.8 MB/s Waiting for MDT destroys to complete Test 3: admin_nodemap=1, local_admin NOT in RBAC, trusted=0 Expected: root must respect quota (write fails with EDQUOT) On MGS 192.168.201.150, c0.trusted_nodemap = nodemap.c0.trusted_nodemap=0 dd output: dd: error writing '/mnt/lustre/d64i.sanity-sec/f64i.sanity-sec': Disk quota exceeded 10+0 records in 9+0 records out 9437184 bytes (9.4 MB, 9.0 MiB) copied, 0.502921 s, 18.8 MB/s Waiting for MDT destroys to complete Test 4: admin_nodemap=1, local_admin in RBAC, trusted=0 Expected: root can bypass quota (write succeeds) On MGS 192.168.201.150, c0.rbac = nodemap.c0.rbac=file_perms,quota_ops,server_upcall,local_admin 15+0 records in 15+0 records out 15728640 bytes (16 MB, 15 MiB) copied, 0.703314 s, 22.4 MB/s Waiting for MDT destroys to complete Test 5: admin_nodemap=0, local_admin in RBAC Expected: root is squashed, permission denied On MGS 192.168.201.150, c0.admin_nodemap = nodemap.c0.admin_nodemap=0 Current MOUNT: total 72 drwxr-xr-x 19 root root 4096 Sep 1 11:28 . drwxr-xr-x 4 root root 0 Sep 1 10:55 .. drwxrwxrwx 2 quota_usr root 4096 Sep 1 10:29 d17.sanity-sec drwxrwxrwx 2 quota_usr root 4096 Sep 1 10:34 d18.sanity-sec drwxrwxrwx 2 quota_usr root 4096 Sep 1 10:43 d21.sanity-sec drwxr-xr-x 2 root root 4096 Sep 1 10:49 d25c.sanity-sec drwxr-xr-x 2 root root 4096 Sep 1 10:52 d35.sanity-sec drwxr-xr-x 2 root root 4096 Sep 1 11:01 d51.sanity-sec drwxr-xr-x 3 root root 4096 Sep 1 11:02 d55.sanity-sec drwxr-xr-x 3 root root 4096 Sep 1 11:15 d60.sanity-sec drwxr-xr-x 2 root root 4096 Sep 1 11:15 d61.sanity-sec drwxr-xr-x 2 root root 4096 Sep 1 11:20 d64a.sanity-sec drwxr-xr-x 5 nobody nobody 4096 Sep 1 11:22 d64b.sanity-sec drwxr-xr-x 2 root root 4096 Sep 1 11:22 d64c.sanity-sec drwxr-xr-x 2 nobody nobody 4096 Sep 1 11:24 d64d.sanity-sec drwxr-xr-x 2 root root 4096 Sep 1 11:26 d64e.sanity-sec drwxrwx---+ 2 nobody nobody 4096 Sep 1 11:27 d64g.sanity-sec drwxrwxrwx 2 root root 4096 Sep 1 11:28 d64h.sanity-sec drwxr-xr-x 2 nobody nobody 4096 Sep 1 11:31 d64i.sanity-sec dd output: dd: failed to open '/mnt/lustre/d64i.sanity-sec/f64i.sanity-sec': Permission denied Waiting for MDT destroys to complete Test 6: admin_nodemap=0, local_admin NOT in RBAC Expected: root is squashed, permission denied On MGS 192.168.201.150, c0.rbac = nodemap.c0.rbac=file_perms,quota_ops,server_upcall dd output: dd: failed to open '/mnt/lustre/d64i.sanity-sec/f64i.sanity-sec': Permission denied On MGS 192.168.201.150, c0.trusted_nodemap = nodemap.c0.trusted_nodemap=1 Waiting for MDT destroys to complete Test 7: admin=1, trusted=1, local_admin in RBAC (DOM only) Expected: root can bypass quota (DOM write succeeds) On MGS 192.168.201.150, c0.rbac = nodemap.c0.rbac=file_perms,quota_ops,server_upcall,local_admin 15+0 records in 15+0 records out 15728640 bytes (16 MB, 15 MiB) copied, 1.08383 s, 14.5 MB/s Waiting for MDT destroys to complete Test 8: admin=1, trusted=1, local_admin NOT in RBAC (DOM only) Expected: root must respect quota (DOM write fails EDQUOT) On MGS 192.168.201.150, c0.rbac = nodemap.c0.rbac=file_perms,quota_ops,server_upcall dd DOM output: dd: error writing '/mnt/lustre/d64i.sanity-sec/f64i.sanity-sec': Disk quota exceeded 11+0 records in 10+0 records out 10485760 bytes (10 MB, 10 MiB) copied, 1.03931 s, 10.1 MB/s osd-ldiskfs.lustre-MDT0000.quota_slave_dt.enabled=none osd-ldiskfs.lustre-MDT0001.quota_slave_dt.enabled=none 192.168.201.150@tcp:/lustre /mnt/lustre lustre rw,flock,checksum,encrypt,lazystatfs,lruresize,nolock,statfs_project,nosync_on_close,nouser_fid2path,user_xattr,verbose 0 0 Stopping client oleg150-client.virtnet /mnt/lustre (opts:) On MGS 192.168.201.150, active = nodemap.active=0 Starting client: oleg150-client.virtnet: -o user_xattr,flock 192.168.201.150@tcp:/lustre /mnt/lustre