Project

General

Profile

Actions

Bug #47372

closed

mgr/dashboard: error when typing existing folder name in the NFS-Ganesha form

Added by Kiefer Chang over 3 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Component - NFS
Target version:
% Done:

0%

Source:
Tags:
Backport:
octopus
Regression:
Yes
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

How to reproduce:

- Create a CephFS export for the path `/foo`. The folder will be created in the FS.
- Create another CephFS export and type `/foo` in the path field, an error message is displayed.

The error in the backend is:

2020-09-09T08:55:40.647+0000 7f2ffa257700  0 [dashboard ERROR exception] Internal Server Error
Traceback (most recent call last):
  File "/ceph/src/pybind/mgr/dashboard/services/exception.py", line 48, in dashboard_exception_handler
    return handler(*args, **kwargs)
  File "/usr/lib/python3.8/site-packages/cherrypy/_cpdispatch.py", line 54, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/ceph/src/pybind/mgr/dashboard/controllers/__init__.py", line 666, in inner
    ret = func(*args, **kwargs)
  File "/ceph/src/pybind/mgr/dashboard/controllers/nfsganesha.py", line 294, in lsdir
    paths = cfs.ls_dir(root_dir, depth)
  File "/ceph/src/pybind/mgr/dashboard/services/cephfs.py", line 78, in ls_dir
    return [self.get_directory(p) for p in paths if p != path.encode()]
  File "/ceph/src/pybind/mgr/dashboard/services/cephfs.py", line 78, in <listcomp>
    return [self.get_directory(p) for p in paths if p != path.encode()]
AttributeError: 'bytes' object has no attribute 'encode'

This also breaks the typeahead feature (auto-completing folder names when typing), the following feature displays right prompt.


Files

cephfs_path_error.png (55.7 KB) cephfs_path_error.png Kiefer Chang, 09/09/2020 08:52 AM
cephfs_path_typeahead.png (40.3 KB) cephfs_path_typeahead.png Kiefer Chang, 09/09/2020 08:52 AM

Related issues 2 (0 open2 closed)

Related to Dashboard - Feature #42617: mgr/dashboard: Add reload button for CephFS directoriesResolvedStephan Müller

Actions
Copied to Dashboard - Backport #47822: octopus: mgr/dashboard: error when typing existing folder name in the NFS-Ganesha formResolvedKiefer ChangActions
Actions #1

Updated by Kiefer Chang over 3 years ago

  • Status changed from New to In Progress
  • Assignee set to Kiefer Chang
Actions #2

Updated by Kiefer Chang over 3 years ago

  • Status changed from In Progress to Fix Under Review
  • Pull request ID set to 37064
Actions #3

Updated by Kiefer Chang over 3 years ago

The underlying API call `CephFS.ls_dir` was changed in https://github.com/ceph/ceph/pull/32552

Actions #4

Updated by Lenz Grimmer over 3 years ago

  • Related to Feature #42617: mgr/dashboard: Add reload button for CephFS directories added
Actions #5

Updated by Lenz Grimmer over 3 years ago

  • Status changed from Fix Under Review to Pending Backport
  • Target version set to v16.0.0
Actions #6

Updated by Nathan Cutler over 3 years ago

  • Copied to Backport #47822: octopus: mgr/dashboard: error when typing existing folder name in the NFS-Ganesha form added
Actions #7

Updated by Lenz Grimmer over 3 years ago

  • Status changed from Pending Backport to Resolved
Actions #8

Updated by Ernesto Puerta about 3 years ago

  • Project changed from mgr to Dashboard
  • Category changed from 144 to Component - NFS
Actions

Also available in: Atom PDF