Project

General

Profile

Bug #39404

cephfs-shell: fix string decode for ls command

Added by Milind Changire 4 months ago. Updated 2 months ago.

Status:
Resolved
Priority:
High
Category:
-
Target version:
Start date:
Due date:
% Done:

100%

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:

Description

CephFS:~/>>> ls -l
startswith first arg must be bytes or a tuple of bytes, not str
Traceback (most recent call last):
File "/home/mchangir/work/mchangir-ceph.git/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/mchangir/work/mchangir-ceph.git/src/tools/cephfs/cephfs-shell", line 717, in do_ls
items = [i for i in items if not i.d_name.startswith('.')]
File "/home/mchangir/work/mchangir-ceph.git/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

Duplicated by fs - Bug #39617: cephfs-shell dumps backtrace on "ls" Duplicate
Copied to fs - Backport #39678: nautilus: cephfs-shell: fix string decode for ls command Resolved

History

#1 Updated by Milind Changire 4 months ago

  • Pull request ID set to 27716

Updated with PR ID

#2 Updated by Milind Changire 4 months ago

  • Status changed from New to Need Review

#3 Updated by Patrick Donnelly 4 months ago

  • Duplicated by Bug #39617: cephfs-shell dumps backtrace on "ls" added

#4 Updated by Patrick Donnelly 4 months ago

  • Status changed from Need Review to Pending Backport
  • Assignee set to Milind Changire
  • Priority changed from Normal to High
  • Target version set to v15.0.0
  • Source set to Development
  • Backport set to nautilus
  • ceph-qa-suite deleted (fs)

#5 Updated by Nathan Cutler 4 months ago

  • Copied to Backport #39678: nautilus: cephfs-shell: fix string decode for ls command added

#6 Updated by Nathan Cutler 2 months ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF