Project

General

Profile

Actions

Bug #39404

closed

cephfs-shell: fix string decode for ls command

Added by Milind Changire almost 5 years ago. Updated almost 5 years ago.

Status:
Resolved
Priority:
High
Category:
-
Target version:
% 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:
Crash signature (v1):
Crash signature (v2):

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 2 (0 open2 closed)

Has duplicate CephFS - Bug #39617: cephfs-shell dumps backtrace on "ls"DuplicateVarsha Rao

Actions
Copied to CephFS - Backport #39678: nautilus: cephfs-shell: fix string decode for ls commandResolvedPatrick DonnellyActions
Actions #1

Updated by Milind Changire almost 5 years ago

  • Pull request ID set to 27716

Updated with PR ID

Actions #2

Updated by Milind Changire almost 5 years ago

  • Status changed from New to Fix Under Review
Actions #3

Updated by Patrick Donnelly almost 5 years ago

  • Has duplicate Bug #39617: cephfs-shell dumps backtrace on "ls" added
Actions #4

Updated by Patrick Donnelly almost 5 years ago

  • Status changed from Fix Under 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)
Actions #5

Updated by Nathan Cutler almost 5 years ago

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

Updated by Nathan Cutler almost 5 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF