Skip to content

Commit

Permalink
Fix gateway assignment when seed SNAT is disabled
Browse files Browse the repository at this point in the history
Fix a logic issue when seed SNAT is not enabled. In this circumstance
Bifrost was generating ConfigDrive data with the default gateway unset
even when one is available on the admin network. This regression was
introduced in Ib847d3420dee374cec067cd8af519b510be04120 [1].

[1] https://review.opendev.org/c/openstack/kayobe/+/898434

Closes-Bug: #2045926
Change-Id: Ifd9f9cd389ac09448fc91dba74f8f09595698b55
(cherry picked from commit 49f9104)
  • Loading branch information
oneswig authored and priteau committed Dec 8, 2023
1 parent 5bff84f commit 1c44097
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ansible/kolla-bifrost-hostvars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# 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_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) }}"
Expand Down
6 changes: 6 additions & 0 deletions releasenotes/notes/fix-bifrost-gateway-b4bc8a0396dfa935.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
fixes:
- |
Fixes gateway assignment when seed SNAT is disabled. In this circumstance
Bifrost was generating ConfigDrive data with the default gateway unset even
when one is available on the admin network.

0 comments on commit 1c44097

Please sign in to comment.