-
Notifications
You must be signed in to change notification settings - Fork 215
OPNET-772: Add NAT64/DNS64 support for IPv6-only clusters on IPv4-only hosts #1952
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ set -euxo pipefail | |
| source logging.sh | ||
| source common.sh | ||
| source network.sh | ||
| source nat64.sh | ||
| source utils.sh | ||
| source validation.sh | ||
| source oc_mirror.sh | ||
|
|
@@ -293,6 +294,13 @@ if [ "${NUM_EXTRA_WORKERS}" -ne 0 ] || [ "${NUM_ARM_WORKERS}" -ne 0 ]; then | |
| fi | ||
| fi | ||
|
|
||
| # For NAT64 (IPv6-only cluster on an IPv4-only host) the BMC emulator must be | ||
| # reached over IPv6 by the in-cluster Ironic pods; rewrite the node BMC addresses | ||
| # to the host's IPv6 baremetal address. | ||
| if [[ "${ENABLE_NAT64}" == "true" ]]; then | ||
| nat64_fixup_bmc_addresses | ||
| fi | ||
|
|
||
| # shellcheck disable=SC2034 | ||
| ZONE="\nZONE=libvirt" | ||
|
|
||
|
|
@@ -474,6 +482,16 @@ if [ "$EXT_IF" ]; then | |
| sudo $IPTABLES -A FORWARD --in-interface "${BAREMETAL_NETWORK_NAME}" -j ACCEPT | ||
| fi | ||
|
|
||
| # When NAT64 is enabled, ensure IPv6 forwarding rules are set for the bridge | ||
| if [[ "${ENABLE_NAT64}" == "true" ]]; then | ||
| # Check-then-add so re-running does not accumulate duplicate rules; cleanup_nat64 | ||
| # removes these with the matching -D commands. | ||
| sudo ip6tables -C FORWARD --in-interface "${BAREMETAL_NETWORK_NAME}" -j ACCEPT 2>/dev/null || \ | ||
| sudo ip6tables -A FORWARD --in-interface "${BAREMETAL_NETWORK_NAME}" -j ACCEPT | ||
| sudo ip6tables -C FORWARD --out-interface "${BAREMETAL_NETWORK_NAME}" -m state --state RELATED,ESTABLISHED -j ACCEPT 2>/dev/null || \ | ||
| sudo ip6tables -A FORWARD --out-interface "${BAREMETAL_NETWORK_NAME}" -m state --state RELATED,ESTABLISHED -j ACCEPT | ||
| fi | ||
|
Comment on lines
+485
to
+493
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: these rules are broader than needed, duplicate on every run, and are never removed Three separate issues, in descending order of importance:
I want to be precise about severity, because this was initially filed as a security bypass and that framing did not hold up. I tested it four ways: the ip6 Fix: |
||
|
|
||
| # Switch NetworkManager to internal DNS | ||
| if [ "$MANAGE_BR_BRIDGE" == "y" ]; then | ||
| switch_to_internal_dns | ||
|
|
@@ -536,6 +554,16 @@ fi | |
| sudo virsh net-list | grep "${PROVISIONING_NETWORK_NAME}" || sudo virsh net-start "${PROVISIONING_NETWORK_NAME}" | ||
| sudo virsh net-list | grep "${BAREMETAL_NETWORK_NAME}" || sudo virsh net-start "${BAREMETAL_NETWORK_NAME}" | ||
|
|
||
| # Configure NAT64/DNS64 if enabled | ||
| if [[ "${ENABLE_NAT64}" == "true" ]]; then | ||
| configure_nat64_bridge_ipv6 | ||
| configure_tayga | ||
| configure_dns64 | ||
| # Make the sushy BMC cert valid for the IPv6 baremetal address so the | ||
| # IPv6-only in-cluster Ironic can reach the BMC. Must run before step 05 | ||
| # embeds this cert into the install-config trust bundle. | ||
| nat64_fixup_sushy_cert | ||
| fi | ||
|
|
||
| # Setup a single nfs export for image registry | ||
| if [ "${PERSISTENT_IMAGEREG}" == true ] ; then | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: this fails on a clean EL10 host —
taygaships only in EPEL, which the EL10 branch never enablescentos10/rhel10are an explicitly supported branch (line 111; the catch-all at 119-121 exits 1 for anything else), but only the EL9 branch installs EPEL (line 97epel-release, line 106 the EPEL-9 RPM). The EL10 branch (111-118) only enables CRB viasubscription-manager ... || true. This install sits after thecase, so it runs on every branch. Underset -euxo pipefail(line 2) the failure aborts the whole script.Nothing else enables EPEL first: the only other reference is
agent/01_agent_requirements.sh:58(different script, gated onAGENT_E2E_TEST_BOOT_MODE), and the pinned metal3-dev-envpackages_installationrole has noepel/taygareferences.Fix: enable EPEL 10 in the EL10 branch —
dnf -y install epel-release(CentOS Stream) or the EPEL-10 release RPM (RHEL) — or explicitly reject NAT64 on EL10.unboundis fine; it is in BaseOS/AppStream on both.Reproducer
Steps: Queried remote repodata with
dnf repoquery --repofrompathagainstmirror.stream.centos.organddl.fedoraproject.org, then reproduced end-to-end in a cleanquay.io/centos/centos:stream10container using the EL10 branch semantics (CRB on, no EPEL).Expected:
dnf -y install tayga unboundsucceeds, as it does on EL9.Actual:
Correction to one panel claim: EPEL 10 does ship tayga, and
epel-release+dnf -y install tayga unboundon EL10 returns RC=0. So enabling EPEL is a sufficient fix.