Actions
Bug #23404
closeddashboard module does not work in Python 3-only environment
% 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
Environment: SLE-15 (Python 3-only)
After enabling the dashboard, it is impossible to run "ceph mgr dashboard set-login-credentials <username> <password>". The output is: "no valid command found".
The log shows:
2018-03-19 13:48:04.130 7fe940513700 0 log_channel(audit) log [DBG] : from='client.14160 149.202.189.62:0/3426884016' entity='client.admin' cmd=[{"prefix": "dashboard set-login-credentials", "username": "admin", "password": "admin"}]: dispatch 2018-03-19 13:48:04.130 7fe940513700 1 mgr.server handle_command pyc_prefix: 'balancer status' 2018-03-19 13:48:04.130 7fe940513700 1 mgr.server handle_command pyc_prefix: 'balancer mode' 2018-03-19 13:48:04.130 7fe940513700 1 mgr.server handle_command pyc_prefix: 'balancer on' 2018-03-19 13:48:04.130 7fe940513700 1 mgr.server handle_command pyc_prefix: 'balancer off' 2018-03-19 13:48:04.130 7fe940513700 1 mgr.server handle_command pyc_prefix: 'balancer eval' 2018-03-19 13:48:04.130 7fe940513700 1 mgr.server handle_command pyc_prefix: 'balancer eval-verbose' 2018-03-19 13:48:04.130 7fe940513700 1 mgr.server handle_command pyc_prefix: 'balancer optimize' 2018-03-19 13:48:04.130 7fe940513700 1 mgr.server handle_command pyc_prefix: 'balancer show' 2018-03-19 13:48:04.130 7fe940513700 1 mgr.server handle_command pyc_prefix: 'balancer rm' 2018-03-19 13:48:04.130 7fe940513700 1 mgr.server handle_command pyc_prefix: 'balancer reset' 2018-03-19 13:48:04.130 7fe940513700 1 mgr.server handle_command pyc_prefix: 'balancer dump' 2018-03-19 13:48:04.130 7fe940513700 1 mgr.server handle_command pyc_prefix: 'balancer execute' 2018-03-19 13:48:04.130 7fe940513700 1 mgr.server handle_command pyc_prefix: 'dashboard set-login-credentials' 2018-03-19 13:48:04.138 7fe940d14700 1 mgr.server reply handle_command (22) Invalid argument Traceback (most recent call last): File "/usr/lib64/ceph/mgr/dashboard_v2/module.py", line 155, in handle_command Auth.set_login_credentials(cmd['username'], cmd['password']) File "/usr/lib64/ceph/mgr/dashboard_v2/controllers/auth.py", line 90, in set_login_credentials hashed_passwd = Auth.password_hash(password) File "/usr/lib64/ceph/mgr/dashboard_v2/controllers/auth.py", line 62, in password_hash return bcrypt.hashpw(password, salt_password) File "/usr/lib64/python3.6/site-packages/bcrypt/__init__.py", line 62, in hashpw raise TypeError("Unicode-objects must be encoded before hashing") TypeError: Unicode-objects must be encoded before hashing
Full log attached.
Files
Actions