Project

General

Profile

Bug #40863

cephfs-shell: rmdir with -p attempts to delete non-dir files as well

Added by Rishabh Dave 3 months ago. Updated 3 months ago.

Status:
Verified
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
Due date:
% Done:

0%

Source:
Development
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:

Description

Going through do_rmdir in cephfs-shell, I don't see any checks that stop the method from deleting non-directory files.

Reproducing the bug -

CephFS:~/>>> ls dir2/
file1
CephFS:~/>>> rmdir -p dir2
CephFS:~/>>> ls 

Ideally, rmdir shouldn't do that since it is only suppose to delete empty directories.

History

#1 Updated by Rishabh Dave 3 months ago

  • Subject changed from cephfs-shell: rmdir attempts to delete non-dir as well to cephfs-shell: rmdir with -p attempts to delete non-dir files as well

#2 Updated by Rishabh Dave 3 months ago

  • Component(FS) cephfs-shell added
  • Labels (FS) task(easy) added

#3 Updated by Varsha Rao 3 months ago

  • Status changed from New to Verified
  • Assignee set to Varsha Rao
  • Target version set to v15.0.0
  • Start date deleted (07/22/2019)
  • Source set to Community (dev)

#4 Updated by Varsha Rao 3 months ago

  • Source changed from Community (dev) to Development

Also available in: Atom PDF