Bug #40860
cephfs-shell: raises incorrect error when regfiles are passed to be deleted
% Done:
0%
Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
cephfs-shell
Labels (FS):
task(easy)
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
Steps to reproduce the bug -
CephFS:~/>>> ls dir1/ CephFS:~/>>> ls dir1 file1 CephFS:~/>>> rmdir dir1/file1 Traceback (most recent call last): File "../src/tools/cephfs/cephfs-shell", line 828, in do_rmdir cephfs.rmdir(path.encode()) File "cephfs.pyx", line 854, in cephfs.LibCephFS.rmdir cephfs.Error: (20, "error in rmdir 'b'/dir1/file1'': error code 20") error: no such directory /dir1/file1 CephFS:~/>>> rm dir1/file1
IMO, rmdir should check if the given file is a regular file, deny from deleting it and then it should report that the given file is not a diretory.
History
#1 Updated by Rishabh Dave over 4 years ago
- Subject changed from rmdir: raises incorrect error when regfiles are passed to be deleted to cephfs-shell: raises incorrect error when regfiles are passed to be deleted
#2 Updated by Dhairya Parmar almost 2 years ago
- Assignee set to Dhairya Parmar
#3 Updated by Dhairya Parmar almost 2 years ago
- Status changed from New to In Progress
#4 Updated by Dhairya Parmar almost 2 years ago
- Status changed from In Progress to Fix Under Review
#5 Updated by Dhairya Parmar almost 2 years ago
- Pull request ID set to 46160
#6 Updated by Dhairya Parmar over 1 year ago
- Status changed from Fix Under Review to Resolved