Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-4100

lfs getstripe of directory prints an extra space char at the end of header's infos line

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.6.0
    • None
    • None
    • 3
    • 11015

    Description

      [root@clnt ~]# mkdir /mnt/lustre2/foo
      [root@clnt ~]# lfs getstripe /mnt/lustre2/foo | sed 'l'
      /mnt/lustre2/foo$
      /mnt/lustre2/foo
      stripe_count:   1 stripe_size:    1048576 stripe_offset:  -1 $
      stripe_count:   1 stripe_size:    1048576 stripe_offset:  -1 
      [root@clnt ~]# lfs getstripe -c -s /mnt/lustre2/foo | sed 'l'
      stripe_count:   1 stripe_size:    1048576 $
      stripe_count:   1 stripe_size:    1048576 
      [root@clnt ~]# lfs getstripe -c /mnt/lustre2/foo | sed 'l'
      1 $
      1 
      [root@clnt ~]# 
      

      This is particularly annoying for parsing in scripts and has been unveiled in LU-3858 and associated Gerrit Change #7495, where a new auto-test was developed using "lfs getstripe".

      Attachments

        Activity

          [LU-4100] lfs getstripe of directory prints an extra space char at the end of header's infos line
          pjones Peter Jones added a comment -

          Landed for 2.6

          pjones Peter Jones added a comment - Landed for 2.6

          Hello Bruno,

          It did not cost me much time to prepare the patch since Andreas had already pointed out where the problem is and how to fix.

          lixi Li Xi (Inactive) added a comment - Hello Bruno, It did not cost me much time to prepare the patch since Andreas had already pointed out where the problem is and how to fix.

          Hello Li, seems that after Andreas raised this problem, during your change #7495 review, you already worked on it and had a patch ready to go !!
          Thanks for you help.

          bfaccini Bruno Faccini (Inactive) added a comment - Hello Li, seems that after Andreas raised this problem, during your change #7495 review, you already worked on it and had a patch ready to go !! Thanks for you help.

          Hi Bruno, I've post a patch which tries to fix this problem.
          http://review.whamcloud.com/#/c/7992/

          lixi Li Xi (Inactive) added a comment - Hi Bruno, I've post a patch which tries to fix this problem. http://review.whamcloud.com/#/c/7992/

          People

            bfaccini Bruno Faccini (Inactive)
            bfaccini Bruno Faccini (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: