[LU-13843] removing non existing path with lctl pcc del returns 0 (success) exit code without error message Created: 31/Jul/20 Updated: 05/Aug/20 Resolved: 05/Aug/20 |
|
| Status: | Closed |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.14.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Vikentsi Lapa | Assignee: | WC Triage |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | PCC | ||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||
| Description |
|
Steps to reproduce:
Check that cache is not configured. Empty list.
#
Try to delete any cache
0
Try for any word
0
This is not critical, but it is good to have proper return codes for scripting or control that this is expected. |
| Comments |
| Comment by Qian Yingjin [ 03/Aug/20 ] |
|
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]# |
| Comment by Vikentsi Lapa [ 03/Aug/20 ] |
|
I am using versions below for test, can you provide your build version? rpm -qa | grep lustre 1. Check that something attached to the cache lctl pcc list /mnt/lustre 2. Than check delete option [root@trevis-59vm12 ~]# lctl pcc del /mnt/lustre abc [root@trevis-59vm12 ~]# echo $? 0 |
| Comment by Qian Yingjin [ 04/Aug/20 ] |
|
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 |
| Comment by Vikentsi Lapa [ 05/Aug/20 ] |
|
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
|