Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1513932 - Not able to create compute resource with OpenStack v3 keystone authentication in satellite.
Not able to create compute resource with OpenStack v3 keystone authentication...
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Compute Resources - OpenStack (Show other bugs)
6.2.12
All Linux
unspecified Severity high (vote)
: 6.3.2
: Unused
Assigned To: Daniel Lobato Garcia
Sanket Jagtap
: Triaged
: 1459729 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-11-16 05:11 EST by Varatharaja Perumal G
Modified: 2018-07-16 04:45 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1572294 (view as bug list)
Environment:
Last Closed: 2018-06-19 16:17:00 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Create host on Openstack (25.01 KB, image/png)
2017-12-18 01:16 EST, Sanket Jagtap
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 12054 None None None 2017-11-21 02:31 EST
Foreman Issue Tracker 21675 None None None 2017-11-27 06:44 EST
Foreman Issue Tracker 21682 None None None 2017-11-27 06:44 EST
Foreman Issue Tracker 23818 None None None 2018-06-06 09:57 EDT
Red Hat Product Errata RHBA-2018:1950 None None None 2018-06-19 16:18 EDT

  None (edit)
Description Varatharaja Perumal G 2017-11-16 05:11:35 EST
Description of problem:

Not able to create compute resource with OpenStack v3 keystone authentication in the satellite 6.2.12.

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

How reproducible:

Steps to Reproduce:
1. Create a compute resource
2. https://openstack URL/v3/auth/tokens
3.

Actual results:
Error while creating compute resource (Actual(400 Bad Request) excon.error.response)

Expected results:
Should be able to create compute resource.

Additional info:

https://github.com/theforeman/foreman/pull/4254
Comment 1 Daniel Lobato Garcia 2017-11-21 02:31:21 EST
Connecting redmine issue http://projects.theforeman.org/issues/12054 from this bug
Comment 2 Daniel Lobato Garcia 2017-11-21 02:34:29 EST
The changes were merged upstream. I believe https://github.com/theforeman/foreman/pull/5008https://github.com/theforeman/foreman/pull/5011 should be merged too. 

I'll close this one as POST, when the 3 PRs are merged upstream I will submit a merge request downstream for each of them. Thanks for the BZ Varathaja.

This will likely go in 6.3, not 6.2.x.
Comment 4 Daniel Lobato Garcia 2017-11-22 11:01:11 EST
*** Bug 1459729 has been marked as a duplicate of this bug. ***
Comment 5 Daniel Lobato Garcia 2017-11-27 06:43:43 EST
Connecting redmine issue http://projects.theforeman.org/issues/5011 from this bug
Comment 6 Daniel Lobato Garcia 2017-11-27 06:44:28 EST
Connecting redmine issue http://projects.theforeman.org/issues/21682 from this bug
Comment 7 Daniel Lobato Garcia 2017-11-27 06:44:46 EST
Connecting redmine issue http://projects.theforeman.org/issues/21675 from this bug
Comment 8 Patrick Creech 2017-11-30 11:26:59 EST
Adam,

This didn't cherry-pick cleanly for me, and I'm not that familiar with the codebase.  Could you do the pick for me?

Thanks,
Patrick
Comment 10 Sanket Jagtap 2017-12-18 01:09:21 EST
Build: Satellite 6.3.0 snap 29

Error on UI:
Unable to save
Could not find service identity_v3, identityv3, identity. Have alarming, cloudformation, compute, identity, image, metering, metric, network, object-store, orchestration, volume, volumev2, volumev3

I am unable to add the OSP CR with URL/v3/auth/tokens

But it works, fine with URL/v2.0/tokens

No trace-back in production logs

Log:
2017-12-18 01:05:28 dcef3914 [app] [I] Started PUT "/compute_resources/test_connection" for 10.67.116.173 at 2017-12-18 01:05:28 -0500
2017-12-18 01:05:28 dcef3914 [app] [I] Processing by ComputeResourcesController#test_connection as */*
2017-12-18 01:05:28 dcef3914 [app] [I]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"T8XuT/TOeeu/BEQUBcgcKzOPySaaZMl4210Ip+mkJONoaMeFdVzLHfEqWV0fmF5gJ57CtO+8CxBSCBksvcKEwg==", "compute_resource"=>{"name"=>"openstack", "provider"=>"Openstack", "description"=>"", "url"=>"https://OSP:13000/v3/auth/tokens", "user"=>"User", "password"=>"[FILTERED]", "domain"=>"Default", "allow_external_network"=>"0", "location_ids"=>["", "2"], "organization_ids"=>["", "1"]}, "fakepassword"=>"[FILTERED]", "cr_id"=>"null"}
2017-12-18 01:05:28 dcef3914 [app] [I] Current user: admin (administrator)
2017-12-18 01:05:28 dcef3914 [app] [I] Expire fragment views/tabs_and_title_records-3 (0.1ms)
2017-12-18 01:05:30 dcef3914 [app] [I]   Rendered compute_resources/form/_openstack.html.erb (947.2ms)
2017-12-18 01:05:30 dcef3914 [app] [I]   Rendered taxonomies/_loc_org_tabs.html.erb (11.5ms)
2017-12-18 01:05:30 dcef3914 [app] [I]   Rendered compute_resources/_form.html.erb (966.5ms)
2017-12-18 01:05:30 dcef3914 [app] [I] Completed 200 OK in 1756ms (Views: 965.6ms | ActiveRecord: 8.7ms)
Comment 11 Sanket Jagtap 2017-12-18 01:16 EST
Created attachment 1369285 [details]
Create host on Openstack

The error is seen when we try to create a host with V3 URL in Openstack CR

Also , same error is observed with we click on Load Tenants while creating the Openstack CR
Comment 12 Daniel Lobato Garcia 2018-01-18 04:34:16 EST
I've been testing this on the same HW as Sanket today, one of the problems:

"Could not find service identity_v3, identityv3, identity. Have alarming, cloudformation, compute, identity, image, metering, metric, network, object-store, orchestration, volume, volumev2, volumev3" 

is related to the fact this 6.3 instance is using foreman-1.15.6.26-1.el7sat.noarch, which uses fog 1.38.

Latest fog uses fog 1.41, which does not return this error. https://gitlab.sat.lab.tlv.redhat.com/satellite6/foreman/blob/SATELLITE-6.3.0/bundler.d/fog.rb
Comment 13 Daniel Lobato Garcia 2018-01-18 05:19:08 EST
Looks like Fog 1.41 will not be present in Satellite 6.3, only fog 1.38 will be. I am looking into what changes are required here (cherry-picks from Fog upstream or a rebase).
Comment 14 Daniel Lobato Garcia 2018-01-18 05:40:23 EST
Apparently for OpenStack Pike, it works fine with the current version (openstack-keystone 12.0.0)
Comment 15 Daniel Lobato Garcia 2018-01-18 09:24:51 EST
The OpenStack server where this was tested against didn't have Identity v3 API available. Waiting on QE to test on another OpenStack instance.
Comment 16 Sanket Jagtap 2018-01-18 13:58:30 EST
Spent some time to get a local openstack instance with Identity v3 API, Now i am able to to test connection to the OSP (Green) and able to fetch the tenant.
But when we try to submit it errors out:

Oops, we're sorry but something went wrong Expected(200) <=> Actual(404 Not Found) excon.error.response :body => "{\"message\": \"The resource could not be found.<br /><br />\\n\\n\\n\", \"code\": \"404 Not Found\", \"title\": \"Not Found\"}" :cookies => [ ] :headers => { "Content-Length" => "112" "Content-Type" => "application/json" "Date" => "Thu, 18 Jan 2018 18:37:50 GMT" "X-Compute-Request-Id" => "req-8a4764eb-f1bb-44e6-bf7f-f6bdc1546009" "X-Openstack-Request-Id" => "req-8a4764eb-f1bb-44e6-bf7f-f6bdc1546009" } :host => "xxxxxx" :local_address => "xxxxxx" :local_port => 39558 :path => "/v2.1/5b47cfd8bb7145ca8ad32de5d3b1112b/os-keypairs.json" :port => 8774 :reason_phrase => "Not Found" :remote_ip => "xxxxxxx" :status => 404 :status_line => "HTTP/1.1 404 Not Found\r\n
Comment 17 Daniel Lobato Garcia 2018-01-18 14:09:59 EST
The error above goes away with fog-openstack 0.1.23 (vs the packaged one which is 0.1.18).
Comment 23 matt jia 2018-04-06 02:06:13 EDT
(In reply to Sanket Jagtap from comment #16)
> Spent some time to get a local openstack instance with Identity v3 API, Now
> i am able to to test connection to the OSP (Green) and able to fetch the
> tenant.
> But when we try to submit it errors out:
> 
> Oops, we're sorry but something went wrong Expected(200) <=> Actual(404 Not
> Found) excon.error.response :body => "{\"message\": \"The resource could not
> be found.<br /><br />\\n\\n\\n\", \"code\": \"404 Not Found\", \"title\":
> \"Not Found\"}" :cookies => [ ] :headers => { "Content-Length" => "112"
> "Content-Type" => "application/json" "Date" => "Thu, 18 Jan 2018 18:37:50
> GMT" "X-Compute-Request-Id" => "req-8a4764eb-f1bb-44e6-bf7f-f6bdc1546009"
> "X-Openstack-Request-Id" => "req-8a4764eb-f1bb-44e6-bf7f-f6bdc1546009" }
> :host => "xxxxxx" :local_address => "xxxxxx" :local_port => 39558 :path =>
> "/v2.1/5b47cfd8bb7145ca8ad32de5d3b1112b/os-keypairs.json" :port => 8774
> :reason_phrase => "Not Found" :remote_ip => "xxxxxxx" :status => 404
> :status_line => "HTTP/1.1 404 Not Found\r\n

Cu hit this error when using RHOSP12. See case 02040352. The URL /v2/auth/tokens was being used in 6.2. I also tried it in 6.3 and hit the same error. Could we please ask QE to verify whether this also works for RHOSP12? If not, I can open a new bug.
Comment 31 Sanket Jagtap 2018-06-04 06:47:43 EDT
Build: Satellite 6.3.2

I am able to do "Test Connection" for OSP12 but on submitting the CR I see error on UI 

Expected(200) <=> Actual(201 Created) excon.error.response :body => "{\"keypair\": {\"public_key\": \"ssh-rsa 

PFA for whole error
Comment 36 Daniel Lobato Garcia 2018-06-06 10:06:14 EDT
https://github.com/theforeman/foreman-packaging/pull/2616
and 
https://github.com/theforeman/foreman/pull/5660

should fix this upstream. The packaging change at least has to be cherry-picked downstream once it's merged.
Comment 37 Sanket Jagtap 2018-06-12 03:33:22 EDT
Build: Satellite 6.3.2 snap2

I am able to create the OSP12 resource successfully
PFA

Log:

2018-06-12 03:31:35 853e1b80 [app] [I] Started PATCH "/compute_resources/3-osp12" for 10.67.116.196 at 2018-06-12 03:31:35 -0400
2018-06-12 03:31:35 853e1b80 [app] [I] Processing by ComputeResourcesController#update as HTML
2018-06-12 03:31:35 853e1b80 [app] [I]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"GiQfr/vFzTW03/tfLeVB2nW078D0N5kQs6spMP8Gquw8X0JAleJxYDbe8uEx/N8cBpw8+8yi4g0SEM7N7e9hNw==", "compute_resource"=>{"name"=>"osp12", "description"=>"", "url"=>"http://IP:5000/v3/auth/tokens", "user"=>"admin", "domain"=>"Default", "tenant"=>"admin", "allow_external_network"=>"0", "location_ids"=>["", "2"], "organization_ids"=>["", "1"]}, "commit"=>"Submit", "id"=>"3-osp12"}
2018-06-12 03:31:35 853e1b80 [app] [I] Current user: admin (administrator)
2018-06-12 03:31:35 853e1b80 [app] [I] Expire fragment views/tabs_and_title_records-3 (0.2ms)
2018-06-12 03:31:35 853e1b80 [app] [I] Redirected to https://qe-sat6-feature-rhel7.satqe.lab.eng.rdu2.redhat.com/compute_resources
2018-06-12 03:31:35 853e1b80 [app] [I] Completed 302 Found in 55ms (ActiveRecord: 6.5ms)
2018-06-12 03:31:36 c5bdaafb [app] [I] Started GET "/compute_resources" for 10.67.116.196 at 2018-06-12 03:31:36 -0400
2018-06-12 03:31:36 c5bdaafb [app] [I] Processing by ComputeResourcesController#index as HTML
2018-06-12 03:31:36 c5bdaafb [app] [I] Current user: admin (administrator)
2018-06-12 03:31:36 c5bdaafb [app] [I] Expire fragment views/tabs_and_title_records-3 (0.1ms)
2018-06-12 03:31:36 c5bdaafb [app] [I]   Rendered compute_resources/index.html.erb within layouts/application (100.5ms)
2018-06-12 03:31:36 c5bdaafb [app] [I]   Rendered common/_searchbar.html.erb (9.4ms)
2018-06-12 03:31:36 c5bdaafb [app] [I]   Rendered layouts/_application_content.html.erb (11.6ms)
2018-06-12 03:31:36 c5bdaafb [app] [I] Deface: [WARNING] No :original defined for 'theme_resources', you should change its definition to include:
 |  :original => '3e6eaabe85a6c70b2023f985d7f96e424d1b2f2d' 
2018-06-12 03:31:36 c5bdaafb [app] [I] Deface: [WARNING] No :original defined for 'remove foreman name from topbar', you should change its definition to include:
 |  :original => '6f86bcbd36e017373b168cc34f62c6deb016bb55' 
2018-06-12 03:31:36 c5bdaafb [app] [I] Deface: [WARNING] No :original defined for 'add link to home', you should change its definition to include:
 |  :original => '65925c62c5e6c4f7b9ec13a7f700a1ae8bd39ec2' 
2018-06-12 03:31:36 c5bdaafb [app] [I]   Rendered home/_submenu.html.erb (2.6ms)
2018-06-12 03:31:36 c5bdaafb [app] [I]   Rendered home/_user_dropdown.html.erb (2.9ms)
2018-06-12 03:31:36 c5bdaafb [app] [I] Read fragment views/tabs_and_title_records-3 (0.2ms)
2018-06-12 03:31:36 c5bdaafb [app] [I]   Rendered home/_organization_dropdown.html.erb (8.8ms)
2018-06-12 03:31:36 c5bdaafb [app] [I]   Rendered home/_location_dropdown.html.erb (10.3ms)
2018-06-12 03:31:36 c5bdaafb [app] [I]   Rendered home/_org_switcher.html.erb (22.1ms)
2018-06-12 03:31:36 c5bdaafb [app] [I]   Rendered home/_submenu.html.erb (8.8ms)
2018-06-12 03:31:36 c5bdaafb [app] [I]   Rendered home/_submenu.html.erb (33.3ms)
2018-06-12 03:31:36 c5bdaafb [app] [I]   Rendered home/_submenu.html.erb (2.7ms)
2018-06-12 03:31:36 c5bdaafb [app] [I]   Rendered home/_submenu.html.erb (12.1ms)
2018-06-12 03:31:36 c5bdaafb [app] [I]   Rendered home/_submenu.html.erb (6.3ms)
2018-06-12 03:31:36 c5bdaafb [app] [I]   Rendered home/_submenu.html.erb (4.6ms)
2018-06-12 03:31:36 c5bdaafb [app] [I]   Rendered home/_submenu.html.erb (4.1ms)
2018-06-12 03:31:36 c5bdaafb [app] [I]   Rendered home/_submenu.html.erb (7.7ms)
2018-06-12 03:31:36 c5bdaafb [app] [I] Write fragment views/tabs_and_title_records-3 (1.1ms)
2018-06-12 03:31:36 c5bdaafb [app] [I]   Rendered home/_topbar.html.erb (281.6ms)
2018-06-12 03:31:36 c5bdaafb [app] [I]   Rendered layouts/base.html.erb (296.7ms)
2018-06-12 03:31:36 c5bdaafb [app] [I] Completed 200 OK in 467ms (Views: 418.9ms | ActiveRecord: 8.5ms)
2018-06-12 03:31:38 9879c917 [app] [I] Started GET "/notification_recipients" for 10.67.116.196 at 2018-06-12 03:31:38 -0400
2018-06-12 03:31:38 9879c917 [app] [I] Processing by NotificationRecipientsController#index as JSON
2018-06-12 03:31:38 9879c917 [app] [I] Current user: admin (administrator)
2018-06-12 03:31:38 9879c917 [app] [I] Expire fragment views/tabs_and_title_records-3 (0.5ms)
2018-06-12 03:31:38 9879c917 [app] [I] Completed 200 OK in 10ms (Views: 0.1ms | ActiveRecord: 0.7ms)
Comment 40 errata-xmlrpc 2018-06-19 16:17:00 EDT
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/RHBA-2018:1950

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