Skip to content

ping output and DNS failure semantics differ from Linux iputils #515

Description

@matt-dz

What was run

ping -c 2 -W 1 127.0.0.1
ping -c 1 -W 1 kafka

Expected output

For supported ping invocations on Linux, rshell should match GNU iputils semantics closely enough for diagnostic use.

Oracle environment:

Image: pshim-kind-node:v1.32.0, built FROM kindest/node:v1.32.0
Linux flavor: Debian GNU/Linux 12 (bookworm), aarch64
Oracle shell: /usr/bin/bash --noprofile --norc <temp-script>
bash package: 5.2.15-2+b10
iputils-ping package: 3:20221126-1+deb12u1
ping -V: ping from iputils 20221126

Representative oracle output for a successful ping:

PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.046 ms

--- 127.0.0.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1062ms
rtt min/avg/max/mdev = 0.044/0.045/0.046/0.001 ms

Representative oracle output for DNS failure:

ping: kafka: Temporary failure in name resolution

with exit code 2.

Actual output

rshell emits BSD-style success output and different DNS failure semantics:

PING 127.0.0.1 (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.181 ms

--- 127.0.0.1 ping statistics ---
2 packets transmitted, 2 received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.151/0.166/0.181/0.014 ms

For DNS failure, rshell returned exit code 1 and stderr like:

ping: lookup kafka on 172.18.0.1:53: server misbehaving

Why this matters

Agents and scripts often inspect ping output, packet-loss summaries, and exit codes while diagnosing networking incidents. The current differences can make Linux-focused diagnostics behave differently under rshell even when the same supported command line is used.

These differences were found during rshell QA by comparing supported ping invocations against a Linux oracle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions