get_lldp_neighbors (napalm_linux/linux.py ~770-782 on origin/main):
The "is lldpd running" check is a substring test:
if"active"notinrunning:return{}
systemctl is-active lldpd prints inactive (or failed, activating) for a stopped daemon, and "active" in "inactive" is true, so a stopped lldpd passes the check and lldpctl is queried anyway.
With lldpd running, an lldpctl that cannot reach its socket (permissions of a non-root login, a restarting daemon) prints an error to stderr, which is discarded, and the getter returns {} — the same answer as "no neighbours", against the driver standard ("a failed read raises").
Expected
The running check compares the whole state (running == "active", or the echo active fallbacks) — a stopped or missing lldpd still answers {} as today.
With lldpd running, the read uses napalm-device-types' LLDPCTL_KEYVALUE_COMMAND (exit status marker, device-types 4.24.0) and raises when lldpctl fails; {} only when it ran and listed no neighbour.
netOrk wraps get_lldp_neighbors() in except Exception with a warning (netork/jobs/tasks/poll/_collect.py:108), so a raise only makes the failure visible in the poll log; what is stored does not change.
Test-first: systemctl is-active answering inactive returns {} without sending lldpctl; lldpctl status 1 raises.
Priority: P4 — a silently empty topology on a Linux host whose LLDP read fails.
Found during the bug sweep of 2026-11-02 (#58 review).
## What happens
`get_lldp_neighbors` (`napalm_linux/linux.py` ~770-782 on origin/main):
1. The "is lldpd running" check is a substring test:
```python
if "active" not in running:
return {}
```
`systemctl is-active lldpd` prints `inactive` (or `failed`, `activating`) for a stopped daemon, and `"active" in "inactive"` is true, so a stopped lldpd passes the check and lldpctl is queried anyway.
2. The read itself swallows every failure:
```python
output = self._send("lldpctl -f keyvalue 2>/dev/null || true")
```
With lldpd running, an lldpctl that cannot reach its socket (permissions of a non-root login, a restarting daemon) prints an error to stderr, which is discarded, and the getter returns `{}` — the same answer as "no neighbours", against the driver standard ("a failed read raises").
## Expected
- The running check compares the whole state (`running == "active"`, or the `echo active` fallbacks) — a stopped or missing lldpd still answers `{}` as today.
- With lldpd running, the read uses napalm-device-types' `LLDPCTL_KEYVALUE_COMMAND` (exit status marker, device-types 4.24.0) and raises when lldpctl fails; `{}` only when it ran and listed no neighbour.
netOrk wraps `get_lldp_neighbors()` in `except Exception` with a warning (`netork/jobs/tasks/poll/_collect.py:108`), so a raise only makes the failure visible in the poll log; what is stored does not change.
Test-first: `systemctl is-active` answering `inactive` returns `{}` without sending lldpctl; lldpctl status 1 raises.
Priority: P4 — a silently empty topology on a Linux host whose LLDP read fails.
Found during the bug sweep of 2026-11-02 (#58 review).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What happens
get_lldp_neighbors(napalm_linux/linux.py~770-782 on origin/main):systemctl is-active lldpdprintsinactive(orfailed,activating) for a stopped daemon, and"active" in "inactive"is true, so a stopped lldpd passes the check and lldpctl is queried anyway.{}— the same answer as "no neighbours", against the driver standard ("a failed read raises").Expected
running == "active", or theecho activefallbacks) — a stopped or missing lldpd still answers{}as today.LLDPCTL_KEYVALUE_COMMAND(exit status marker, device-types 4.24.0) and raises when lldpctl fails;{}only when it ran and listed no neighbour.netOrk wraps
get_lldp_neighbors()inexcept Exceptionwith a warning (netork/jobs/tasks/poll/_collect.py:108), so a raise only makes the failure visible in the poll log; what is stored does not change.Test-first:
systemctl is-activeansweringinactivereturns{}without sending lldpctl; lldpctl status 1 raises.Priority: P4 — a silently empty topology on a Linux host whose LLDP read fails.
Found during the bug sweep of 2026-11-02 (#58 review).