Bug #27076
openCompute Resource Openstack API v2/v3 mismatch
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.
Updated by Anthony Chevalet about 5 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.
Updated by Anthony Chevalet about 5 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.
Updated by Anthony Chevalet almost 5 years ago
- Related to Bug #26664: OpenStack 401 when project domain ID is missing added