Browse Source

Merge "Use AZLeastRoutersScheduler by default"

changes/27/769427/1
Zuul 9 months ago
committed by Gerrit Code Review
parent
commit
2ac53e951b
  1. 6
      config.yaml
  2. 3
      hooks/neutron_api_context.py
  3. 3
      templates/mitaka/neutron.conf
  4. 3
      templates/newton/neutron.conf
  5. 3
      templates/ocata/neutron.conf
  6. 3
      templates/pike/neutron.conf
  7. 3
      templates/queens/neutron.conf
  8. 3
      templates/rocky/neutron.conf
  9. 3
      templates/train/neutron.conf
  10. 3
      templates/ussuri/neutron.conf
  11. 3
      unit_tests/test_neutron_api_context.py

6
config.yaml

@ -376,6 +376,12 @@ options:
namespace will be rescheduled only to L3 agents running in the 'dvr_snat'
mode, while l3 agents in the 'dvr' mode will only host qrouter and fip
namespaces.
router-scheduler-driver:
type: string
default: 'neutron.scheduler.l3_agent_scheduler.AZLeastRoutersScheduler'
description: |
The driver to use for router scheduling. In case of distributed routers
this will affect snat namespace scheduling.
allow-automatic-dhcp-failover:
type: boolean
default: True

3
hooks/neutron_api_context.py

@ -522,6 +522,9 @@ class NeutronCCContext(context.NeutronContext):
'neutron.scheduler.dhcp_agent_scheduler.AZAwareWeightScheduler'
)
ctxt['dhcp_load_type'] = config('dhcp-load-type')
# AZLeastRoutersScheduler inherits from LeastRoutersScheduler and
# is available as of mitaka.
ctxt['router_scheduler_driver'] = config('router-scheduler-driver')
extension_drivers = []
if config('enable-ml2-port-security'):

3
templates/mitaka/neutron.conf

@ -32,6 +32,9 @@ allow_automatic_dhcp_failover = {{ allow_automatic_dhcp_failover }}
network_scheduler_driver = {{ network_scheduler_driver }}
dhcp_load_type = {{ dhcp_load_type }}
{% endif -%}
{% if router_scheduler_driver -%}
router_scheduler_driver = {{ router_scheduler_driver }}
{% endif -%}
{% if neutron_bind_port -%}
bind_port = {{ neutron_bind_port }}

3
templates/newton/neutron.conf

@ -32,6 +32,9 @@ allow_automatic_dhcp_failover = {{ allow_automatic_dhcp_failover }}
network_scheduler_driver = {{ network_scheduler_driver }}
dhcp_load_type = {{ dhcp_load_type }}
{% endif -%}
{% if router_scheduler_driver -%}
router_scheduler_driver = {{ router_scheduler_driver }}
{% endif -%}
{% if neutron_bind_port -%}
bind_port = {{ neutron_bind_port }}

3
templates/ocata/neutron.conf

@ -35,6 +35,9 @@ allow_automatic_dhcp_failover = {{ allow_automatic_dhcp_failover }}
network_scheduler_driver = {{ network_scheduler_driver }}
dhcp_load_type = {{ dhcp_load_type }}
{% endif -%}
{% if router_scheduler_driver -%}
router_scheduler_driver = {{ router_scheduler_driver }}
{% endif -%}
{% if neutron_bind_port -%}
bind_port = {{ neutron_bind_port }}

3
templates/pike/neutron.conf

@ -35,6 +35,9 @@ allow_automatic_dhcp_failover = {{ allow_automatic_dhcp_failover }}
network_scheduler_driver = {{ network_scheduler_driver }}
dhcp_load_type = {{ dhcp_load_type }}
{% endif -%}
{% if router_scheduler_driver -%}
router_scheduler_driver = {{ router_scheduler_driver }}
{% endif -%}
{% if neutron_bind_port -%}
bind_port = {{ neutron_bind_port }}

3
templates/queens/neutron.conf

@ -35,6 +35,9 @@ allow_automatic_dhcp_failover = {{ allow_automatic_dhcp_failover }}
network_scheduler_driver = {{ network_scheduler_driver }}
dhcp_load_type = {{ dhcp_load_type }}
{% endif -%}
{% if router_scheduler_driver -%}
router_scheduler_driver = {{ router_scheduler_driver }}
{% endif -%}
{% if neutron_bind_port -%}
bind_port = {{ neutron_bind_port }}

3
templates/rocky/neutron.conf

@ -35,6 +35,9 @@ allow_automatic_dhcp_failover = {{ allow_automatic_dhcp_failover }}
network_scheduler_driver = {{ network_scheduler_driver }}
dhcp_load_type = {{ dhcp_load_type }}
{% endif -%}
{% if router_scheduler_driver -%}
router_scheduler_driver = {{ router_scheduler_driver }}
{% endif -%}
{% if neutron_bind_port -%}
bind_port = {{ neutron_bind_port }}

3
templates/train/neutron.conf

@ -35,6 +35,9 @@ allow_automatic_dhcp_failover = {{ allow_automatic_dhcp_failover }}
network_scheduler_driver = {{ network_scheduler_driver }}
dhcp_load_type = {{ dhcp_load_type }}
{% endif -%}
{% if router_scheduler_driver -%}
router_scheduler_driver = {{ router_scheduler_driver }}
{% endif -%}
{% if neutron_bind_port -%}
bind_port = {{ neutron_bind_port }}

3
templates/ussuri/neutron.conf

@ -35,6 +35,9 @@ allow_automatic_dhcp_failover = {{ allow_automatic_dhcp_failover }}
network_scheduler_driver = {{ network_scheduler_driver }}
dhcp_load_type = {{ dhcp_load_type }}
{% endif -%}
{% if router_scheduler_driver -%}
router_scheduler_driver = {{ router_scheduler_driver }}
{% endif -%}
{% if neutron_bind_port -%}
bind_port = {{ neutron_bind_port }}

3
unit_tests/test_neutron_api_context.py

@ -527,6 +527,9 @@ class NeutronCCContextTest(CharmTestCase):
'neutron.scheduler.dhcp_agent_scheduler'
'.AZAwareWeightScheduler'),
'dhcp_load_type': 'networks',
'router_scheduler_driver': (
'neutron.scheduler.l3_agent_scheduler'
'.AZLeastRoutersScheduler'),
}
napi_ctxt = context.NeutronCCContext()
self.maxDiff = None

Loading…
Cancel
Save