Add missing kernel config checks#6946
Merged
Merged
Conversation
Add additional kernel config checks for NETFILTER_XT_MATCH_COMMENT and NETFILTER_XT_MATCH_MULTIPORT as they are both required to run k3s. Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
Member
|
Thanks a lot for the PR and especially for signing your commit! Just as a heads up we're currently under code freeze as we enter release week, but we can review and merge for you once freeze is lifted (assuming review passes). Thanks again! |
brandond
approved these changes
Feb 12, 2023
dereknola
approved these changes
Feb 13, 2023
Member
|
Thanks again for the contribution! |
This was referenced Mar 20, 2023
dereknola
pushed a commit
to dereknola/k3s
that referenced
this pull request
Mar 29, 2023
Add additional kernel config checks for NETFILTER_XT_MATCH_COMMENT and NETFILTER_XT_MATCH_MULTIPORT as they are both required to run k3s. Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
dereknola
pushed a commit
to dereknola/k3s
that referenced
this pull request
Mar 29, 2023
Add additional kernel config checks for NETFILTER_XT_MATCH_COMMENT and NETFILTER_XT_MATCH_MULTIPORT as they are both required to run k3s. Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
This was referenced Mar 29, 2023
dereknola
added a commit
that referenced
this pull request
Mar 29, 2023
* Add missing kernel config checks (#6946) Add additional kernel config checks for NETFILTER_XT_MATCH_COMMENT and NETFILTER_XT_MATCH_MULTIPORT as they are both required to run k3s. Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud> * Enhance `k3s check-config` (#7091) * Move CONFIG_CGROUP_PIDS to Required Signed-off-by: Derek Nola <derek.nola@suse.com> --------- Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud> Signed-off-by: Derek Nola <derek.nola@suse.com> Co-authored-by: Richard Steinmetz <richard@steinmetz.cloud>
dereknola
added a commit
that referenced
this pull request
Mar 29, 2023
* Add missing kernel config checks (#6946) Add additional kernel config checks for NETFILTER_XT_MATCH_COMMENT and NETFILTER_XT_MATCH_MULTIPORT as they are both required to run k3s. Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud> * Enhance `k3s check-config` (#7091) * Move CONFIG_CGROUP_PIDS to Required Signed-off-by: Derek Nola <derek.nola@suse.com> --------- Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud> Signed-off-by: Derek Nola <derek.nola@suse.com> Co-authored-by: Richard Steinmetz <richard@steinmetz.cloud>
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.
Add additional kernel config checks for
NETFILTER_XT_MATCH_COMMENTandNETFILTER_XT_MATCH_MULTIPORTas they are both required to run k3s.Proposed Changes
I was experimenting with minimal linux kernels and k3s the other day. I used your excellent check-config.sh script to check my configuration. However, k3s didn't run and required extra config options that were missing from the script.
Types of Changes
I added 2 missing config checks to the script. I categorized them as required as the server failed to start without them. Furthermore, I bootstrapped vanilla servers without any extra configuration (e.g. env variables) during my testing.
Verification
Here are some error messages taken from
journalctl -u k3s.service.Regarding
NETFILTER_XT_MATCH_COMMENT:Feb 11 22:57:15 virtoo k3s[6375]: panic: F0211 22:57:15.908590 6375 network_policy_controller.go:341] Failed to run iptables command to insert in INPUT chain running [/usr/bin/iptables -t filter -I INPUT 1 -m comment --comment kube-router netpol - 4IA2OSFRMVNDXBVV -j KUBE-ROUTER-INPUT --wait]: exit status 1: Warning: Extension comment revision 0 not supported, missing kernel module?Regarding
NETFILTER_XT_MATCH_MULTIPORT:Feb 11 23:02:34 virtoo k3s[2678]: panic: F0211 23:02:34.075017 2678 network_policy_controller.go:336] Failed to verify rule exists in KUBE-ROUTER-INPUT chain due to running [/usr/bin/iptables -t filter -C KUBE-ROUTER-INPUT -p tcp -m comment --comment allow LOCAL TCP traffic to node ports - LR7XO7NXDBGQJD2M -m addrtype --dst-type LOCAL -m multiport --dports 30000:32767 -j RETURN --wait]: exit status 2: Warning: Extension multiport revision 0 not supported, missing kernel module?Those error messages vanish and the server starts when both match extensions are compiled into the kernel (or as modules).
Testing
I don't think this is subject to unit testing. Please let me know otherwise.
Linked Issues
User-Facing Change
Further Comments