Details
-
Bug
-
Resolution: Fixed
-
Minor
-
Lustre 2.7.0
-
3
-
17351
Description
When calling lfs path2fid, and FID is returned between bracket. When that fid variable is used, it is then expanded by the shell to something else. For instance when it is given to fid2path, it returns an error:
$ ../utils/lfs fid2path lustre [0x200000be7:0xb:0x0]
bad FID format [x], should be [0x1:0x2:0x0]
fid2path: error on FID x: Invalid argument
This will cause some tests, such as 154A or test_238 to fail under certain conditions, such as being called with:
ONLY=154A PDSH=ssh AGTCOUNT=1 agt1_HOST=localhost \
NAME=local sh ./sanity.sh
There are other scripts that needs similar fix, e.g.
== sanity-lfsck test 2a: LFSCK can find out and repair crashed linkEA entry == 02:11:11 (1452877871)
formatall
setupall
preparing... 1 * 1 files will be created.
prepared.
stop mds1
start mds1
Starting client: atest-vm31: -o user_xattr,flock atest-vm32@tcp:/lustre /mnt/lustre
fail_loc=0x1603
fail_loc=0
10.128.12.32@tcp:/lustre /mnt/lustre lustre rw,flock,user_xattr 0 0
Stopping client atest-vm31 /mnt/lustre (opts
Started LFSCK on the device lustre-MDT0000: namespace.
Starting client: atest-vm31: -o user_xattr,flock atest-vm32@tcp:/lustre /mnt/lustre
bad FID format [b], should be [0x1:0x2:0x0]
fid2path: error on FID b: Invalid argument
sanity-lfsck test_2a: @@@@@@ FAIL: (8) Fail to repair linkEA: [0x280000bd0:0x1:0x0]
Trace dump:
= /usr/lib64/lustre/tests/test-framework.sh:4421:error_noexit()
= /usr/lib64/lustre/tests/test-framework.sh:4452:error()
= /usr/lib64/lustre/tests/sanity-lfsck.sh:262:test_2a()
= /usr/lib64/lustre/tests/test-framework.sh:4691:run_one()
= /usr/lib64/lustre/tests/test-framework.sh:4728:run_one_logged()
= /usr/lib64/lustre/tests/test-framework.sh:4594:run_test()
= /usr/lib64/lustre/tests/sanity-lfsck.sh:264:main()
Dumping lctl log to /tmp/test_logs/logdir_1007_sanity-lfsck_1/sanity-lfsck.test_2a.*.1452877964.log