Skip to content

Fix IPv6 deployment variables - #1709

Open
nuhakala wants to merge 1 commit into
metal3-io:mainfrom
Nordix:nuhakala/fix-ipv6-deployment
Open

Fix IPv6 deployment variables#1709
nuhakala wants to merge 1 commit into
metal3-io:mainfrom
Nordix:nuhakala/fix-ipv6-deployment

Conversation

@nuhakala

@nuhakala nuhakala commented Jul 29, 2026

Copy link
Copy Markdown
Member
  • Fix image upload to local registry
  • Remove unneeded script hack/replace-containerd2.sh
  • Edit Calico configuration to work with IPv6 only
  • Edit templates to initialize provisioned OS correctly with IPv6 only
  • Add needed iptables/firewalld rules for IPv6 only
  • Update documentation related to IPv6 only

I have tested all three different node images (centos, ubuntu, leap) and they are working. However, I have not tested running "make" on a fresh VM, because I have limited access to IPv6 enabled VMs.

@metal3-io-bot

Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign kashifest for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@metal3-io-bot metal3-io-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 29, 2026
@nuhakala

nuhakala commented Jul 29, 2026

Copy link
Copy Markdown
Member Author

Yet another PR about IPv6. Previously the metal3 CI VMs supported only IPv4, but now this has changed and I have been able to test these with VM having native IPv6 spport. So these changes are based on the assumption that host machine have globally routable IPv6 address, which means that no tricks is needed to make IPv6 provisioning work. With these changes provisioning an IPv6 only cluster should work, meaning that the provisioned cluster has 0 IPv4 addresses (excluding loopback) and the network boot is done over IPv6 and also IPA image has only IPv6 addresses.

Pivoting won't still work. This is because CRI-O in the provisioned cluster does not allow IPv6 addresses in the image references. CRI-O uses external image reference parse, which is here: https://github.com/podman-container-tools/container-libs/blob/image/v5.40.0/image/docker/reference/regexp.go The comments there state

nameComponent restricts registry path component names to start with at least one letter or number, with following parts able to be separated by one period, one or two underscore and multiple dashes.

So in our case when the name starts with [fd55::1]... it fails. Using domain names would probably allow also pivoting, but I think it adds too much complexity compared to the benefit.

If this PR gets merged, then I will first rebase (so that they can serve as proof of concepts if needed) and then close the two other PRs

These are probably not needed/wanted because it is reasonable to expect that the host machine has globally routable IPv6 address.

@nuhakala
nuhakala force-pushed the nuhakala/fix-ipv6-deployment branch from 1428294 to 466f7ae Compare July 29, 2026 12:00
@nuhakala

Copy link
Copy Markdown
Member Author

/test metal3-centos-e2e-integration-test-release-1-13 metal3-dev-env-integration-test-ubuntu-main
/cc @tuminoid @Rozzii @terror96

before: "name: FELIX_HEALTHENABLED"
regexp: "false"
replace: "true"
when: IP_STACK == "v6"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about dual stack? Also, I don't see CALICO_IPV6POOL_CIDR being set anywhere.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not tested dual stack at all because I have been afraid that I would not notice IPv6 failures if the system falls back to v4. But I think we can configure dual stack to the provisioned cluster without any problems. I will test it.

I did not add CALICO_IPV6POOL_CIDR because Calico docs say that it should not be set when using kubeadm. This file sets it with v4, so it should work also with v6, but as it is not needed I did not add it. We maybe also want to create a PR to remove it from v4 section as well, but that should be in a separate PR.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, modified the calico config for dual stack as well. I am not sure how well the dual stack will work TBH, I did some fast testing but the deployment broke when setting IPv6 service CIDR in the dev env config. Control plane endpoint was v4 and it broke when trying to use v6 service CIDR at the same time. So I did not start to debug the correct variable combination for dual-stack.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not add CALICO_IPV6POOL_CIDR because Calico docs say that it should not be set when using kubeadm. This file sets it with v4, so it should work also with v6, but as it is not needed I did not add it. We maybe also want to create a PR to remove it from v4 section as well, but that should be in a separate PR.

Nod, I just always added it for my IPv6/dual-stack deployments, which is indeed a bit confusing when there is no actual reason to do so such as splitting the pod CIDR into multiple IP pools with different settings. Because the Calico docs also state that there is no real need for the pool configuration variables, we should not have them unless we have a good reason to do so.

@nuhakala
nuhakala force-pushed the nuhakala/fix-ipv6-deployment branch from 466f7ae to e9712fc Compare July 30, 2026 07:41
@nuhakala

Copy link
Copy Markdown
Member Author

/test metal3-centos-e2e-integration-test-release-1-13 metal3-dev-env-integration-test-ubuntu-main

@nuhakala

Copy link
Copy Markdown
Member Author

/test metal3-centos-e2e-integration-test-release-1-13

1 similar comment
@nuhakala

Copy link
Copy Markdown
Member Author

/test metal3-centos-e2e-integration-test-release-1-13

@nuhakala

Copy link
Copy Markdown
Member Author

/copilot-review

@metal3-io-bot

Copy link
Copy Markdown
Collaborator

Copilot code review has been requested by @nuhakala. Please allow a few moments for the review to be added.

@terror96

Copy link
Copy Markdown
Contributor

/copilot-review

@metal3-io-bot
metal3-io-bot requested a balanced review from Copilot August 27, 2026 05:59
@metal3-io-bot

Copy link
Copy Markdown
Collaborator

Copilot code review has been requested by @terror96. Please allow a few moments for the review to be added.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves IPv6-only Metal3 deployments across networking, node initialization, Calico, and image handling.

Changes:

  • Adds IPv6 firewall, service CIDR, Calico, and node-network configuration.
  • Uses Crane for local registry image copies.
  • Updates IPv6 documentation and removes the containerd workaround.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
vm-setup/roles/firewall/tasks/iptables.yaml Adds IPv6 masquerading.
vm-setup/roles/firewall/tasks/firewalld.yaml Adds libvirt-zone masquerading.
vars.md Revises IPv6 setup guidance.
tests/roles/run_tests/vars/main.yml Makes service CIDR configurable.
tests/roles/run_tests/templates/main/cluster-template-workers-kubeadm-config-ubuntu.yaml Enables IPv6 forwarding.
tests/roles/run_tests/templates/main/cluster-template-workers-kubeadm-config-leap.yaml Enables IPv6 forwarding.
tests/roles/run_tests/templates/main/cluster-template-workers-kubeadm-config-centos.yaml Configures IPv6 provisioning networking.
tests/roles/run_tests/templates/main/cluster-template-controlplane-kubeadm-config-ubuntu.yaml Updates IPv6 forwarding and VRRP.
tests/roles/run_tests/templates/main/cluster-template-controlplane-kubeadm-config-leap.yaml Updates IPv6 networking and VRRP.
tests/roles/run_tests/templates/main/cluster-template-controlplane-kubeadm-config-centos.yaml Updates IPv6 networking and VRRP.
tests/roles/run_tests/templates/main/cluster-template-cluster.yaml Uses an unbracketed IPv6 API endpoint.
tests/roles/run_tests/tasks/install_calico.yaml Adds IPv6 Calico configuration.
hack/replace-containerd2.sh Removes the containerd replacement workaround.
04_verify.sh Suppresses dynamic-function shellcheck warnings.
02_configure_host.sh Copies registry images with Crane.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread vm-setup/roles/firewall/tasks/iptables.yaml Outdated
Comment thread vm-setup/roles/firewall/tasks/firewalld.yaml Outdated
Comment thread 02_configure_host.sh Outdated
Comment thread tests/roles/run_tests/tasks/install_calico.yaml Outdated
Comment thread vars.md Outdated
@nuhakala
nuhakala force-pushed the nuhakala/fix-ipv6-deployment branch from e9712fc to 4766268 Compare August 31, 2026 12:28
@nuhakala

Copy link
Copy Markdown
Member Author

/copilot-review
/test metal3-centos-e2e-integration-test-release-1-13 metal3-dev-env-integration-test-ubuntu-main

Also, fixing the issues I noticed that the templates don't consider dualstack case. I have not tested dualstack at all anyway, so no idea if it works otherwise. But the problem is that the templates read the IP address from the same variable in both v4 and v6 case, so configuring two addresses would require more edits.

@metal3-io-bot
metal3-io-bot requested a balanced review from Copilot August 31, 2026 12:32
@metal3-io-bot

Copy link
Copy Markdown
Collaborator

Copilot code review has been requested by @nuhakala. Please allow a few moments for the review to be added.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.

Comment thread tests/roles/run_tests/tasks/install_calico.yaml
Comment thread vm-setup/roles/firewall/tasks/iptables.yaml Outdated
Comment thread tests/roles/run_tests/tasks/install_calico.yaml
- Fix image upload to local registry
- Remove unneeded script hack/replace-containerd2.sh
- Edit Calico configuration to work with IPv6 only
- Edit templates to initialize provisioned OS correctly with IPv6 only
- Add needed iptables/firewalld rules for IPv6 only
- Update documentation related to IPv6 only

Signed-off-by: Nuutti Hakala <nuutti.hakala@est.tech>
@nuhakala
nuhakala force-pushed the nuhakala/fix-ipv6-deployment branch from 4766268 to 75aadb9 Compare August 31, 2026 12:46
@nuhakala

Copy link
Copy Markdown
Member Author

/copilot-review
/test metal3-centos-e2e-integration-test-release-1-13 metal3-dev-env-integration-test-ubuntu-main

@metal3-io-bot
metal3-io-bot requested a balanced review from Copilot August 31, 2026 12:47
@metal3-io-bot

Copy link
Copy Markdown
Collaborator

Copilot code review has been requested by @nuhakala. Please allow a few moments for the review to be added.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

jump: ACCEPT
state: "{{ firewall_rule_state }}"
when: (BOOTSTRAP_CLUSTER == "kind") and (ip_stack == "v4")
when: (BOOTSTRAP_CLUSTER == "kind") and (ip_stack == "v4" or ip_stack == "v4v6")

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dual stack is not really tested, and I don't expect it to work properly due to other problems, so I think this can be ignored

Comment thread vm-setup/roles/firewall/tasks/iptables.yaml
@nuhakala

Copy link
Copy Markdown
Member Author

@Rozzii @tuminoid @elfosardo Could this get some reviews. I think these are very reasonable changes to enable IPv6 only testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants