Correct URIs in version information returned at /
The root / endpoint for Keystone returns a JSON dict of information about the versions supported by Keystone. This dict of information contained bad URIs, which I suspect is preventing the v3 API from being navigated through by clients who parse this version dictionary. The public_endpoint and admin_endpoint configuration options need a URI without any version path in it. Change-Id: Ib8bf1d1f95bd86afa2a327e1cff011de8d3039f4
This commit is contained in:
parent
bbfc2f6cac
commit
b881af2609
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"sha": "1813fcdac9032d4b6f66b99d9f04f7e40d3a91ba",
|
||||
"sha": "591cb6e4f1ccfb699c80c54dca3009a15e14b06f",
|
||||
"sources": {
|
||||
"openstack-identity": {
|
||||
"path": "."
|
||||
|
@ -9,11 +9,14 @@
|
|||
"git": "git://github.com/stackforge/cookbook-openstack-common.git",
|
||||
"ref": "ae80d36e8f8d5705e01bb6c14238eccb5450a229"
|
||||
},
|
||||
"apt": {
|
||||
"locked_version": "2.0.0"
|
||||
},
|
||||
"database": {
|
||||
"locked_version": "1.4.0"
|
||||
},
|
||||
"mysql": {
|
||||
"locked_version": "3.0.0"
|
||||
"locked_version": "3.0.2"
|
||||
},
|
||||
"openssl": {
|
||||
"locked_version": "1.0.2"
|
||||
|
@ -22,13 +25,10 @@
|
|||
"locked_version": "1.4.0"
|
||||
},
|
||||
"postgresql": {
|
||||
"locked_version": "3.0.0"
|
||||
},
|
||||
"apt": {
|
||||
"locked_version": "1.10.0"
|
||||
"locked_version": "3.0.2"
|
||||
},
|
||||
"aws": {
|
||||
"locked_version": "0.101.0"
|
||||
"locked_version": "0.101.2"
|
||||
},
|
||||
"xfs": {
|
||||
"locked_version": "1.1.0"
|
||||
|
|
|
@ -126,6 +126,14 @@ uris = {
|
|||
'volume' => volume_endpoint.to_s.gsub('%25','%')
|
||||
}
|
||||
|
||||
# These configuration endpoints must not have the path (v2.0, etc)
|
||||
# added to them, as these values are used in returning the version
|
||||
# listing information from the root / endpoint.
|
||||
ie = identity_endpoint
|
||||
public_endpoint = "#{ie.scheme}://#{ie.host}:#{ie.port}/"
|
||||
ae = identity_admin_endpoint
|
||||
admin_endpoint = "#{ae.scheme}://#{ae.host}:#{ae.port}/"
|
||||
|
||||
template "/etc/keystone/keystone.conf" do
|
||||
source "keystone.conf.erb"
|
||||
owner node["openstack"]["identity"]["user"]
|
||||
|
@ -136,7 +144,9 @@ template "/etc/keystone/keystone.conf" do
|
|||
:ip_address => ip_address,
|
||||
"bootstrap_token" => bootstrap_token,
|
||||
"memcache_servers" => memcache_servers,
|
||||
"uris" => uris
|
||||
"uris" => uris,
|
||||
"public_endpoint" => public_endpoint,
|
||||
"admin_endpoint" => admin_endpoint
|
||||
)
|
||||
|
||||
notifies :restart, "service[keystone]", :immediately
|
||||
|
|
|
@ -6,6 +6,16 @@ describe "openstack-identity::server" do
|
|||
before do
|
||||
@chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS do |n|
|
||||
n.set["openstack"]["identity"]["syslog"]["use"] = true
|
||||
n.set["openstack"]["endpoints"]["identity-api"] = {
|
||||
"host" => "127.0.1.1",
|
||||
"port" => "5000",
|
||||
"scheme" => "https"
|
||||
}
|
||||
n.set["openstack"]["endpoints"]["identity-admin"] = {
|
||||
"host" => "127.0.1.1",
|
||||
"port" => "35357",
|
||||
"scheme" => "https"
|
||||
}
|
||||
end
|
||||
@chef_run.converge "openstack-identity::server"
|
||||
end
|
||||
|
@ -170,6 +180,13 @@ describe "openstack-identity::server" do
|
|||
"bind_host = 127.0.1.1"
|
||||
end
|
||||
|
||||
it "has proper public and admin endpoint" do
|
||||
expect(@chef_run).to create_file_with_content @template.name,
|
||||
"public_endpoint = https://127.0.1.1:5000/"
|
||||
expect(@chef_run).to create_file_with_content @template.name,
|
||||
"admin_endpoint = https://127.0.1.1:35357/"
|
||||
end
|
||||
|
||||
it "notifies keystone restart" do
|
||||
expect(@template).to notify "service[keystone]", :restart
|
||||
end
|
||||
|
|
|
@ -23,7 +23,7 @@ catalog.<%= node["openstack"]["identity"]["region"] %>.image.adminURL = <%= @uri
|
|||
catalog.<%= node["openstack"]["identity"]["region"] %>.image.internalURL = <%= @uris["image"].to_s %>
|
||||
catalog.<%= node["openstack"]["identity"]["region"] %>.image.name = Image Service
|
||||
|
||||
catalog.<%= node["openstack"]["network"]["region"] %>.network.publicURL = <%= @uris["network"].to_s %>
|
||||
catalog.<%= node["openstack"]["network"]["region"] %>.network.adminURL = <%= @uris["network"].to_s %>
|
||||
catalog.<%= node["openstack"]["network"]["region"] %>.network.internalURL = <%= @uris["network"].to_s %>
|
||||
catalog.<%= node["openstack"]["network"]["region"] %>.network.name = Network Service
|
||||
catalog.<%= node["openstack"]["identity"]["region"] %>.network.publicURL = <%= @uris["network"].to_s %>
|
||||
catalog.<%= node["openstack"]["identity"]["region"] %>.network.adminURL = <%= @uris["network"].to_s %>
|
||||
catalog.<%= node["openstack"]["identity"]["region"] %>.network.internalURL = <%= @uris["network"].to_s %>
|
||||
catalog.<%= node["openstack"]["identity"]["region"] %>.network.name = Network Service
|
||||
|
|
|
@ -13,8 +13,8 @@ log_config = /etc/openstack/logging.conf
|
|||
<% else %>
|
||||
log_file = /var/log/keystone/keystone.log
|
||||
<% end %>
|
||||
public_endpoint = <%= @uris['identity'] %>
|
||||
admin_endpoint = <%= @uris['identity-admin'] %>
|
||||
public_endpoint = <%= @public_endpoint %>
|
||||
admin_endpoint = <%= @admin_endpoint %>
|
||||
|
||||
<% if @memcache_servers -%>
|
||||
[memcache]
|
||||
|
|
Loading…
Reference in New Issue