Add the enable_new_services option to nova::conductor
Adds the enable_new_services parameter to the nova::conductor class. When a new nova services is started the conductor will create the services. If enable_new_services is set to False it will set them to disabled when they are added. Default value for the enable_new_services option is True which is the default in the nova code. Change-Id: I91bfc7a04071025a58629641b5da4f8347cfc133
This commit is contained in:
parent
ba239a87b2
commit
6bb922b140
|
@ -20,6 +20,13 @@
|
|||
# (optional) Number of workers for OpenStack Conductor service
|
||||
# Defaults to undef (i.e. parameter will not be present)
|
||||
#
|
||||
# [*enable_new_services*]
|
||||
# (optional) When a new service (for example "nova-compute") start up, it gets
|
||||
# registered in the database as an enabled service. Setting this to false will
|
||||
# cause new services to be disabled when added. This config option is only used
|
||||
# by the conductor service which is responsible for creating the service entries.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*use_local*]
|
||||
|
@ -27,12 +34,13 @@
|
|||
# Defaults to undef
|
||||
#
|
||||
class nova::conductor(
|
||||
$enabled = true,
|
||||
$manage_service = true,
|
||||
$ensure_package = 'present',
|
||||
$workers = undef,
|
||||
$enabled = true,
|
||||
$manage_service = true,
|
||||
$ensure_package = 'present',
|
||||
$workers = undef,
|
||||
$enable_new_services = $::os_service_default,
|
||||
# DEPREACTED PARAMETERS
|
||||
$use_local = undef,
|
||||
$use_local = undef,
|
||||
) {
|
||||
|
||||
if $use_local {
|
||||
|
@ -56,4 +64,8 @@ class nova::conductor(
|
|||
'conductor/workers': value => $workers;
|
||||
}
|
||||
}
|
||||
|
||||
nova_config {
|
||||
'DEFAULT/enable_new_services': value => $enable_new_services
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
features:
|
||||
- Adds the enable_new_services config parameter to nova conductor
|
|
@ -46,6 +46,18 @@ describe 'nova::conductor' do
|
|||
it { is_expected.to contain_nova_config('conductor/workers').with_value('5') }
|
||||
end
|
||||
|
||||
context 'with default enable_new_services parameter' do
|
||||
it { is_expected.to contain_nova_config('DEFAULT/enable_new_services').with_value('<SERVICE DEFAULT>') }
|
||||
end
|
||||
|
||||
context 'with enable_new_services parameter set to false' do
|
||||
let :params do
|
||||
{ :enable_new_services => false }
|
||||
end
|
||||
|
||||
it { is_expected.to contain_nova_config('DEFAULT/enable_new_services').with_value(false) }
|
||||
end
|
||||
|
||||
context 'with default database parameters' do
|
||||
let :pre_condition do
|
||||
"include nova"
|
||||
|
|
Loading…
Reference in New Issue