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

Also available in: Atom PDF