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

removing non existing path with lctl pcc del returns 0 (success) exit code without error message

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • None
    • Lustre 2.14.0
    • 3
    • 9223372036854775807

    Description

       

       

      Steps to reproduce:

       

      Check that cache is not configured. Empty list.

      1. lctl pcc list /mnt/lustre

      #

       

      Try to delete any cache

      1. lctl pcc del /mnt/lustre /mnt/pccro/
      1. echo $?

      0

       

      Try for any word

      1. lctl pcc del /mnt/lustre abc
      1. echo $?

      0

       

      This is not critical, but it is good to have proper return codes for scripting or control that this is expected.

      Attachments

        Issue Links

          Activity

            [LU-13843] removing non existing path with lctl pcc del returns 0 (success) exit code without error message

            Verified with lustre-2.13.55_3_g066eec1-1.el7.x86_64

            # lctl pcc del /mnt/lustre abc
            del: failed to delete 'abc' on '/mnt/lustre': No such file or directory
            [root@trevis-59vm9 ~]# echo $?
            2
            

             

            vilapa Vikentsi Lapa added a comment - Verified with lustre-2.13.55_3_g066eec1-1.el7.x86_64 # lctl pcc del /mnt/lustre abc del: failed to delete 'abc' on '/mnt/lustre' : No such file or directory [root@trevis-59vm9 ~]# echo $? 2  
            qian_wc Qian Yingjin added a comment -

            This bug was introduced in LU-12373. The patch I tested was https://review.whamcloud.com/#/c/38305/.

            I have fixed this bug in 

            https://review.whamcloud.com/38352 LU-12373 pcc: uncache the pcc copies when remove a PCC backend

            Please try again!

             

            Thanks,

            Qian

            qian_wc Qian Yingjin added a comment - This bug was introduced in LU-12373 . The patch I tested was  https://review.whamcloud.com/#/c/38305/ . I have fixed this bug in  https://review.whamcloud.com/38352 LU-12373 pcc: uncache the pcc copies when remove a PCC backend Please try again!   Thanks, Qian

            I am using  versions below for test, can you provide your build version?

            rpm -qa | grep lustre
            kmod-lustre-client-2.13.55_3_gaaa3279-1.el7.x86_64
            lustre-client-2.13.55_3_gaaa3279-1.el7.x86_64
            lustre-iokit-2.13.55_3_gaaa3279-1.el7.x86_64
            lustre-client-tests-2.13.55_3_gaaa3279-1.el7.x86_64

            1. Check that something attached to the cache

            lctl pcc list /mnt/lustre
            pcc:
            -
            pccpath: /mnt/pccro_tst
            hsmtool: posix
            rwid: 5
            roid: 5
            flags: 3e
            autocache: projid={100}
            -
            pccpath: /mnt/pccro
            hsmtool: posix
            rwid: 4
            roid: 4
            flags: 3e
            autocache: projid={100}

            2.  Than check delete option

            [root@trevis-59vm12 ~]# lctl pcc del /mnt/lustre abc
            [root@trevis-59vm12 ~]# echo $?
            0
            
            
            vilapa Vikentsi Lapa added a comment - I am using  versions below for test, can you provide your build version? rpm -qa | grep lustre kmod-lustre-client-2.13.55_3_gaaa3279-1.el7.x86_64 lustre-client-2.13.55_3_gaaa3279-1.el7.x86_64 lustre-iokit-2.13.55_3_gaaa3279-1.el7.x86_64 lustre-client-tests-2.13.55_3_gaaa3279-1.el7.x86_64 1. Check that something attached to the cache lctl pcc list /mnt/lustre pcc: - pccpath: /mnt/pccro_tst hsmtool: posix rwid: 5 roid: 5 flags: 3e autocache: projid={100} - pccpath: /mnt/pccro hsmtool: posix rwid: 4 roid: 4 flags: 3e autocache: projid={100} 2.  Than check delete option [root@trevis-59vm12 ~]# lctl pcc del /mnt/lustre abc [root@trevis-59vm12 ~]# echo $? 0
            qian_wc Qian Yingjin added a comment -

            I tried the test in my local system, It reported errors as expected.

            [root@qian tests]# ../utils/lctl pcc add /mnt/lustre /mnt/pcc -p "projid={100} rwid=2"
            
            [root@qian tests]# ../utils/lctl pcc del /mnt/lustre /mnt/pcc2 || echo $?
            lctl pcc pcc: error: setting llite.lustre-ffff9ebf38692800.pcc='del /mnt/pcc2': No such file or directory (2)
            2
            [root@qian tests]# ../utils/lctl pcc del /mnt/lustre /mnt/pcc2           
            lctl pcc pcc: error: setting llite.lustre-ffff9ebf38692800.pcc='del /mnt/pcc2': No such file or directory (2)
            [root@qian tests]# ../utils/lctl pcc del /mnt/lustre /kkk     
            lctl pcc pcc: error: setting llite.lustre-ffff9ebf38692800.pcc='del /kkk': No such file or directory (2)
            [root@qian tests]# echo $?
            2
            [root@qian tests]# ../utils/lctl pcc del /mnt/lustre abc 
            lctl pcc pcc: error: setting llite.lustre-ffff9ebf38692800.pcc='del abc': Invalid argument (22)
            [root@qian tests]# ../utils/lctl pcc del /mnt/lustre /mnt/pcc
            [root@qian tests]# echo $?
            0
            [root@qian tests]# ../utils/lctl pcc del /mnt/lustre /mnt/pcc
            lctl pcc pcc: error: setting llite.lustre-ffff9ebf38692800.pcc='del /mnt/pcc': No such file or directory (2)
            [root@qian tests]# ../utils/lctl pcc list /mnt/lustre         
            [root@qian tests]# ../utils/lctl pcc del /mnt/lustre /mnt/pcc
            lctl pcc pcc: error: setting llite.lustre-ffff9ebf38692800.pcc='del /mnt/pcc': No such file or directory (2)
            [root@qian tests]# 
            
            
            qian_wc Qian Yingjin added a comment - I tried the test in my local system, It reported errors as expected. [root@qian tests]# ../utils/lctl pcc add /mnt/lustre /mnt/pcc -p "projid={100} rwid=2" [root@qian tests]# ../utils/lctl pcc del /mnt/lustre /mnt/pcc2 || echo $? lctl pcc pcc: error: setting llite.lustre-ffff9ebf38692800.pcc= 'del /mnt/pcc2' : No such file or directory (2) 2 [root@qian tests]# ../utils/lctl pcc del /mnt/lustre /mnt/pcc2            lctl pcc pcc: error: setting llite.lustre-ffff9ebf38692800.pcc= 'del /mnt/pcc2' : No such file or directory (2) [root@qian tests]# ../utils/lctl pcc del /mnt/lustre /kkk      lctl pcc pcc: error: setting llite.lustre-ffff9ebf38692800.pcc= 'del /kkk' : No such file or directory (2) [root@qian tests]# echo $? 2 [root@qian tests]# ../utils/lctl pcc del /mnt/lustre abc  lctl pcc pcc: error: setting llite.lustre-ffff9ebf38692800.pcc= 'del abc' : Invalid argument (22) [root@qian tests]# ../utils/lctl pcc del /mnt/lustre /mnt/pcc [root@qian tests]# echo $? 0 [root@qian tests]# ../utils/lctl pcc del /mnt/lustre /mnt/pcc lctl pcc pcc: error: setting llite.lustre-ffff9ebf38692800.pcc= 'del /mnt/pcc' : No such file or directory (2) [root@qian tests]# ../utils/lctl pcc list /mnt/lustre          [root@qian tests]# ../utils/lctl pcc del /mnt/lustre /mnt/pcc lctl pcc pcc: error: setting llite.lustre-ffff9ebf38692800.pcc= 'del /mnt/pcc' : No such file or directory (2) [root@qian tests]# 

            People

              wc-triage WC Triage
              vilapa Vikentsi Lapa
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: