Resolve slow fact gathering when seed SNAT is off

Stop configuring the seed host as gateway when seed SNAT is disabled
(which is the default since Xena), otherwise overcloud hosts may take a
long time to gather facts until their network configuration is applied
(probably because DNS servers are thought to be reachable until the
gateway is changed or removed).

Closes-Bug: #2039461
Change-Id: Ib847d3420dee374cec067cd8af519b510be04120
(cherry picked from commit 9980a8f891)
This commit is contained in:
Pierre Riteau 2023-10-16 17:31:05 +02:00
parent c6d0829576
commit 8a1aa4dc9b
2 changed files with 18 additions and 4 deletions

View File

@ -19,10 +19,10 @@
ipv4_interface_mac: "{% raw %}{{ extra.pxe_interface_mac | default }}{% endraw %}"
ipv4_address: "{{ admin_oc_net_name | net_ip }}"
ipv4_subnet_mask: "{{ admin_oc_net_name | net_mask }}"
# If the admin network does not have a gateway defined, use the
# seed as a gateway to allow external access until other networks have
# been configured.
ipv4_gateway: "{{ admin_oc_net_name | net_gateway or admin_oc_net_name | net_ip(seed_host) }}"
# If the admin network does not have a gateway defined and seed SNAT is
# enabled, use the seed as a gateway to allow external access until other
# networks have been configured. Otherwise, do not set any gateway.
ipv4_gateway: "{{ admin_oc_net_name | net_gateway or admin_oc_net_name | net_ip(seed_host) if seed_enable_snat | bool }}"
ipv4_nameserver: "{{ resolv_nameservers }}"
network_mtu: "{{ admin_oc_net_name | net_mtu or '1500' }}"
vlan_id: "{{ '' if admin_oc_net_name == provision_oc_net_name else (admin_oc_net_name | net_vlan) }}"

View File

@ -0,0 +1,14 @@
---
upgrade:
- |
If the admin network does not have a gateway defined and
``seed_enable_snat`` is ``false``, which is the default, overcloud hosts
will not have a default gateway immediately after provisioning anymore. A
default gateway on another network can still be applied during the host
configuration step.
fixes:
- |
Fixes slow fact gathering in some environments by not configuring the seed
host as the initial default gateway for overcloud hosts when
``seed_enable_snat`` is ``false``, which is the default.
`LP#2039461 <https://bugs.launchpad.net/kolla-ansible/+bug/2039461>`__