Project

General

Profile

Actions

Bug #8746

open

add an Openstack Resource provision type Computer Resources Failed

Added by yating yang over 9 years ago. Updated over 9 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Compute resources - OpenStack
Target version:
-
Difficulty:
hard
Triaged:
Fixed in Releases:
Found in Releases:

Description

I am trying to add an Openstack Resource provision type Computer Resources, it failed due to below error.

Unable to save

Expected([200, 204]) <=> Actual(401 Unauthorized) response => #<Excon::Response:0x007fb9611dc6e0 @data={:body=>"{\"error\": {\"message\": \"The request you have made requires authentication.\", \"code\": 401, \"title\": \"Unauthorized\"}}", :headers=>{"Www-Authenticate"=>"Keystone uri=\"http://10.74.17.248:35357\"", "Vary"=>"X-Auth-Token", "X-Distribution"=>"Ubuntu", "Content-Type"=>"application/json", "Content-Length"=>"114", "Date"=>"Thu, 18 Dec 2014 02:59:44 GMT"}, :status=>401, :remote_ip=>"10.74.17.248", :local_port=>33906, :local_address=>"10.74.15.122"}, @body="{\"error\": {\"message\": \"The request you have made requires authentication.\", \"code\": 401, \"title\": \"Unauthorized\"}}", @headers={"Www-Authenticate"=>"Keystone uri=\"http://10.74.17.248:35357\"", "Vary"=>"X-Auth-Token", "X-Distribution"=>"Ubuntu", "Content-Type"=>"application/json", "Content-Length"=>"114", "Date"=>"Thu, 18 Dec 2014 02:59:44 GMT"}, @status=401, @remote_ip="10.74.17.248", @local_port=33906, @local_address="10.74.15.122">

But I try to ssh Foreman, and send curl command, it can get token successfully.

curl -v -d '{"auth":{"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "KeyAdmin"}}}' -H "Content-type: application/json" http://10.74.17.248:35357/v2.0/tokens

Seems Foreman GUI didn't send correct API request to Openstack.
Foreman version:1.7 Openstack version: Juno

Foreman production log:

Started POST "/compute_resources" for 10.140.82.10 at 2014-12-17 15:45:59 -0500
Processing by ComputeResourcesController#create as HTML
  Parameters: {"utf8"=>"รข", "authenticity_token"=>"FsImbEOvbbV9yjp+PoWtRhhcQyQFA4cAxS9ke37uruA=", "compute_resource"=>{"name"=>"test", "provider"=>"Openstack", "description"=>"", "url"=>"http://10.74.17.248:35357/v2.0/tokens", "user"=>"admin", "password"=>"[FILTERED]"}, "commit"=>"Submit"}
String does not start with the prefix 'encrypted-', so Foreman::Model::Openstack test was not decrypted
String does not start with the prefix 'encrypted-', so Foreman::Model::Openstack test was not decrypted
String does not start with the prefix 'encrypted-', so Foreman::Model::Openstack test was not decrypted
Successfully encrypted field for Foreman::Model::Openstack test
Successfully decrypted field for Foreman::Model::Openstack test
failed to generate key pair
Operation FAILED: Expected([200, 204]) <=> Actual(401 Unauthorized)
  response => #<Excon::Response:0x0000000a546c58 @data={:body=>"{\"error\": {\"message\": \"The request you have made requires authentication.\", \"code\": 401, \"title\": \"Unauthorized\"}}", :headers=>{"Www-Authenticate"=>"Keystone uri=\"http://10.74.17.248:35357\"", "Vary"=>"X-Auth-Token", "X-Distribution"=>"Ubuntu", "Content-Type"=>"application/json", "Content-Length"=>"114", "Date"=>"Thu, 18 Dec 2014 03:50:44 GMT"}, :status=>401, :remote_ip=>"10.74.17.248", :local_port=>33930, :local_address=>"10.74.15.122"}, @body="{\"error\": {\"message\": \"The request you have made requires authentication.\", \"code\": 401, \"title\": \"Unauthorized\"}}", @headers={"Www-Authenticate"=>"Keystone uri=\"http://10.74.17.248:35357\"", "Vary"=>"X-Auth-Token", "X-Distribution"=>"Ubuntu", "Content-Type"=>"application/json", "Content-Length"=>"114", "Date"=>"Thu, 18 Dec 2014 03:50:44 GMT"}, @status=401, @remote_ip="10.74.17.248", @local_port=33930, @local_address="10.74.15.122">
  Rendered common/500.html.erb within layouts/application (6.5ms)
  Rendered layouts/base.html.erb (1.2ms)
Completed 500 Internal Server Error in 83ms (Views: 9.2ms | ActiveRecord: 2.4ms)
Actions #1

Updated by Dominic Cleal over 9 years ago

  • Description updated (diff)
  • Category set to Compute resources - OpenStack
  • Priority changed from Urgent to Normal
  • translation missing: en.field_release deleted (30)
Actions #2

Updated by The Foreman Bot over 9 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello-installer/pull/169 added
  • Pull request deleted ()
Actions #3

Updated by Stephen Benjamin over 9 years ago

  • Status changed from Ready For Testing to New
  • Pull request added
  • Pull request deleted (https://github.com/Katello/katello-installer/pull/169)
Actions

Also available in: Atom PDF