[LU-6205] tests: fix bash expansion of FIDs Created: 03/Feb/15 Updated: 24/Apr/17 Resolved: 24/Mar/15 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.7.0 |
| Fix Version/s: | Lustre 2.8.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Frank Zago (Inactive) | Assignee: | WC Triage |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | patch | ||
| Issue Links: |
|
||||
| Severity: | 3 | ||||
| Rank (Obsolete): | 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] 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 \ |
| Comments |
| Comment by Gerrit Updater [ 03/Feb/15 ] |
|
frank zago (fzago@cray.com) uploaded a new patch: http://review.whamcloud.com/13618 |
| Comment by Robert Read (Inactive) [ 03/Feb/15 ] |
|
I can't figure out how to make this fail. Do you have a simple reproducer for this? [root@test1 lustre]# touch foo [root@test1 lustre]# lfs path2fid foo [0x200000400:0x4a:0x0] [root@test1 lustre]# lfs fid2path lustre [0x200000400:0x4a:0x0] foo [root@test1 lustre]# v=[0x200000400:0x4a:0x0] [root@test1 lustre]# lfs fid2path lustre $v foo |
| Comment by Frank Zago (Inactive) [ 03/Feb/15 ] |
|
Your sample fails for me: # lustre/utils/lfs fid2path lustre [0x200000400:0x4a:0x0] bad FID format [a], should be [0x1:0x2:0x0] # v=[0x200000400:0x4a:0x0] [root@c65-l251-intel-fzago lustre-cleanup]# lustre/utils/lfs fid2path lustre $v bad FID format [a], should be [0x1:0x2:0x0] I'm running bash on centos 6.5. |
| Comment by Frank Zago (Inactive) [ 03/Feb/15 ] |
|
Robert, create a file "a" and try again. # v=[0x200000400:0x4a:0x0] # lfs fid2path lustre $v fid2path: error on FID [0x200000400:0x4a:0x0]: No such file or directory # touch a # lfs fid2path lustre $v bad FID format [a], should be [0x1:0x2:0x0] fid2path: error on FID a: Invalid argument |
| Comment by Robert Read (Inactive) [ 04/Feb/15 ] |
|
doh! |
| Comment by Gerrit Updater [ 18/Mar/15 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/13618/ |
| Comment by James Nunez (Inactive) [ 24/Mar/15 ] |
|
Landed to master (pre-2.8.0) |
| Comment by Li Xi (Inactive) [ 16/Jan/16 ] |
|
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) fid2path: error on FID b: Invalid argument |