Repository navigation
Check net.ipv4.ip_forward in validate-cks-node - #14773
Open
bhouse-nexthop wants to merge 1 commit into
Open
bhouse-nexthop wants to merge 1 commit into
bhouse-nexthop wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.22 #14773 +/- ##
=========================================
Coverage 18.32% 18.33%
- Complexity 16644 16655 +11
=========================================
Files 5939 5939
Lines 537787 537799 +12
Branches 65932 65935 +3
=========================================
+ Hits 98544 98580 +36
+ Misses 428033 428008 -25
- Partials 11210 11211 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
- validate-cks-node now fails when /proc/sys/net/ipv4/ip_forward is not 1 - kubeadm join preflight requires it; without it an added external node passes validation, is rebooted into the join userdata and then fails kubeadm preflight with a less obvious error - each check adds its message to a FAILURES list; the script prints them all and exits 1 if there are any, so a new check is one more `if` block - missing packages and ip_forward are reported together in one run - the caller's log line says the node failed validation, not that it lacks dependencies, since the reason may not be a package - reads /proc rather than calling sysctl, which is not on a non-root user's PATH on Debian Signed-off-by: Brad House <bhouse@nexthop.ai>
bhouse-nexthop
force-pushed
the
cks-validate-node-ip-forward
branch
from
November 24, 2026 17:06
70ee63a to
b92a9d1
Compare
bhouse-nexthop
added a commit
to bhouse-nexthop/cloudstack
that referenced
this pull request
Nov 24, 2026
Follow-up to "Check net.ipv4.ip_forward in validate-cks-node", for its amended upstream version (apache#14773). validate-cks-node now collects each failed check, missing packages and ip_forward alike, and prints all of them before exiting 1. The ip_forward failure says to set it under /etc/sysctl.d/, so it survives the reboot that follows. The add-node log says the node failed validation instead of listing only missing dependencies. Signed-off-by: Brad House <bhouse@nexthop.ai>
bhouse-nexthop
added a commit
to bhouse-nexthop/cloudstack
that referenced
this pull request
Nov 24, 2026
Follow-up to "Check net.ipv4.ip_forward in validate-cks-node", for its amended upstream version (apache#14773). validate-cks-node now collects each failed check, missing packages and ip_forward alike, and prints all of them before exiting 1. The ip_forward failure says to set it under /etc/sysctl.d/, so it survives the reboot that follows. The add-node log says the node failed validation instead of listing only missing dependencies. Signed-off-by: Brad House <bhouse@nexthop.ai>
This branch has not been deployed
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.
Description
Fixes #14772
validate-cks-nodenow also checksnet.ipv4.ip_forward, whichkubeadm joinpreflight requires.ip_forward=0, packages OKip_forward=0, packages missingip_forward=1Each check adds its message to a
FAILURESlist; the script prints them all and exits 1 if there are any. A new check is one moreifblock.The caller's log line now says the node failed validation, not that it lacks dependencies.
Reads
/proc/sys/net/ipv4/ip_forwardrather than callingsysctl, which is not on a non-root user's PATH on Debian.Checks the live value. A value set at runtime but not persisted will pass here and still be lost on the reboot that follows.
Touches the same script as #14756 (missing-package array). The two merge cleanly; at most a trivial conflict depending on merge order.
Types of changes
Bug Severity
How Has This Been Tested?
Ran the script in bash with
dpkgstubbed and the/procpath pointed at a temp file:0bash -nclean.