Project

General

Profile

Actions

Bug #42651

closed

mgr/dashboard: error when editing rbd image whose name contains non-ASCII chars.

Added by Alfonso Martínez over 4 years ago. Updated about 3 years ago.

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

0%

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

Description

Verified for this environment:
OS: CentOS 7
Python version: 2.7.5

After creating rbd image with name like "año" (non-ASCII chars: ñ),
if you try to edit image, you get an error:

2019-10-30T19:34:33.269+0000 7f8ca4be6700  0 mgr[dashboard] [30/Oct/2019:19:34:33]  Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/cherrypy/_cprequest.py", line 102, in run
    hook()
  File "/usr/lib/python2.7/site-packages/cherrypy/_cprequest.py", line 62, in __call__
    return self.callback(**self.kwargs)
  File "/ceph/src/pybind/mgr/dashboard/tools.py", line 53, in request_begin
    req.method, user, req.path_info)
  File "/usr/lib64/python2.7/logging/__init__.py", line 1137, in debug
    self._log(DEBUG, msg, args, **kwargs)
  File "/usr/lib64/python2.7/logging/__init__.py", line 1268, in _log
    self.handle(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 1278, in handle
    self.callHandlers(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 1318, in callHandlers
    hdlr.handle(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 749, in handle
    self.emit(record)
  File "/ceph/src/pybind/mgr/mgr_module.py", line 65, in emit
    self._module._ceph_log(ceph_level, self.format(record))
  File "/usr/lib64/python2.7/logging/__init__.py", line 724, in format
    return fmt.format(record)
  File "/usr/lib64/python2.7/logging/__init__.py", line 464, in format
    record.message = record.getMessage()
  File "/usr/lib64/python2.7/logging/__init__.py", line 328, in getMessage
    msg = msg % self.args
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 21: ordinal not in range(128)

It seems that this line is the origin:
https://github.com/ceph/ceph/blob/master/src/pybind/mgr/dashboard/tools.py#L52

logger.debug('[%s:%s] [%s] [%s] %s', req.remote.ip, req.remote.port,
                     req.method, user, req.path_info)

Actions

Also available in: Atom PDF