Do not override rotuer_scheduler_driver

The default router scheduler is the least router scheduler in neutron
and there is no specific reasons why we need the different driver
(chance scheduler for deployments managed by Puppet.

Let's use the default one which is more commonly used and tested.

Change-Id: I9a8036885cde7c6026da38ce438973236992c00f
This commit is contained in:
Takashi Kajinami 2024-01-14 02:01:40 +09:00
parent 37cafeb79b
commit 31ca958e40
4 changed files with 25 additions and 25 deletions

View File

@ -45,6 +45,8 @@ class neutron::params {
$dhcp_agent_package = undef $dhcp_agent_package = undef
$metering_agent_package = 'openstack-neutron-metering-agent' $metering_agent_package = 'openstack-neutron-metering-agent'
$vpnaas_agent_package = 'openstack-neutron-vpnaas' $vpnaas_agent_package = 'openstack-neutron-vpnaas'
$vpnaas_ovn_agent_package = 'openstack-neutron-vpnaas-ovn-vpn-agent'
$vpnaas_ovn_agent_service = 'neutron-vpnaas-ovn-vpn-agent'
$l2gw_agent_package = 'openstack-neutron-l2gw-agent' $l2gw_agent_package = 'openstack-neutron-l2gw-agent'
$l2gw_package = 'python3-networking-l2gw' $l2gw_package = 'python3-networking-l2gw'
$ovn_metadata_agent_package = 'openstack-neutron-ovn-metadata-agent' $ovn_metadata_agent_package = 'openstack-neutron-ovn-metadata-agent'
@ -103,6 +105,8 @@ class neutron::params {
$dhcp_agent_package = 'neutron-dhcp-agent' $dhcp_agent_package = 'neutron-dhcp-agent'
$metering_agent_package = 'neutron-metering-agent' $metering_agent_package = 'neutron-metering-agent'
$vpnaas_agent_package = 'python3-neutron-vpnaas' $vpnaas_agent_package = 'python3-neutron-vpnaas'
$vpnaas_ovn_agent_package = undef
$vpnaas_ovn_agent_service = undef
$libreswan_package = 'libreswan' $libreswan_package = 'libreswan'
$strongswan_package = 'strongswan' $strongswan_package = 'strongswan'
$metadata_agent_package = 'neutron-metadata-agent' $metadata_agent_package = 'neutron-metadata-agent'

View File

@ -93,22 +93,12 @@
# Defaults to: $facts['os_service_default'] # Defaults to: $facts['os_service_default']
# #
# [*network_scheduler_driver*] # [*network_scheduler_driver*]
# (Optional) The scheduler used when scheduling networks # (Optional) The scheduler used when scheduling networks.
# neutron.scheduler.dhcp_agent_scheduler.AZAwareWeightScheduler to use availability zone hints scheduling.
# Defaults to $facts['os_service_default'] # Defaults to $facts['os_service_default']
# #
# Example:
#
# class { 'neutron':
# network_scheduler_driver => 'neutron.scheduler.dhcp_agent_scheduler.AZAwareWeightScheduler'
# }
#
# [*router_scheduler_driver*] # [*router_scheduler_driver*]
# (Optional) Driver to use for scheduling router to a default L3 agent. Could be: # (Optional) Driver to use for scheduling router to a default L3 agent.
# neutron.scheduler.l3_agent_scheduler.ChanceScheduler to schedule a router in a random way # Defaults to $facts['os_service_default']
# neutron.scheduler.l3_agent_scheduler.LeastRoutersScheduler to allocate on an L3 agent with the least number of routers bound.
# neutron.scheduler.l3_agent_scheduler.AZLeastRoutersScheduler to use availability zone hints.
# Defaults to: neutron.scheduler.l3_agent_scheduler.ChanceScheduler
# #
# [*router_distributed*] # [*router_distributed*]
# (Optional) Setting the "router_distributed" flag to "True" will default to the creation # (Optional) Setting the "router_distributed" flag to "True" will default to the creation
@ -265,10 +255,10 @@ class neutron::server (
$rpc_response_max_timeout = $facts['os_service_default'], $rpc_response_max_timeout = $facts['os_service_default'],
$agent_down_time = $facts['os_service_default'], $agent_down_time = $facts['os_service_default'],
$enable_new_agents = $facts['os_service_default'], $enable_new_agents = $facts['os_service_default'],
$router_scheduler_driver = 'neutron.scheduler.l3_agent_scheduler.ChanceScheduler', $network_scheduler_driver = $facts['os_service_default'],
$router_scheduler_driver = $facts['os_service_default'],
$router_distributed = $facts['os_service_default'], $router_distributed = $facts['os_service_default'],
$enable_dvr = $facts['os_service_default'], $enable_dvr = $facts['os_service_default'],
$network_scheduler_driver = $facts['os_service_default'],
$dhcp_load_type = $facts['os_service_default'], $dhcp_load_type = $facts['os_service_default'],
$default_availability_zones = $facts['os_service_default'], $default_availability_zones = $facts['os_service_default'],
$allow_automatic_l3agent_failover = $facts['os_service_default'], $allow_automatic_l3agent_failover = $facts['os_service_default'],
@ -338,12 +328,12 @@ the neutron::services::vpnaas class.")
'DEFAULT/rpc_response_max_timeout': value => $rpc_response_max_timeout; 'DEFAULT/rpc_response_max_timeout': value => $rpc_response_max_timeout;
'DEFAULT/agent_down_time': value => $agent_down_time; 'DEFAULT/agent_down_time': value => $agent_down_time;
'DEFAULT/enable_new_agents': value => $enable_new_agents; 'DEFAULT/enable_new_agents': value => $enable_new_agents;
'DEFAULT/network_scheduler_driver': value => $network_scheduler_driver;
'DEFAULT/router_scheduler_driver': value => $router_scheduler_driver; 'DEFAULT/router_scheduler_driver': value => $router_scheduler_driver;
'DEFAULT/router_distributed': value => $router_distributed; 'DEFAULT/router_distributed': value => $router_distributed;
'DEFAULT/enable_dvr': value => $enable_dvr; 'DEFAULT/enable_dvr': value => $enable_dvr;
'DEFAULT/allow_automatic_l3agent_failover': value => $allow_automatic_l3agent_failover; 'DEFAULT/allow_automatic_l3agent_failover': value => $allow_automatic_l3agent_failover;
'DEFAULT/allow_automatic_dhcp_failover': value => $allow_automatic_dhcp_failover; 'DEFAULT/allow_automatic_dhcp_failover': value => $allow_automatic_dhcp_failover;
'DEFAULT/network_scheduler_driver': value => $network_scheduler_driver;
'DEFAULT/dhcp_load_type': value => $dhcp_load_type; 'DEFAULT/dhcp_load_type': value => $dhcp_load_type;
'DEFAULT/default_availability_zones': value => join(any2array($default_availability_zones), ','); 'DEFAULT/default_availability_zones': value => join(any2array($default_availability_zones), ',');
'DEFAULT/network_auto_schedule': value => $network_auto_schedule; 'DEFAULT/network_auto_schedule': value => $network_auto_schedule;

View File

@ -0,0 +1,6 @@
---
upgrade:
- |
Default value of the ``neutron::server::router_scheduler_driver`` has been
updated and now the default driver in neutron (``LeastRoutersScheduler`` at
the time of writing) is used by default.

View File

@ -18,7 +18,6 @@ describe 'neutron::server' do
:enabled => true, :enabled => true,
:auth_strategy => 'keystone', :auth_strategy => 'keystone',
:sync_db => false, :sync_db => false,
:router_scheduler_driver => 'neutron.scheduler.l3_agent_scheduler.ChanceScheduler',
} }
end end
@ -83,7 +82,8 @@ describe 'neutron::server' do
should contain_neutron_config('DEFAULT/rpc_response_max_timeout').with_value('<SERVICE DEFAULT>') should contain_neutron_config('DEFAULT/rpc_response_max_timeout').with_value('<SERVICE DEFAULT>')
should contain_neutron_config('DEFAULT/agent_down_time').with_value('<SERVICE DEFAULT>') should contain_neutron_config('DEFAULT/agent_down_time').with_value('<SERVICE DEFAULT>')
should contain_neutron_config('DEFAULT/enable_new_agents').with_value('<SERVICE DEFAULT>') should contain_neutron_config('DEFAULT/enable_new_agents').with_value('<SERVICE DEFAULT>')
should contain_neutron_config('DEFAULT/router_scheduler_driver').with_value(p[:router_scheduler_driver]) should contain_neutron_config('DEFAULT/network_scheduler_driver').with_value('<SERVICE DEFAULT>')
should contain_neutron_config('DEFAULT/router_scheduler_driver').with_value('<SERVICE DEFAULT>')
should contain_oslo__middleware('neutron_config').with( should contain_oslo__middleware('neutron_config').with(
:enable_proxy_headers_parsing => '<SERVICE DEFAULT>', :enable_proxy_headers_parsing => '<SERVICE DEFAULT>',
:max_request_body_size => '<SERVICE DEFAULT>', :max_request_body_size => '<SERVICE DEFAULT>',
@ -230,20 +230,20 @@ describe 'neutron::server' do
context 'with availability zone hints set' do context 'with availability zone hints set' do
before :each do before :each do
params.merge!( :dhcp_load_type => 'networks', params.merge!({
:router_scheduler_driver => 'neutron.scheduler.l3_agent_scheduler.AZLeastRoutersScheduler', :dhcp_load_type => 'networks',
:network_scheduler_driver => 'neutron.scheduler.dhcp_agent_scheduler.AZAwareWeightScheduler', :router_scheduler_driver => 'neutron.scheduler.l3_agent_scheduler.AZLeastRoutersScheduler',
:default_availability_zones => ['zone1', 'zone2'] :network_scheduler_driver => 'neutron.scheduler.dhcp_agent_scheduler.AZAwareWeightScheduler',
) :default_availability_zones => ['zone1', 'zone2']
})
end end
it 'should configure neutron server for availability zones' do it 'should configure neutron server for availability zones' do
should contain_neutron_config('DEFAULT/default_availability_zones').with_value('zone1,zone2') should contain_neutron_config('DEFAULT/default_availability_zones').with_value('zone1,zone2')
should contain_neutron_config('DEFAULT/router_scheduler_driver').with_value('neutron.scheduler.l3_agent_scheduler.AZLeastRoutersScheduler')
should contain_neutron_config('DEFAULT/network_scheduler_driver').with_value('neutron.scheduler.dhcp_agent_scheduler.AZAwareWeightScheduler') should contain_neutron_config('DEFAULT/network_scheduler_driver').with_value('neutron.scheduler.dhcp_agent_scheduler.AZAwareWeightScheduler')
should contain_neutron_config('DEFAULT/router_scheduler_driver').with_value('neutron.scheduler.l3_agent_scheduler.AZLeastRoutersScheduler')
should contain_neutron_config('DEFAULT/dhcp_load_type').with_value('networks') should contain_neutron_config('DEFAULT/dhcp_load_type').with_value('networks')
end end
end end
context 'with enable_proxy_headers_parsing' do context 'with enable_proxy_headers_parsing' do