Bug #39617
cephfs-shell dumps backtrace on "ls"
% Done:
0%
Source:
Development
Tags:
Backport:
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
Built ceph based on today's master branch (2d410b5a2e428232dc7d6f3abc006da5e9128e77), using this cmake command:
$ cmake -DWITH_PYTHON3=ON -DWITH_PYTHON2=OFF -DMGR_PYTHON_VERSION=3 -DWITH_CEPHFS_SHELL=ON -DWITH_SPDK=OFF /home/jlayton/git/ceph
...then, do this:
[jlayton@tleilax build]$ . ./vstart_environment.sh [jlayton@tleilax build]$ cephfs-shell CephFS:~/>>> ls startswith first arg must be bytes or a tuple of bytes, not str Traceback (most recent call last): File "/home/jlayton/git/ceph/src/tools/cephfs/cephfs-shell", line 376, in onecmd res = Cmd.onecmd(self, line) File "/usr/lib/python3.7/site-packages/cmd2.py", line 2672, in onecmd stop = func(statement) File "/usr/lib/python3.7/site-packages/cmd2.py", line 496, in cmd_wrapper return func(instance, args) File "/home/jlayton/git/ceph/src/tools/cephfs/cephfs-shell", line 717, in do_ls items = [i for i in items if not i.d_name.startswith('.')] File "/home/jlayton/git/ceph/src/tools/cephfs/cephfs-shell", line 717, in <listcomp> items = [i for i in items if not i.d_name.startswith('.')] TypeError: startswith first arg must be bytes or a tuple of bytes, not str
Related issues
History
#1 Updated by Jeff Layton almost 5 years ago
This is on F30, fwiw. I backed out this patch, and it seems to fix the issue:
commit d2ad783b0c5d2238bebcd1d3c0dfb6146b3daeec Author: Milind Changire <mchangir@redhat.com> Date: Fri Apr 12 22:29:23 2019 +0530 cephfs-shell: fix ls command Signed-off-by: Milind Changire <mchangir@redhat.com>
Milind, that changelog is not terribly descriptive. What exactly were you trying to fix with this?
#2 Updated by Patrick Donnelly almost 5 years ago
- Assignee set to Varsha Rao
- Target version set to v15.0.0
- Start date deleted (
05/07/2019) - Source set to Development
#3 Updated by Varsha Rao almost 5 years ago
- Status changed from New to Duplicate
- Parent task set to #39404
- Pull request ID set to 27716
Hi Patrick,
Please merge this PR https://github.com/ceph/ceph/pull/27716. It resolves the issue.
#4 Updated by Patrick Donnelly almost 5 years ago
- Parent task deleted (
#39404)
#5 Updated by Patrick Donnelly almost 5 years ago
- Duplicates Bug #39404: cephfs-shell: fix string decode for ls command added