Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1554329 - OSPD 13 Undercloud - Infrastructure Provider Credential validation Failed
Summary: OSPD 13 Undercloud - Infrastructure Provider Credential validation Failed
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.9.0
Hardware: x86_64
OS: All
high
high
Target Milestone: GA
: 5.10.0
Assignee: Marek Aufart
QA Contact: Ido Ovadia
URL:
Whiteboard:
Depends On:
Blocks: 1559630 1595771
TreeView+ depends on / blocked
 
Reported: 2018-03-12 12:52 UTC by Ido Ovadia
Modified: 2019-02-11 13:58 UTC (History)
6 users (show)

Fixed In Version: 5.10.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1559630 1595771 (view as bug list)
Environment:
Last Closed: 2019-02-11 13:58:41 UTC
Category: ---
Cloudforms Team: Openstack
Target Upstream Version:


Attachments (Terms of Use)
Provider V3 Error (deleted)
2018-03-12 12:54 UTC, Ido Ovadia
no flags Details
evm log (deleted)
2018-03-12 12:56 UTC, Ido Ovadia
no flags Details

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 => "{\"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 => [ ] :headers => { "Connection" => "close" "Content-Length" => "365" "Content-Type" => "application/json" "Date" => "Mon, 12 Mar 2018 12:27:59 GMT" "Server" => "Apache" "Vary" => "X-Auth-Token" "x-openstack-request-id" => "req-148fd44d-6ab1-4f86-8372-150100d57e51" } :host => "192.168.24.1" :local_address => "10.0.0.55" :local_port => 58516 :path => "/v3/auth/tokens" :port => 5000 :reason_phrase => "Bad Request" :remote_ip => "192.168.24.1" :status => 400 :status_line => "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@redhat.com>
AuthorDate: Thu Mar 15 10:22:34 2018 -0400
Commit:     Marek Aufart <maufart@redhat.com>
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


Note You need to log in before you can comment on or make changes to this bug.