Skip to content
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

[Backport 1.31-strict] fix: ensure nf_conntrack module loaded for kubelite. #4731

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions microk8s-resources/wrappers/run-kubelite-with-args
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,19 @@ then
fi
fi

# kube-proxy reads some values related to the 'nf_conntrack' kernel
# module from procfs on startup, so we must ensure it is loaded:
if ! [ -f /proc/sys/net/netfilter/nf_conntrack_max ]
then
if /sbin/modprobe nf_conntrack || modprobe nf_conntrack
then
echo "Successfully loaded nf_conntrack module."
else
echo -n "Failed to load nf_conntrack kernel module. "
echo "ProxyServer will fail to start until it's loaded."
fi
fi

# on lxc containers do not try to change the conntrack configuration
# see https://github.com/canonical/microk8s/issues/1438
if grep -E lxc /proc/1/environ &&
Expand Down
Loading