Bug 1554329

Summary: OSPD 13 Undercloud - Infrastructure Provider Credential validation Failed
Product: Red Hat CloudForms Management Engine Reporter: Ido Ovadia <iovadia>
Component: ProvidersAssignee: Marek Aufart <maufart>
Status: CLOSED CURRENTRELEASE QA Contact: Ido Ovadia <iovadia>
Severity: high Docs Contact:
Priority: high    
Version: 5.9.0CC: cpelland, gblomqui, jfrey, jhardy, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.10.0   
Hardware: x86_64   
OS: All   
Whiteboard:
Fixed In Version: 5.10.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1559630 1595771 (view as bug list) Environment:
Last Closed: 2019-02-11 13:58:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Openstack Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1559630, 1595771    
Attachments:
Description Flags
Provider V3 Error
none
evm log none

Description Ido Ovadia 2018-03-12 12:52:24 UTC
Description of problem:
=======================

OSPD 13

Credential validation was not successful: Unexpected response returned from system: Expected([201]) Actual(400 Bad Request) excon.error.response :body =&gt; "{\"error\": {\"message\": \"Invalid input for field 'scope/project/domain/name': None is not of type 'string'\\n\\nFailed validating 'type' in schema['properties']['scope']['properties']['project']['properties']['domain']['properties']['name']:\\n {'type': 'string'}\\n\\nOn instance['scope']['project']['domain']['name']:\\n None\", \"code\": 400, \"title\": \"Bad Request\"}}" :cookies =&gt; [ ] :headers =&gt; { "Connection" =&gt; "close" "Content-Length" =&gt; "365" "Content-Type" =&gt; "application/json" "Date" =&gt; "Mon, 12 Mar 2018 12:27:59 GMT" "Server" =&gt; "Apache" "Vary" =&gt; "X-Auth-Token" "x-openstack-request-id" =&gt; "req-148fd44d-6ab1-4f86-8372-150100d57e51" } :host =&gt; "192.168.24.1" :local_address =&gt; "10.0.0.55" :local_port =&gt; 58516 :path =&gt; "/v3/auth/tokens" :port =&gt; 5000 :reason_phrase =&gt; "Bad Request" :remote_ip =&gt; "192.168.24.1" :status =&gt; 400 :status_line =&gt; "HTTP/1.1 400 Bad Request\r\n"

Version-Release number of selected component:
=============================================
RHOS 13, CFME 5.9.0.22

How reproducible:
=================
100%

Steps to Reproduce:
===================
1. Compute --> Infrastructure Provider
2. Configuration --> Add New a Infrastructure Provider
3. Add credentials 

Actual results:
===============
Credential validation was not successful

Expected results:
=================
Credential validation successful 

Additional info:
================

Screen shot and log are enclosed

1. Http request from CFME to Undercloud pased
 
curl http://192.168.24.1:5000
{"versions": {"values": [{"status": "stable", "updated": "2018-02-28T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.10", "links": [{"href": "http://192.168.24.1:5000/v3/", "rel": "self"}]}, {"status": "deprecated", "updated": "2016-08-04T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v2.0+json"}], "id": "v2.0", "links": [{"href": "http://192.168.24.1:5000/v2.0/", "rel": "self"}, {"href": "

2. I have manage to get an undercloud keystone token to CFME

root@localhost ~]# ./get_UC_token.sh 
gAAAAABapnGGmW0QMlCqgI6UTOeotLqgmO3RBXjSGcIv8_bbBSqO_TSWj7nmUrGhDJLa3GyxqczAmfYldM2dIy8xP7R2ElgSmdttEG1eOdHulzpPivNzgvq6wjyY61-pTH9J-1zrON-iw_OP8n1ZS7ItafV5IeLccBQItsXoEuMKNtk8WbSFYH8

Comment 1 Ido Ovadia 2018-03-12 12:54:09 UTC
Created attachment 1407175 [details]
Provider V3 Error

Comment 2 Ido Ovadia 2018-03-12 12:56:39 UTC
Created attachment 1407176 [details]
evm log

Comment 3 Ido Ovadia 2018-03-12 12:58:31 UTC
Credential validation failed also with Keystone V2

Comment 5 Marek Aufart 2018-03-14 11:48:58 UTC
Note, we need update keystone auth headers, example from OSP13 CLI debug:
Using parameters {'username': 'admin', 'project_name': 'admin', 'user_domain_name': 'Default', 'auth_url': 'http://192.168.24.1:5000/', 'password': '***', 'project_domain_name': 'Default'}

Comment 6 Marek Aufart 2018-03-15 14:35:25 UTC
Missing domain-related field was caused by UI which didn't contain needed fields for Keystone v3. Fixed in https://github.com/ManageIQ/manageiq-ui-classic/pull/3632

Keystone v2 seems to be not supported even in OpenStack CLI for OSP13, so we should use Keystone v3 for this and following versions.

Comment 7 CFME Bot 2018-03-19 11:02:11 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:

https://github.com/ManageIQ/manageiq-ui-classic/commit/10da80e9b66e8d548f7a8ffed6b3ff6dd4fd111c
commit 10da80e9b66e8d548f7a8ffed6b3ff6dd4fd111c
Author:     Marek Aufart <maufart>
AuthorDate: Thu Mar 15 10:22:34 2018 -0400
Commit:     Marek Aufart <maufart>
CommitDate: Thu Mar 15 10:22:34 2018 -0400

    Add Keystone Domain to EmsInfra form

    Keystone v2 can be disabled on newer OpenStack versions, we need allow Keystone v3
    auth for EmsInfra. The missing thing was unspecified domain_id.

    Adding the keystone_domain_id field to make Keystone v3 auth working on Infra providers.

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1554329

 app/views/ems_infra/_form.html.haml | 12 +
 1 file changed, 12 insertions(+)

Comment 11 Ido Ovadia 2018-06-27 14:07:35 UTC
@Satoe Imaishi,

Could you please clone this bug for cfme-5.8.z too 

We want 5.8.5 to support RHOS 13z and this bug blocks as

Comment 14 Ido Ovadia 2018-07-09 13:08:38 UTC
Verified
========
CFME 5.10.0.3