Repository navigation
fix(health): ping storage nodes without sudo - #1702
Merged
Merged
Conversation
The control plane's pods on Kubernetes may run as a random UID with privilege escalation off (OpenShift restricted-v2), where sudo fails and every node is reported unreachable. The operator now sets net.ipv4.ping_group_range on those pods, which lets any group open ICMP and ICMPv6 echo sockets, so ping runs without sudo.
Collaborator
Author
|
Note that this does depend on a sysctl that's set in recent k8s and docker runtimes implicitly. Operator PR #960 sets it explicitly for documentation and backwards compatibility. On legacy docker, it's a host setting though. I've set this on all lab hosts to ensure we maintain compatiblity until docker deployments are phased out. |
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
ping_hostransudo ping. On OpenShift's restricted-v2 SCC the control plane pods run as a random UID with privilege escalation off, so sudo fails and the storage node monitor reports every node unreachable (simplyblock-operator#954 worked around this by granting anyuid).This drops
sudo. The operator setsnet.ipv4.ping_group_range=0 2147483647on the control plane pods (simplyblock/simplyblock-operator#960), which lets any group open ICMP and ICMPv6 echo sockets. Despite its name, the sysctl governs IPv6 echo sockets too.This is to address simplyblock/simplyblock-operator#946 by removing the sudo ping invokation altogether.
Merge order
Merge the operator PR first. This image on an operator without the sysctl cannot ping: UBI10's
pinghas neither setuid nor file capabilities.Docker swarm
Swarm services run on the host network as
simplyblock, so the host'snet.ipv4.ping_group_rangemust include that user's group. Most systemd distributions default it to0 2147483647. Hosts that do not need the sysctl set before upgrading.Testing
tests/unit/test_node_reachability.py::test_ping_host_runs_ping_without_sudo, red before the change, green after. Full unit suite passes.ping -4andping -6fail with "missing cap_net_raw+p capability or setuid?" by default and succeed with the sysctl set.