Add enable_new_agents config option to neutron::server

Settings enable_new_agents to False will cause new neutron agents
that registers with the neutron-server to be disabled by default.

Change-Id: I9ed123799243bfb6d63ef34f2f75ca4b0cbd06ed
This commit is contained in:
Tobias Urdin 2017-01-03 12:17:47 +01:00
parent 5ad805f154
commit badd275331
3 changed files with 12 additions and 0 deletions

View File

@ -83,6 +83,12 @@
# report_interval is a config for neutron agents, set by class neutron
# Defaults to: $::os_service_default
#
# [*enable_new_agents*]
# (optional) Agent starts with admin_state_up=False when enable_new_agents=False. In the
# case, user's resources will not be scheduled automatically to the agent until
# admin changes admin_state_up to True.
# Defaults to: $::os_service_default
#
# [*state_path*]
# (optional) Deprecated. Use state_path parameter on base neutron class instead.
#
@ -236,6 +242,7 @@ class neutron::server (
$api_workers = $::os_workers,
$rpc_workers = $::os_workers,
$agent_down_time = $::os_service_default,
$enable_new_agents = $::os_service_default,
$router_scheduler_driver = 'neutron.scheduler.l3_agent_scheduler.ChanceScheduler',
$router_distributed = $::os_service_default,
$network_scheduler_driver = $::os_service_default,
@ -342,6 +349,7 @@ class neutron::server (
'DEFAULT/api_workers': value => $api_workers;
'DEFAULT/rpc_workers': value => $rpc_workers;
'DEFAULT/agent_down_time': value => $agent_down_time;
'DEFAULT/enable_new_agents': value => $enable_new_agents;
'DEFAULT/router_scheduler_driver': value => $router_scheduler_driver;
'DEFAULT/router_distributed': value => $router_distributed;
'DEFAULT/allow_automatic_l3agent_failover': value => $allow_automatic_l3agent_failover;

View File

@ -0,0 +1,3 @@
---
features:
- Adds the enable_new_agents config option to the neutron server

View File

@ -75,6 +75,7 @@ describe 'neutron::server' do
is_expected.to contain_neutron_config('DEFAULT/api_workers').with_value(facts[:os_workers])
is_expected.to contain_neutron_config('DEFAULT/rpc_workers').with_value(facts[:os_workers])
is_expected.to contain_neutron_config('DEFAULT/agent_down_time').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_config('DEFAULT/enable_new_agents').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_config('DEFAULT/router_scheduler_driver').with_value(p[:router_scheduler_driver])
is_expected.to contain_neutron_config('qos/notification_drivers').with_value('<SERVICE DEFAULT>')
is_expected.to contain_neutron_config('oslo_middleware/enable_proxy_headers_parsing').with_value('<SERVICE DEFAULT>')