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:
@@ -20,6 +20,8 @@ class nova::keystone::auth(
|
|||||||
warning('cinder parameter is deprecated and has no effect.')
|
warning('cinder parameter is deprecated and has no effect.')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Keystone_endpoint["${region}/${auth_name}"] ~> Service <| name == 'nova-api' |>
|
||||||
|
|
||||||
keystone_user { $auth_name:
|
keystone_user { $auth_name:
|
||||||
ensure => present,
|
ensure => present,
|
||||||
password => $password,
|
password => $password,
|
||||||
|
@@ -113,4 +113,23 @@ describe 'nova::keystone::auth' do
|
|||||||
it { should_not contain_keystone_endpoint('RegionOne/nova_ec2') }
|
it { should_not contain_keystone_endpoint('RegionOne/nova_ec2') }
|
||||||
end
|
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
|
end
|
||||||
|
Reference in New Issue
Block a user