Project

General

Profile

Bug #27076

Compute Resource Openstack API v2/v3 mismatch

Added by Sylvain Coutant about 3 years ago. Updated almost 3 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Compute resources - OpenStack
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

Whatever Keystone URL you enter gets sometimes replaced by /v2.0/tokens. When creating a new compute resource, fill the form (with http://.../v3/auth/tokens in Url field), click on "load" to get projects list filled, it will work and issue the good request :

Keystone server: "POST /v3/auth/tokens HTTP/1.1" 201 725 "-" "fog-core/2.1.0"

Now, click on the "Test Connection" button that replaced the load button and the request will be issued with against v2 (while the Url field didn't changed and still use v3):

Keystone server: "POST /v2.0/tokens HTTP/1.1" 404 460 "-" "fog-core/2.1.0"

Error reported by Foreman:

Expected([200, 201]) <=> Actual(404 Not Found) excon.error.response :body => "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">\n<title>404 Not Found</title>\n<h1>Not Found</h1>\n<p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p>\n" :cookies => [ ] :headers => { "Content-Length" => "233" "Content-Type" => "text/html" "Date" => "Tue, 18 Jun 2019 14:53:10 GMT" "Server" => "Apache/2.4.29 (Ubuntu)" "Vary" => "X-Auth-Token" "x-openstack-request-id" => "req-671e1e1c-0134-45df-b438-3c8d4fe5bc8e" } :host => "keystone..example.com" :local_address => "192.168.253.55" :local_port => 48720 :path => "/v2.0/tokens" :port => 5000 :reason_phrase => "NOT FOUND" :remote_ip => "10.0.4.11" :status => 404 :status_line => "HTTP/1.1 404 NOT FOUND\r\n"

Looks like a cousin of https://projects.theforeman.org/issues/25476

Running 1.22.0 installed by packages on Ubuntu 18.04.


Related issues

Related to Foreman - Bug #26664: OpenStack 401 when project domain ID is missingClosed

History

#1 Updated by Anthony Chevalet almost 3 years ago

I have same issue after update from 1.21 to 1.22. All my openstack compute resources stop working. This is a real blocker for production update.

#2 Updated by Anthony Chevalet almost 3 years ago

I have the same error when I click the "load" button:

Expected([200, 201]) <=> Actual(401 Unauthorized) excon.error.response :body => "{\"error\": {\"message\": \"The request you have made requires authentication.\", \"code\": 401, \"title\": \"Unauthorized\"}}" :cookies => [ ] :headers => { "Connection" => "close" "Content-Length" => "114" "Content-Type" => "application/json" "Date" => "Tue, 20 Aug 2019 13:29:11 GMT" "Server" => "Apache" "Vary" => "X-Auth-Token" "WWW-Authenticate" => "Keystone uri=\"https://myopenstack.com:5000\"" "x-openstack-request-id" => "req-be84e450-c216-4f76-97f9-1049b29dc052" } :host => "myopenstack.com" :local_address => "172.1.1.4" :local_port => 53268 :path => "/v2.0/tokens" :port => 5000 :reason_phrase => "Unauthorized" :remote_ip => "172.2.2.2" :status => 401 :status_line => "HTTP/1.1 401 Unauthorized\r\n" 

with url: https://myopenstack.com:5000/v3/auth/tokens

It looks to be linked to fog-openstack update.

#3 Updated by Anthony Chevalet over 2 years ago

  • Related to Bug #26664: OpenStack 401 when project domain ID is missing added

Also available in: Atom PDF