Bug 1628639

Summary: Getting an error when trying to change password in Horizon dashboard.
Product: Red Hat OpenStack Reporter: Andrey Fiodorov <afiodoro>
Component: python-django-horizonAssignee: Radomir Dopieralski <rdopiera>
Status: CLOSED ERRATA QA Contact: Andrey Fiodorov <afiodoro>
Severity: medium Docs Contact:
Priority: medium    
Version: 14.0 (Rocky)CC: afiodoro, athomas, beth.white, jrist, mrunge, rdopiera
Target Milestone: betaKeywords: Regression, Triaged
Target Release: 14.0 (Rocky)   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: python-django-horizon-14.0.1-0.20181006183340.19865ee.el7ost.src.rpm Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-01-11 11:53:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andrey Fiodorov 2018-09-13 15:42:24 UTC
Description of problem:

Getting an error when trying to change password in Horizon dashboard.

Version-Release number of selected component (if applicable):
python-django-horizon-14.0.1-0.20180903221923.e975afd.el7ost.2.noarch

How reproducible:
100%

Steps to Reproduce:
1. Install OSP14-passed-phase1(containerized)
2. deploy overcloud
3. Login to Horizon dashboard with admin user
4. Go to settings->change-password set a old and a new password and click on "change" button.

Actual results:
Getting 2 Errors:
1: Error: Unauthorized: Unable to change password.
2: Error: Unauthorized. Please try logging in again.

Expected results:
Password should be changed

Additional info:
Link to test run in polation:
https://polarion.engineering.redhat.com/polarion/#/project/RHELOpenStackPlatform/workitem?id=RHOSP7-5277

Comment 2 Jason E. Rist 2018-09-13 15:54:22 UTC
Can you please be more specific with the puddle number?

Comment 3 Jason E. Rist 2018-09-13 15:56:10 UTC
2018.09.06

Comment 4 Radomir Dopieralski 2018-10-11 19:55:56 UTC
The same error happens when using an upstream Horizon connected to deployed OSP14.

The logs say:

Traceback (most recent call last):
  File "/usr/share/openstack-dashboard/openstack_dashboard/dashboards/settings/password/forms.py", line 67, in handle
    data['new_password'])
  File "/usr/share/openstack-dashboard/openstack_dashboard/api/keystone.py", line 573, in user_update_own_password
    return client.users.update_password(origpassword, password)
  File "/usr/lib/python2.7/site-packages/keystoneclient/v3/users.py", line 226, in update_password
    return self._update(base_url, params, method='POST', log=False)
  File "/usr/lib/python2.7/site-packages/keystoneclient/base.py", line 228, in _update
    **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 334, in post
    return self.request(url, 'POST', **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 487, in request
    resp = super(LegacyJsonAdapter, self).request(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 213, in request
    return self.session.request(url, method, **kwargs)
  File "/usr/lib/python2.7/site-packages/keystoneauth1/session.py", line 869, in request
    raise exceptions.from_response(resp, method, url)
Unauthorized: The request you have made requires authentication. (HTTP 401) (Request-ID: req-9687e20c-d859-46ca-9051-23e04c8d34c8)
2018-10-11 19:40:40,955 9450 ERROR horizon.exceptions Unauthorized: 
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/horizon/forms/views.py", line 185, in form_valid
    handled = form.handle(self.request, form.cleaned_data)
  File "/usr/lib/python2.7/site-packages/django/views/decorators/debug.py", line 36, in sensitive_variables_wrapper
    return func(*func_args, **func_kwargs)
  File "/usr/share/openstack-dashboard/openstack_dashboard/dashboards/settings/password/forms.py", line 74, in handle
    _('Unable to change password.'))
  File "/usr/lib/python2.7/site-packages/horizon/exceptions.py", line 334, in handle
    log_method, log_entry, log_level)
  File "/usr/lib/python2.7/site-packages/horizon/exceptions.py", line 230, in handle_unauthorized
    raise NotAuthorized
NotAuthorized

Maybe we need to have that enabled in Keystone?

Comment 5 Radomir Dopieralski 2018-10-12 08:48:09 UTC
Changing password via the CLI works.

Comment 6 Radomir Dopieralski 2018-10-12 09:36:38 UTC
The only logs in Keystone (despite enabling debug logging) are:

2018-10-12 05:33:06.148 28315 INFO keystone.common.wsgi [req-e4f19c78-cefe-4dac-b11e-21e0384bf570 fc53debfac204fe5980ae1e6adf71c94 817f6f7d511b487d82386ee7ea740f6c - default default] POST http://192.168.122.89:5000/v3/users/None/password
2018-10-12 05:33:06.200 28315 WARNING keystone.common.wsgi [req-e4f19c78-cefe-4dac-b11e-21e0384bf570 fc53debfac204fe5980ae1e6adf71c94 817f6f7d511b487d82386ee7ea740f6c - default default] Authorization failed. The request you have made requires authentication. from 192.168.122.89: Unauthorized: The request you have made requires authentication.

Comment 7 Radomir Dopieralski 2018-10-12 09:53:59 UTC
Ah, I see, the problem is that the user id is None for some reason in the call to http://192.168.122.89:5000/v3/users/None/password

Comment 12 Andrey Fiodorov 2018-11-12 08:08:21 UTC
The bug was fixed, the password changing is working now.

Comment 14 errata-xmlrpc 2019-01-11 11:53:06 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2019:0045