Merge "update cinder.conf on cinder node"

This commit is contained in:
Jenkins 2015-08-07 15:16:42 +00:00 committed by Gerrit Code Review
commit 1851b4dff7
2 changed files with 22 additions and 2 deletions

View File

@ -49,6 +49,11 @@ $cinder_db_name = pick($cinder_hash['db_name'], 'cinder')
$service_endpoint = hiera('service_endpoint')
$glance_api_servers = hiera('glance_api_servers', "${management_vip}:9292")
$keystone_auth_protocol = 'http'
$keystone_auth_host = $service_endpoint
$service_port = '5000'
$auth_uri = "${keystone_auth_protocol}://${keystone_auth_host}:${service_port}/"
# TODO: openstack_version is confusing, there's such string var in hiera and hardcoded hash
$hiera_openstack_version = hiera('openstack_version')
$openstack_version = {
@ -255,6 +260,11 @@ if member($roles, 'controller') or member($roles, 'primary-controller') {
$bind_host = $internal_address
} else {
$bind_host = false
# Configure auth_strategy on cinder node, if cinder and controller are
# on the same node this parameter is configured by ::cinder::api
cinder_config {
'DEFAULT/auth_strategy': value => 'keystone';
}
}
# NOTE(bogdando) deploy cinder volume node with disabled cinder-volume
@ -290,7 +300,9 @@ class { 'openstack::cinder':
ceilometer => $ceilometer_hash[enabled],
vmware_host_ip => $vcenter_hash['host_ip'],
vmware_host_username => $vcenter_hash['vc_user'],
vmware_host_password => $vcenter_hash['vc_password']
vmware_host_password => $vcenter_hash['vc_password'],
auth_uri => $auth_uri,
identity_uri => $auth_uri,
}
cinder_config { 'DEFAULT/nova_catalog_info':

View File

@ -12,7 +12,15 @@ describe manifest do
end
it { should contain_package('python-amqp') }
it { should contain_class('openstack::cinder') }
keystone_auth_host = Noop.hiera 'service_endpoint'
auth_uri = "http://#{keystone_auth_host}:5000/"
it 'ensures cinder_config contains auth_uri and identity_uri ' do
should contain_cinder_config('keystone_authtoken/auth_uri').with(:value => auth_uri)
should contain_cinder_config('keystone_authtoken/identity_uri').with(:value => auth_uri)
should contain_cinder_config('DEFAULT/auth_strategy').with(:value => 'keystone')
end
end
test_ubuntu_and_centos manifest