feat(log-sources): which logs the host writes, through LogSourcesMixin #72

Merged
christianmanivong merged 2 commits from feature/log-sources-2049 into main 2026-11-04 23:53:40 +00:00
Owner

Summary

LinuxDriver mixes in napalm-device-types' LogSourcesMixin (4.30.0, NAPALM/napalm-device-types feature/log-sources-2049) and carries its command. OpenMediaVault and QNAP inherit it.

Changes

  • _run_log_sources_command: as root through _run_privileged where it can, else unprivileged through _send, as for listening sockets.
  • Requires napalm-device-types>=4.30.0.

Related Issue

Refs NetOrk/netork#2049

Testing

  • TestGetLogSources in tests/test_linux.py: the shared command, sudo -n, and the fallback when sudo refuses.
  • Full suite green (366 tests).
  • Not checked live on QNAP: QTS without GNU find raises LogSourcesUnavailable, and netOrk then keeps no reading.

Merge after NAPALM/napalm-device-types#94.

## Summary `LinuxDriver` mixes in napalm-device-types' `LogSourcesMixin` (4.30.0, NAPALM/napalm-device-types `feature/log-sources-2049`) and carries its command. OpenMediaVault and QNAP inherit it. ## Changes - `_run_log_sources_command`: as root through `_run_privileged` where it can, else unprivileged through `_send`, as for listening sockets. - Requires `napalm-device-types>=4.30.0`. ## Related Issue Refs NetOrk/netork#2049 ## Testing - `TestGetLogSources` in `tests/test_linux.py`: the shared command, `sudo -n`, and the fallback when sudo refuses. - Full suite green (366 tests). - Not checked live on QNAP: QTS without GNU `find` raises `LogSourcesUnavailable`, and netOrk then keeps no reading. Merge after NAPALM/napalm-device-types#94.
christianmanivong added 1 commit 2026-11-04 23:26:04 +00:00
feat(log-sources): which logs the host writes, through LogSourcesMixin
driver / standard (pull_request) Failing after 18s
driver / lint (pull_request) Successful in 16s
driver / test (3.12) (pull_request) Failing after 46s
driver / types (pull_request) Failing after 1m3s
driver / test (3.13) (pull_request) Failing after 40s
driver / lowest (pull_request) Failing after 23s
driver / build (pull_request) Successful in 32s
driver / security (pull_request) Failing after 1m1s
CI / driver (pull_request) Failing after 2m22s
driver / publish (pull_request) Skipped
2b153cd61c
The driver mixes in napalm-device-types' LogSourcesMixin (4.30.0) and
carries its command: as root through sudo where it can, else what the
login user may see. OpenMediaVault and QNAP inherit it.

Refs NetOrk/netork#2049
christianmanivong added 1 commit 2026-11-04 23:35:20 +00:00
refactor: the root reads' transports in a module of their own
driver / lint (pull_request) Successful in 13s
driver / standard (pull_request) Successful in 14s
driver / types (pull_request) Successful in 1m0s
driver / test (3.13) (pull_request) Successful in 58s
driver / test (3.12) (pull_request) Successful in 1m4s
driver / lowest (pull_request) Successful in 28s
driver / build (pull_request) Successful in 27s
driver / security (pull_request) Successful in 1m4s
CI / driver (pull_request) Successful in 2m16s
driver / publish (pull_request) Skipped
c532a66260
linux.py is over the file size limit and may not grow (quality ratchet).
Listening sockets and log sources share one transport -- through sudo where
the driver can, else as the login user -- so both move to _readings.py as
LinuxProcessReadingsMixin; linux.py shrinks from 2048 to 2039 lines.

Refs NetOrk/netork#2049
christianmanivong merged commit ea82d43bd4 into main 2026-11-04 23:53:40 +00:00
christianmanivong deleted branch feature/log-sources-2049 2026-11-04 23:53:40 +00:00
Sign in to join this conversation.