fix: ping timeouts, invented SNMP community (#2, #3) #13

Merged
christianmanivong merged 3 commits from fix/bugs-2026-11 into main 2026-11-01 22:00:26 +00:00
Owner

Two bug fixes, one commit each.

  • fix(ping): "Request timed out" lines no longer go into results, so a host that only times out is not reported alive (#2).

  • fix(snmp): without a listed community, get_snmp_config reports running=False, community="" instead of inventing "public" (#3). The issue's second point (management VLAN substring match) is already fixed on main by c2f0f7c (exact match, caller's listen preferred); the device-types floor is in pyproject since 4e171bf.

  • fix(snmp): the community is read from the Name column — the recorded show snmp-server community table starts with an Index column, so get_snmp_config reported 1 as the community (found while recording fixtures for #3).

Tested: against the recorded community table plus fixtures. pytest 54 passed, ruff, mypy, napalm-standard check/ratchet green.

Closes #2
Closes #3

Two bug fixes, one commit each. - `fix(ping)`: "Request timed out" lines no longer go into `results`, so a host that only times out is not reported alive (#2). - `fix(snmp)`: without a listed community, `get_snmp_config` reports `running=False, community=""` instead of inventing "public" (#3). The issue's second point (management VLAN substring match) is already fixed on main by c2f0f7c (exact match, caller's `listen` preferred); the device-types floor is in pyproject since 4e171bf. - `fix(snmp)`: the community is read from the Name column — the recorded `show snmp-server community` table starts with an Index column, so `get_snmp_config` reported `1` as the community (found while recording fixtures for #3). Tested: against the recorded community table plus fixtures. pytest 54 passed, ruff, mypy, `napalm-standard check`/`ratchet` green. Closes #2 Closes #3
christianmanivong added 2 commits 2026-11-01 20:57:14 +00:00
Each "Request timed out" line went into results with the timeout as its
RTT. NAPALM's results hold replies, and a sweep treats a non-empty
results list as a live host, so dead hosts showed up in LAN scans.

Closes #2
fix(snmp): report no community instead of inventing "public"
driver / standard (pull_request) Successful in 16s
driver / lint (pull_request) Successful in 13s
driver / types (pull_request) Successful in 56s
driver / test (3.12) (pull_request) Successful in 57s
driver / test (3.13) (pull_request) Successful in 51s
driver / lowest (pull_request) Successful in 25s
driver / build (pull_request) Successful in 26s
driver / security (pull_request) Successful in 1m2s
CI / driver (pull_request) Successful in 2m28s
driver / publish (pull_request) Skipped
34f00f9f3a
get_snmp_config started from community "public" and returned it with
running=True when no row of the community table parsed. Without a listed
community it now reports the agent as not running, as it already did for
"no community entry exists".

The issue's other two points were already fixed on main: the management
VLAN is matched exactly since c2f0f7c (_management_vlan, with the
caller's listen address), and the floor on napalm-device-types is 4.21.1
with no requirements.txt since 4e171bf.

Closes #3
christianmanivong added 1 commit 2026-11-01 21:20:38 +00:00
fix(snmp): read the community from the Name column
driver / standard (pull_request) Successful in 14s
driver / lint (pull_request) Successful in 12s
driver / types (pull_request) Successful in 59s
driver / test (3.12) (pull_request) Successful in 58s
driver / test (3.13) (pull_request) Successful in 50s
driver / lowest (pull_request) Successful in 24s
driver / build (pull_request) Successful in 26s
driver / security (pull_request) Successful in 1m2s
CI / driver (pull_request) Successful in 2m26s
driver / publish (pull_request) Skipped
8e7be0e47e
The switch's community table starts with an Index column, and
get_snmp_config took a row's first word, so it reported the community
as "1". The name now comes from the column headed Name, found in the
header line above the dashes; the tests read the recorded table.

Found while recording fixtures for #3.
christianmanivong merged commit 9ef8364ead into main 2026-11-01 22:00:26 +00:00
christianmanivong deleted branch fix/bugs-2026-11 2026-11-01 22:00:26 +00:00
Sign in to join this conversation.