Ensure keystone endpoint set before service starts

This patch ensures that in the case where keystone and
nova-api are on the same node, nova-api is not started
until the keystone catalog contains the compute service
and endpoint required to use nova.

Change-Id: Ia49874a01582802ba457c9117747aeff203590c3
This commit is contained in:
Michael Chapman
2013-10-30 15:41:54 +11:00
parent ecba506ed8
commit 7554dd87df
2 changed files with 21 additions and 0 deletions

View File

@@ -20,6 +20,8 @@ class nova::keystone::auth(
warning('cinder parameter is deprecated and has no effect.')
}
Keystone_endpoint["${region}/${auth_name}"] ~> Service <| name == 'nova-api' |>
keystone_user { $auth_name:
ensure => present,
password => $password,

View File

@@ -113,4 +113,23 @@ describe 'nova::keystone::auth' do
it { should_not contain_keystone_endpoint('RegionOne/nova_ec2') }
end
describe 'when configuring nova-api and the keystone endpoint' do
let :pre_condition do
"class { 'nova::api': admin_password => 'test' }
include nova"
end
let :facts do
{ :osfamily => "Debian"}
end
let :params do
{
:password => 'test'
}
end
it { should contain_keystone_endpoint('RegionOne/nova').with_notify('Service[nova-api]') }
end
end