docs: no services restart reading on OpenWrt, and a test that keeps it so (NetOrk/netork#2750) #52

Open
christianmanivong wants to merge 1 commits from docs/no-services-restart into main
pull from: docs/no-services-restart
Owner

NetOrk/netork#2750 asked whether the OpenWrt driver should carry napalm-device-types' new ServicesRestartMixin (get_services_need_restart, NAPALM/napalm-device-types#132). Not as it is: the command would run (busybox, /proc, procd cgroups), but its clean answer would not hold. A package upgrade writes the new files to the overlay while the old ones stay in the read-only image, and /proc/<pid>/maps can name those by their /rom or /overlay/upper path rather than as deleted (Linux before 6.8 shows an overlay file's real path; OpenWrt 23.05 runs 5.15, 24.10 runs 6.6). The scan's DELETED_CODE_PATTERN matches neither, so it could read clean exactly after an upgrade. Without the method netOrk shows the reading as not made.

  • README: a row in the getter table.
  • tests/unit/test_services_restart.py: the driver offers neither get_services_need_restart nor its transport. The whole suite: 402 passed locally.
  • A reading of OpenWrt's own (mappings under /rom whose overlay copy exists, (deleted) under /overlay/upper) is #51, unbuilt until output from a 23.05 and a 24.10 device is recorded.

No code change, so no version bump and no dependency change; netOrk does not repin for it.

NetOrk/netork#2750 asked whether the OpenWrt driver should carry napalm-device-types' new `ServicesRestartMixin` (`get_services_need_restart`, NAPALM/napalm-device-types#132). Not as it is: the command would run (busybox, `/proc`, procd cgroups), but its clean answer would not hold. A package upgrade writes the new files to the overlay while the old ones stay in the read-only image, and `/proc/<pid>/maps` can name those by their `/rom` or `/overlay/upper` path rather than as deleted (Linux before 6.8 shows an overlay file's real path; OpenWrt 23.05 runs 5.15, 24.10 runs 6.6). The scan's `DELETED_CODE_PATTERN` matches neither, so it could read clean exactly after an upgrade. Without the method netOrk shows the reading as not made. - README: a row in the getter table. - `tests/unit/test_services_restart.py`: the driver offers neither `get_services_need_restart` nor its transport. The whole suite: 402 passed locally. - A reading of OpenWrt's own (mappings under `/rom` whose overlay copy exists, `(deleted)` under `/overlay/upper`) is #51, unbuilt until output from a 23.05 and a 24.10 device is recorded. No code change, so no version bump and no dependency change; netOrk does not repin for it.
christianmanivong added 1 commit 2026-11-26 18:03:10 +00:00
docs: no services restart reading on OpenWrt, and a test that keeps it so (NetOrk/netork#2750)
driver / standard (pull_request) Successful in 20s
driver / lint (pull_request) Successful in 19s
driver / types (pull_request) Successful in 1m5s
driver / test (3.13) (pull_request) Successful in 59s
driver / test (3.12) (pull_request) Successful in 1m16s
driver / lowest (pull_request) Successful in 29s
driver / build (pull_request) Successful in 32s
driver / security (pull_request) Successful in 1m7s
CI / driver (pull_request) Successful in 2m50s
driver / publish (pull_request) Skipped
a9abfd535c
An upgrade leaves the old files in the read-only image, and the kernel can
name them by their /rom or /overlay/upper path rather than as deleted, so
napalm-device-types' /proc scan could read clean right after an upgrade.
Without the method the caller shows the reading as not made. A reading of
OpenWrt's own is #51.
All checks were successful
driver / standard (pull_request) Successful in 20s
driver / lint (pull_request) Successful in 19s
driver / types (pull_request) Successful in 1m5s
driver / test (3.13) (pull_request) Successful in 59s
driver / test (3.12) (pull_request) Successful in 1m16s
driver / lowest (pull_request) Successful in 29s
driver / build (pull_request) Successful in 32s
driver / security (pull_request) Successful in 1m7s
CI / driver (pull_request) Successful in 2m50s
driver / publish (pull_request) Skipped
You are not authorized to merge this pull request.
This pull request can be merged automatically.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin docs/no-services-restart:docs/no-services-restart
git checkout docs/no-services-restart
Sign in to join this conversation.