Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.8.0
    • 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

      Attachments

        Activity

          [LU-6205] tests: fix bash expansion of FIDs

          Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/13618/
          Subject: LU-6205 tests: fix bash expansion of fid
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: fd3bfcd73ee93e356adb716b11feca4bfd860af4

          gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/13618/ Subject: LU-6205 tests: fix bash expansion of fid Project: fs/lustre-release Branch: master Current Patch Set: Commit: fd3bfcd73ee93e356adb716b11feca4bfd860af4
          rread Robert Read added a comment -

          doh!

          rread Robert Read added a comment - doh!
          fzago Frank Zago (Inactive) added a comment - - edited

          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
          
          fzago Frank Zago (Inactive) added a comment - - edited 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

          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.

          fzago Frank Zago (Inactive) added a comment - 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.
          rread Robert Read added a comment -

          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
          
          rread Robert Read added a comment - 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

          frank zago (fzago@cray.com) uploaded a new patch: http://review.whamcloud.com/13618
          Subject: LU-6205 tests: fix bash expansion of fid
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: aa99d73b66d377c0d5bad798eafbb25b0413b524

          gerrit Gerrit Updater added a comment - frank zago (fzago@cray.com) uploaded a new patch: http://review.whamcloud.com/13618 Subject: LU-6205 tests: fix bash expansion of fid Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: aa99d73b66d377c0d5bad798eafbb25b0413b524

          People

            wc-triage WC Triage
            fzago Frank Zago (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: