Actions
Bug #40297
closedcephfs-shell: Produces TypeError on passing '*' pattern to ls, rm or rmdir
% Done:
0%
Source:
Development
Tags:
Backport:
nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
cephfs-shell
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
CephFS:~/>>> rm * cannot use a string pattern on a bytes-like object Traceback (most recent call last): File "../src/tools/cephfs/cephfs-shell", line 396, in onecmd res = Cmd.onecmd(self, line) File "/home/varsha/ceph/build/venv/lib/python3.7/site-packages/cmd2/cmd2.py", line 2050, in onecmd stop = func(statement) File "/home/varsha/ceph/build/venv/lib/python3.7/site-packages/cmd2/cmd2.py", line 270, in cmd_wrapper return func(cmd2_instance, args) File "../src/tools/cephfs/cephfs-shell", line 857, in do_rm file_path) if is_file_exists(i)]) File "../src/tools/cephfs/cephfs-shell", line 155, in get_all_possible_paths paths.extend(glob(dir_, patterns[0])) File "../src/tools/cephfs/cephfs-shell", line 132, in glob if fnmatch.fnmatch(i.d_name, pattern): File "/home/varsha/ceph/build/venv/lib64/python3.7/fnmatch.py", line 36, in fnmatch return fnmatchcase(name, pat) File "/home/varsha/ceph/build/venv/lib64/python3.7/fnmatch.py", line 71, in fnmatchcase return match(name) is not None TypeError: cannot use a string pattern on a bytes-like object
Actions