Project

General

Profile

Bug #39617

cephfs-shell dumps backtrace on "ls"

Added by Jeff Layton 3 months ago. Updated 3 months ago.

Status:
Duplicate
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):
Pull request ID:

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

Duplicates fs - Bug #39404: cephfs-shell: fix string decode for ls command Resolved

History

#1 Updated by Jeff Layton 3 months 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 3 months 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 3 months 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 3 months ago

  • Parent task deleted (#39404)

#5 Updated by Patrick Donnelly 3 months ago

  • Duplicates Bug #39404: cephfs-shell: fix string decode for ls command added

Also available in: Atom PDF