From 8a1aa4dc9bcbb22a8189b2bda315c0d55074b76b Mon Sep 17 00:00:00 2001 From: Pierre Riteau Date: Mon, 16 Oct 2023 17:31:05 +0200 Subject: [PATCH 1/3] 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 9980a8f891edac8f21d0cde9ee1e756a40c7be3b) --- ansible/kolla-bifrost-hostvars.yml | 8 ++++---- .../configdrive-gateway-62366f613e6eaac9.yaml | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 releasenotes/notes/configdrive-gateway-62366f613e6eaac9.yaml diff --git a/ansible/kolla-bifrost-hostvars.yml b/ansible/kolla-bifrost-hostvars.yml index e43bcd7e6..c74a4f88b 100644 --- a/ansible/kolla-bifrost-hostvars.yml +++ b/ansible/kolla-bifrost-hostvars.yml @@ -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) }}" diff --git a/releasenotes/notes/configdrive-gateway-62366f613e6eaac9.yaml b/releasenotes/notes/configdrive-gateway-62366f613e6eaac9.yaml new file mode 100644 index 000000000..f43684f03 --- /dev/null +++ b/releasenotes/notes/configdrive-gateway-62366f613e6eaac9.yaml @@ -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 `__ From a25dd2245ca8c04851284350958cebd7fbb89f47 Mon Sep 17 00:00:00 2001 From: Pierre Riteau Date: Fri, 20 Oct 2023 14:45:46 +0200 Subject: [PATCH 2/3] Fix Launchpad bug URL Change-Id: I5151e7be611b95f52c05422c03dafe666dba144e (cherry picked from commit 6b1ea167f4175af21860edfca1fdf6b5c5ec60c8) --- .../notes/bifrost-host-vars-deprovision-525c450cf20f7f71.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/releasenotes/notes/bifrost-host-vars-deprovision-525c450cf20f7f71.yaml b/releasenotes/notes/bifrost-host-vars-deprovision-525c450cf20f7f71.yaml index 4b866b30f..6d229fb5f 100644 --- a/releasenotes/notes/bifrost-host-vars-deprovision-525c450cf20f7f71.yaml +++ b/releasenotes/notes/bifrost-host-vars-deprovision-525c450cf20f7f71.yaml @@ -3,5 +3,4 @@ fixes: - | Fixes failure to run ``kayobe overcloud deprovision`` after Bifrost is redeployed. - `LP#2038889 `__ - + `LP#2038889 `__ From 0f8b8d0804a4de1a0dbff44fe0cfadf607ab4a51 Mon Sep 17 00:00:00 2001 From: Erik Berg Date: Tue, 10 Jan 2023 17:43:43 +0100 Subject: [PATCH 3/3] Allow overriding earlier use of NetworkManager veths have to be in nmconnection format, as nm-settings-ifcfg-rh has no support for reading veth network-scripts, as can be seen by the lack of a table at [1] "Table 37. veth setting". Hence why we're not using NetworkManager with old network-scripts. But if you set interfaces_use_networkmanager to true, you can already start using NM on rhel8 platforms if you so wish. [1] https://networkmanager.dev/docs/api/latest/nm-settings-ifcfg-rh.html Change-Id: Ic4dd537bee826ee89c009bf2c4c95781af19cbad --- ansible/roles/veth/defaults/main.yml | 2 ++ ansible/roles/veth/tasks/RedHat.yml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ansible/roles/veth/defaults/main.yml b/ansible/roles/veth/defaults/main.yml index e72b74341..2754b0d0a 100644 --- a/ansible/roles/veth/defaults/main.yml +++ b/ansible/roles/veth/defaults/main.yml @@ -1,3 +1,5 @@ --- +interfaces_use_networkmanager: "{{ ansible_facts.distribution_major_version | int >= 9 }}" + # List of virtual interfaces to configure. veth_interfaces: [] diff --git a/ansible/roles/veth/tasks/RedHat.yml b/ansible/roles/veth/tasks/RedHat.yml index 8315c8269..6b9c48760 100644 --- a/ansible/roles/veth/tasks/RedHat.yml +++ b/ansible/roles/veth/tasks/RedHat.yml @@ -1,6 +1,6 @@ --- - include_tasks: network-scripts.yml - when: ansible_facts.distribution_major_version | int < 9 + when: not interfaces_use_networkmanager - include_tasks: network-manager.yml - when: ansible_facts.distribution_major_version | int >= 9 + when: interfaces_use_networkmanager