fix(bootstrap): fix nftables healthcheck and warn on missing flannel modules#25
Merged
maxamillion merged 1 commit intomidstreamfrom Apr 8, 2026
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
d0b6ee6 to
3f9a770
Compare
…modules Flannel's embedded traffic manager in k3s v1.35.x is compiled without the nft backend — it only has iptables-legacy support, which requires kernel modules (ip_tables, iptable_nat, iptable_filter, iptable_mangle) that modern distributions (Fedora 43+, RHEL 10+) no longer load by default. Changes: - cluster-entrypoint.sh: When running under Podman, check whether the iptable_nat module is loaded and emit an actionable warning if not. The modules are expected to be loaded at boot via modules-load.d (installed by the RPM spec); the warning covers the case where the host hasn't rebooted since installation. - cluster-healthcheck.sh: Replace the hardcoded 127.0.0.1 NodePort check with the node's actual InternalIP. When kube-proxy runs in nftables mode, NodePort DNAT rules only match the node's real IP addresses — loopback is not in the nftables nodeport-ips set, so the old check always failed. Tested on Fedora 43 (kernel 6.19, Podman 5.8.1) with the full lifecycle: gateway start, provider create/list/delete, sandbox create/exec/delete.
3f9a770 to
32f46b7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes
openshell gateway startfailing on Fedora 43+ and other modern distributions when using Podman with nftables kube-proxy mode.Related: Follow-up to #24 which added nftables kube-proxy support for Podman.
Problem
After #24 switched kube-proxy to nftables mode under Podman, two issues remained:
Flannel still needs legacy iptables modules. The flannel traffic manager embedded in k3s v1.35.x is compiled without an nft backend — it only has
iptables.(*IPTablesManager), nonftablesMgror equivalent. When flannel callsiptables -t natfor masquerade rules, it fails on Fedora 43+ becauseiptable_natis not loaded:Health check NodePort probe fails with nftables kube-proxy. The health check tests
127.0.0.1:30051, but nftables kube-proxy only adds the node's real IP to thenodeport-ipsset — loopback is never matched, so the probe always fails.Changes
deploy/docker/cluster-entrypoint.shiptable_natis loaded and emit an actionable warning if not%postscriptlet loads these modules immediately at install time and persists them viamodules-load.d; the warning covers non-RPM installsdeploy/docker/cluster-healthcheck.sh127.0.0.1with the node's actual InternalIP from kubectl127.0.0.1if the node IP can't be determinedTesting
Full lifecycle tested on an ephemeral Fedora 43 Linode instance (kernel 6.19.10, Podman 5.8.1, openshell 0.0.22 from COPR):
openshell gateway startopenshell statusopenshell provider create(OpenAI + Anthropic)openshell provider list/deleteopenshell sandbox createopenshell sandbox exec(uname, whoami, os-release)openshell sandbox deleteopenshell sandbox create --no-keep(ephemeral)Checklist