fix wrong location of report_interval
report_interval is a config in section agent, not section DEFAULT. It is used by the agents to scheduly report state, and not used by neutron-server. Missing this config on agent side, leads to flapping alive status of neutron agents. Therefore report_interval is moved from class neutron::server to class neutron Change-Id: I4fa84dabcba8465b297f6dc0eefa1d02a98eafca
This commit is contained in:
parent
04115638e6
commit
b89fd34472
@ -77,6 +77,13 @@
|
||||
# (optional) Enables network namespaces
|
||||
# Defaults to false
|
||||
#
|
||||
# [*report_interval*]
|
||||
# (optional) Seconds between nodes reporting state to server; should be less than
|
||||
# agent_down_time, best if it is half or less than agent_down_time.
|
||||
# agent_down_time is a config for neutron-server, set by class neutron::server
|
||||
# report_interval is a config for neutron agents, set by class neutron
|
||||
# Defaults to: 30
|
||||
#
|
||||
# [*control_exchange*]
|
||||
# (optional) What RPC queue/exchange to use
|
||||
# Defaults to neutron
|
||||
@ -148,6 +155,7 @@ class neutron (
|
||||
$allow_sorting = false,
|
||||
$allow_overlapping_ips = false,
|
||||
$root_helper = 'sudo neutron-rootwrap /etc/neutron/rootwrap.conf',
|
||||
$report_interval = '30',
|
||||
$control_exchange = 'neutron',
|
||||
$rpc_backend = 'neutron.openstack.common.rpc.impl_kombu',
|
||||
$rabbit_password = false,
|
||||
@ -216,6 +224,7 @@ class neutron (
|
||||
'DEFAULT/control_exchange': value => $control_exchange;
|
||||
'DEFAULT/rpc_backend': value => $rpc_backend;
|
||||
'AGENT/root_helper': value => $root_helper;
|
||||
'agent/report_interval': value => $report_interval;
|
||||
}
|
||||
|
||||
if $log_file {
|
||||
|
@ -119,13 +119,10 @@
|
||||
# [*agent_down_time*]
|
||||
# (optional) Seconds to regard the agent as down; should be at least twice
|
||||
# report_interval, to be sure the agent is down for good.
|
||||
# agent_down_time is a config for neutron-server, set by class neutron::server
|
||||
# report_interval is a config for neutron agents, set by class neutron
|
||||
# Defaults to: 75
|
||||
#
|
||||
# [*report_interval*]
|
||||
# (optional) Seconds between nodes reporting state to server; should be less than
|
||||
# agent_down_time, best if it is half or less than agent_down_time.
|
||||
# Defaults to: 30
|
||||
#
|
||||
# [*router_scheduler_driver*]
|
||||
# (optional) Driver to use for scheduling router to a default L3 agent. Could be:
|
||||
# neutron.scheduler.l3_agent_scheduler.ChanceScheduler to schedule a router in a random way
|
||||
@ -157,7 +154,6 @@ class neutron::server (
|
||||
$sync_db = false,
|
||||
$api_workers = '0',
|
||||
$agent_down_time = '75',
|
||||
$report_interval = '30',
|
||||
$router_scheduler_driver = 'neutron.scheduler.l3_agent_scheduler.ChanceScheduler',
|
||||
$mysql_module = '0.9',
|
||||
# DEPRECATED PARAMETERS
|
||||
@ -171,6 +167,7 @@ class neutron::server (
|
||||
$retry_interval = undef,
|
||||
$log_dir = undef,
|
||||
$log_file = undef,
|
||||
$report_interval = undef,
|
||||
) {
|
||||
|
||||
include neutron::params
|
||||
@ -227,6 +224,10 @@ class neutron::server (
|
||||
fail('The log_file parameter is removed, use log_file of neutron class instead.')
|
||||
}
|
||||
|
||||
if $report_interval {
|
||||
fail('The report_interval is removed, use report_interval of neutron class instead.')
|
||||
}
|
||||
|
||||
validate_re($database_connection_real, '(sqlite|mysql|postgresql):\/\/(\S+:\S+@\S+\/\S+)?')
|
||||
|
||||
case $database_connection_real {
|
||||
@ -269,7 +270,6 @@ class neutron::server (
|
||||
neutron_config {
|
||||
'DEFAULT/api_workers': value => $api_workers;
|
||||
'DEFAULT/agent_down_time': value => $agent_down_time;
|
||||
'DEFAULT/report_interval': value => $report_interval;
|
||||
'DEFAULT/router_scheduler_driver': value => $router_scheduler_driver;
|
||||
'database/connection': value => $database_connection_real;
|
||||
'database/idle_timeout': value => $database_idle_timeout_real;
|
||||
|
@ -13,7 +13,8 @@ describe 'neutron' do
|
||||
:rabbit_user => 'guest',
|
||||
:rabbit_password => 'guest',
|
||||
:rabbit_virtual_host => '/',
|
||||
:log_dir => '/var/log/neutron'
|
||||
:log_dir => '/var/log/neutron',
|
||||
:report_interval => '30',
|
||||
}
|
||||
end
|
||||
|
||||
@ -109,6 +110,7 @@ describe 'neutron' do
|
||||
should contain_neutron_config('DEFAULT/allow_overlapping_ips').with_value(false)
|
||||
should contain_neutron_config('DEFAULT/control_exchange').with_value('neutron')
|
||||
should contain_neutron_config('AGENT/root_helper').with_value('sudo neutron-rootwrap /etc/neutron/rootwrap.conf')
|
||||
should contain_neutron_config('agent/report_interval').with_value('30')
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -26,7 +26,6 @@ describe 'neutron::server' do
|
||||
:sync_db => false,
|
||||
:api_workers => '0',
|
||||
:agent_down_time => '75',
|
||||
:report_interval => '30',
|
||||
:router_scheduler_driver => 'neutron.scheduler.l3_agent_scheduler.ChanceScheduler',
|
||||
:mysql_module => '0.9'}
|
||||
end
|
||||
@ -82,7 +81,6 @@ describe 'neutron::server' do
|
||||
)
|
||||
should contain_neutron_config('DEFAULT/api_workers').with_value('0')
|
||||
should contain_neutron_config('DEFAULT/agent_down_time').with_value('75')
|
||||
should contain_neutron_config('DEFAULT/report_interval').with_value('30')
|
||||
should contain_neutron_config('DEFAULT/router_scheduler_driver').with_value('neutron.scheduler.l3_agent_scheduler.ChanceScheduler')
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user