Fix Swift Keystone Authentication Endpoints

Previously, the swift admin and internal auth endpoints would
default to internal_address.  This causes problems where a
different IP address is used for the swift public address
and a controller address is being used for the internal_address.
In this situation, swift admin/internal auth endpoints use the
controller address, instead of the swift public address.

Change-Id: I903748bf390180c4db9fff4fcb626727f6feb41f
This commit is contained in:
Daneyon Hansen
2013-08-05 20:52:40 +00:00
parent 52d9710d26
commit ee72866fc2
2 changed files with 28 additions and 12 deletions

View File

@@ -108,7 +108,15 @@
# (Optional) Defaults to false. Required if swift is set to true.
#
# [swift_public_address]
# The swift address used to populate the keystone service catalog.
# The swift public endpoint address used to populate the keystone service catalog.
# (optional). Defaults to false.
#
# [swift_internal_address]
# The swift internal endpoint address used to populate the keystone service catalog.
# (optional). Defaults to false.
#
# [swift_admin_address]
# The swift admin endpoint address used to populate the keystone service catalog.
# (optional). Defaults to false.
#
# === Examples
@@ -243,6 +251,8 @@ class openstack::controller (
# swift
$swift = false,
$swift_public_address = false,
$swift_internal_address = false,
$swift_admin_address = false,
$enabled = true
) {
@@ -343,8 +353,8 @@ class openstack::controller (
swift => $swift,
swift_user_password => $swift_user_password,
swift_public_address => $swift_public_address,
swift_internal_address => $internal_address_real,
swift_admin_address => $admin_address_real,
swift_internal_address => $swift_internal_address,
swift_admin_address => $swift_admin_address,
enabled => $enabled,
bind_host => $keystone_bind_address,
}

View File

@@ -185,7 +185,9 @@ describe 'openstack::controller' do
should contain_class('openstack::keystone').with(
:swift => false,
:swift_user_password => false,
:swift_public_address => false
:swift_public_address => false,
:swift_internal_address => false,
:swift_admin_address => false
)
should contain_class('keystone').with(
@@ -230,14 +232,18 @@ describe 'openstack::controller' do
params.merge!(
:swift => true,
:swift_user_password => 'foo',
:swift_public_address => '10.0.0.2'
:swift_public_address => '10.0.0.2',
:swift_internal_address => '10.0.0.2',
:swift_admin_address => '10.0.0.2'
)
end
it 'should configure swift auth in keystone' do
should contain_class('openstack::keystone').with(
:swift => true,
:swift_user_password => 'foo',
:swift_public_address => '10.0.0.2'
:swift_public_address => '10.0.0.2',
:swift_internal_address => '10.0.0.2',
:swift_admin_address => '10.0.0.2'
)
end
end