Repository navigation
fix(controlplane): let the control plane's pods ping without sudo - #960
Merged
Merged
Conversation
Set net.ipv4.ping_group_range to "0 2147483647" on every pod that runs the control plane image (webappapi, tasks, monitoring, admin-control). Any group may then open ICMP and ICMPv6 echo sockets, so the storage node monitor can ping without sudo or CAP_NET_RAW once the image drops sudo. The sysctl is namespaced and on the kubelet's safe list.
boddumanohar
approved these changes
Nov 23, 2026
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
The control plane currently invokes ping via sudo. This is because:
setuid, which would be common on classical distributionsThis changeset is meant to address #946 while requiring fewer privileges.
Sets
net.ipv4.ping_group_range=0 2147483647in the pod security context of the four Deployments that run the control plane image (webappapi, tasks, monitoring, admin-control). Any group can then open ICMP and ICMPv6 echo sockets, so the storage node monitor can ping without sudo, setuid, or CAP_NET_RAW. Despite its name, the sysctl also covers IPv6.The sysctl is network-namespaced and on the kubelet's safe list since 1.18. Pod Security baseline/restricted and OpenShift's SCCs admit it. None of these pods use the host network.
Companion: simplyblock/sbcli#1702 drops
sudofromping_host. This PR is harmless with the current image and should merge first.Follow-up: reverting #954
Once the minimum control plane image the operator deploys contains the sbcli change, #954 (anyuid SCC) can be reverted, with these conditions:
ping_hostis the onlysudocall reachable in these pods on Kubernetes. The others are Docker swarm, systemd, or storage node paths.simplyblock-scc-anyuidRoleBinding. It is owned by the ControlPlane, so it is not garbage-collected when the operator stops applying it.Testing
TestEveryControlPlaneImageWorkloadMayPingUnprivileged, red before the change, green after.make testpasses.ping -4andping -6fail by default and succeed with the sysctl set.