Add an Openstack provision type Computer Resources Failed

hi, all Foreman experts

Add an Openstack provision type Computer Resources Failed, please see below
errors. But when I ssh to Foreman's terminal and send below curl command,
Foreman can get tokens from Openstack.

I use Foreman version 1.7, Openstack Juno version, seems Foreman GUI don't
send correct API request to Openstack. How can I solve this problem? Great
thanks.

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

Unable to save
Expected([200, 204]) <=> Actual(401 Unauthorized) response =>
#<Excon::Response:0x007fb9611dc6e0 @data={:body=>"{&quot;error&quot;: {&quot;message&quot;:
&quot;The request you have made requires authentication.&quot;, &quot;code&quot;: 401,
&quot;title&quot;: &quot;Unauthorized&quot;}}", :headers=>{"Www-Authenticate"=>"Keystone
uri=&quot;http://10.74.17.248:35357&quot;", "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="{&quot;error&quot;: {&quot;message&quot;: &quot;The
request you have made requires authentication.&quot;, &quot;code&quot;: 401, &quot;title&quot;:
&quot;Unauthorized&quot;}}", @headers={"Www-Authenticate"=>"Keystone
uri=&quot;http://10.74.17.248:35357&quot;", "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">

filed a bug to trace this issue.

在 2014年12月18日星期四UTC+8上午11时06分55秒,Yating Yang写道:

··· > > hi, all Foreman experts > > > Add an Openstack provision type Computer Resources Failed, please see > below errors. But when I ssh to Foreman's terminal and send below curl > command, Foreman can get tokens from Openstack. > > I use Foreman version 1.7, Openstack Juno version, seems Foreman GUI don't > send correct API request to Openstack. How can I solve this problem? Great > thanks. > > > 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 > > > Unable to save > Expected([200, 204]) <=> Actual(401 Unauthorized) response => > #"{\"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"> > > > ...