auth_token configuration: always set auth_uri

Change-Id: I9a10bded9699d46e99da6f0ea4e49876a28c536e
Addresses: bug #1207504
This commit is contained in:
Ionuț Arțăriși 2013-11-18 16:20:11 +01:00
parent 73bfaccfee
commit d5a321f086
6 changed files with 29 additions and 3 deletions

View File

@ -2,8 +2,6 @@
"sha": "ba71763fac936d414bd4a63f004357f86f6e1bfb",
"sources": {
"openstack-block-storage": {
"locked_version": "7.0.5",
"constraint": "= 7.0.5",
"path": "."
},
"openstack-image": {

View File

@ -2,6 +2,11 @@ openstack-block-storage Cookbook CHANGELOG
==============================
This file is used to list changes made in each version of the openstack-block-storage cookbook.
v7.0.6
------
### Bug
- set auth_uri for authtoken in api-paste.ini (bug #1207504)
v7.0.4
------
### Improvement

View File

@ -4,7 +4,7 @@ maintainer_email "cookbooks@lists.tfoundry.com"
license "Apache 2.0"
description "The OpenStack Advanced Volume Management service Cinder."
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version "7.0.5"
version "7.0.6"
recipe "openstack-block-storage::common", "Defines the common pieces of repeated code from the other recipes"
recipe "openstack-block-storage::api", "Installs the cinder-api, sets up the cinder database, and cinder service/user/endpoints in keystone"

View File

@ -57,6 +57,7 @@ service "cinder-api" do
subscribes :restart, "template[/etc/cinder/cinder.conf]"
end
identity_endpoint = endpoint "identity-api"
identity_admin_endpoint = endpoint "identity-admin"
service_pass = service_password "openstack-block-storage"
@ -68,6 +69,7 @@ template "/etc/cinder/api-paste.ini" do
owner node["openstack"]["block-storage"]["user"]
mode 00644
variables(
:identity_endpoint => identity_endpoint,
:identity_admin_endpoint => identity_admin_endpoint,
:service_pass => service_pass
)

View File

@ -134,6 +134,26 @@ describe "openstack-block-storage::api" do
it "notifies cinder-api restart" do
expect(@file).to notify "service[cinder-api]", :restart
end
it "has auth_uri" do
expect(@chef_run).to create_file_with_content @file.name,
"auth_uri = https://127.0.0.1:5000/v2.0"
end
it "has auth_host" do
expect(@chef_run).to create_file_with_content @file.name,
"auth_host = 127.0.0.1"
end
it "has auth_port" do
expect(@chef_run).to create_file_with_content @file.name,
"auth_port = 35357"
end
it "has auth_protocol" do
expect(@chef_run).to create_file_with_content @file.name,
"auth_protocol = http"
end
end
end
end

View File

@ -52,6 +52,7 @@ paste.filter_factory = cinder.api.middleware.auth:CinderKeystoneContext.factory
[filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
auth_uri = <%= @identity_endpoint.to_s %>
auth_host = <%= @identity_admin_endpoint.host %>
auth_port = <%= @identity_admin_endpoint.port %>
auth_protocol = <%= @identity_admin_endpoint.scheme %>