Bug 1395155

Summary: 500 Internal error message show when input wrong user/password in Openstack Keystone Trust
Product: [Retired] Beaker Reporter: wangdong <dowang>
Component: web UIAssignee: Roman Joost <rjoost>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: developCC: dcallagh, huiwang, mjia, rjoost
Target Milestone: 24.0Keywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-21 18:48:48 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:
Attachments:
Description Flags
500 error message. none

Description wangdong 2016-11-15 09:56:21 UTC
Created attachment 1220782 [details]
500 error message.

Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:
easy

Steps to Reproduce:
1. Goto Openstack Keystone Trust tab
2. Input wrong word 
3.

Actual results:
as capture. This message may come from Openstack.

Expected results:
Beaker need transfer this to a kindly message.

Additional info:

Comment 1 Dan Callaghan 2016-11-16 03:51:58 UTC
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/lib/python2.6/site-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/lib/python2.6/site-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/lib/python2.6/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/python2.6/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/lib/python2.6/site-packages/bkr/server/flask_util.py", line 219, in wrapper
    return f(*args, **kwds)
  File "/usr/lib/python2.6/site-packages/bkr/server/user.py", line 488, in create_keystone_trust
    data['openstack_password'], data['openstack_project_name'])
  File "/usr/lib/python2.6/site-packages/bkr/server/dynamic_virt.py", line 184, in create_keystone_trust
    raise ValueError(exc.message)
ValueError: The request you have made requires authentication.

Comment 2 Dan Callaghan 2016-11-16 03:52:46 UTC
(In reply to wangdong from comment #0)
> Version-Release number of selected component (if applicable):
> 

This is unreleased develop (commit 3263ec1).

Comment 3 matt jia 2016-11-29 05:31:38 UTC
This is due to I forgot to use the convert_internal_errors decorator when creating the keystone trust. The expect result should raise 400 with the error message.

Comment 4 Roman Joost 2016-12-14 05:00:21 UTC
Actually had forgot to move the bug to POST. Patch available in gerrit:

https://gerrit.beaker-project.org/#/c/5471

Comment 6 Hui Wang 2017-01-12 01:41:20 UTC
Verified this issue.
The result is PASS.
Version: Beaker 24.0.git.241.4eb2414 

Input invalid username/password in OpenStack keytone trust,it will give the friendly message:
Could not authenticate with OpenStack using your credentials: The request you have made requires authentication.

Comment 7 Dan Callaghan 2017-02-21 18:48:48 UTC
Beaker 24.0 has been released.