Define default value for neutron_default_availability_zones

OVN driver does have a different behaviour whenever scheduler hint
is provided or not [1]. In case it's not provided, it will filter out
all chassis which do not have AZ specified[2]. With that, we supply
an AZ for each chassis starting with [3].

So most painless way forward from here is to ensure that same hint will
be supplied for scheduling.

With that the change should be also safe for OVS/LXB drivers.

[1] e9acc14d37/neutron/common/ovn/utils.py (L1071-L1078)
[2] e9acc14d37/neutron/common/ovn/utils.py (L896-L897)
[3] https://review.opendev.org/c/openstack/openstack-ansible-os_neutron/+/904572/2/tasks/providers/setup_ovs_ovn.yml

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-openstack_hosts/+/930272
Change-Id: I6caa3f682133c89c1c997599043fe142c84eb016
This commit is contained in:
Dmitriy Rabotyagov 2024-09-24 09:51:35 +02:00
parent 67be118a53
commit aebe62ef84
2 changed files with 19 additions and 5 deletions

View File

@ -347,15 +347,21 @@ neutron_service_in_ldap: "{{ service_ldap_backend_enabled | default(False) }}"
###
### Availability zones
###
# Default availability zones do define a list of zones to where routers/agents
# will be scheduled by default. This is a list, since a deployment might stretch
# networks across AZs
neutron_default_availability_zones: []
# Availability zone defines current AZ of the component. For OVN you can define
# multiple AZs separated with a colon, ie "az1:az2"
neutron_availability_zone: nova
# Default availability zones do define a list of zones to where routers/agents
# will be scheduled by default. This is a list, since a deployment might stretch
# networks across AZs.
# Default: Neutron will attempt scheduling across all defined AZs for Neutron hosts.
neutron_default_availability_zones: >-
{{
groups['neutron_all'] | map(
'extract', hostvars, 'neutron_availability_zone') | map(
'default', neutron_availability_zone) | map('split', ':') | flatten | unique
}}
###
### Telemetry integration
###

View File

@ -0,0 +1,8 @@
---
upgrade:
- |
Changed a default value for a ``neutron_default_availability_zones``
variable. From now on role will gather defined ``neutron_availability_zone``
across all hosts (which defaults to `nova`) and attempt to schedule
on all available Availability Zones by default.
Change of the default should not alter behaviour for single-AZ setups.