ping: per-probe results are never parsed (results always empty) #12

Open
opened 2026-10-06 17:31:30 +00:00 by christianmanivong · 0 comments
Owner

ProxmoxRoutingMixin.ping (napalm_proxmox/routing_mixin.py:96) matches probe lines with

icmp_seq=\d+.*?time=([\d.]+) ms.*?from ([\d.a-fA-F:]+)

iputils prints 64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=0.123 ms. "from" comes before icmp_seq, and . does not cross lines, so the pattern never matches. Run against real iputils output, it returns []. results is therefore always empty.

The summary (probes_sent, packet_loss, rtt) is right. That is why the ping sweep, which falls back to the summary (napalm_device_types/ping_sweep.py:156), is not affected.

Fix: parse bytes from <ip>: … time=<rtt> ms, or use the shared parser proposed in NAPALM/napalm-device-types#12. Add a test with real iputils output.

Prio P4: missing detail, no wrong verdict.

From the NetOrk function index (NetOrk/netork#670); every location was checked against the current code. Paths are relative to each driver repo.

`ProxmoxRoutingMixin.ping` (`napalm_proxmox/routing_mixin.py`:96) matches probe lines with ``` icmp_seq=\d+.*?time=([\d.]+) ms.*?from ([\d.a-fA-F:]+) ``` iputils prints `64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=0.123 ms`. "from" comes *before* `icmp_seq`, and `.` does not cross lines, so the pattern never matches. Run against real iputils output, it returns `[]`. `results` is therefore always empty. The summary (`probes_sent`, `packet_loss`, rtt) is right. That is why the ping sweep, which falls back to the summary (`napalm_device_types/ping_sweep.py`:156), is not affected. **Fix:** parse `bytes from <ip>: … time=<rtt> ms`, or use the shared parser proposed in NAPALM/napalm-device-types#12. Add a test with real iputils output. Prio P4: missing detail, no wrong verdict. From the NetOrk function index (NetOrk/netork#670); every location was checked against the current code. Paths are relative to each driver repo.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NAPALM/napalm-proxmox#12