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

Merged
christianmanivong merged 1 commits from docs/no-services-restart into main 2026-11-26 18:56:46 +00:00
2 changed files with 17 additions and 0 deletions

No files matched your search

+1
View File
@@ -72,6 +72,7 @@ device.close()
| `get_ntp_servers` / `get_ntp_peers` | ✅ | `system.ntp.server` in UCI, every server of the list; none while `system.ntp.enabled` is off -- the same list as `get_time_sync()` | | `get_ntp_servers` / `get_ntp_peers` | ✅ | `system.ntp.server` in UCI, every server of the list; none while `system.ntp.enabled` is off -- the same list as `get_time_sync()` |
| `get_time_sync()` | ✅ | napalm-device-types `TimeSyncMixin`: the servers as above, the zone from `zonename` where the rule in `timezone` is that zone's (else the one zone with that rule, or none); `synchronized` is not readable (None) | | `get_time_sync()` | ✅ | napalm-device-types `TimeSyncMixin`: the servers as above, the zone from `zonename` where the rule in `timezone` is that zone's (else the one zone with that rule, or none); `synchronized` is not readable (None) |
| `get_firmware_offer()` | ✅ | napalm-device-types `FirmwareOfferMixin`: the newest release of the device's own line on the attended sysupgrade server (see *Firmware upgrade*) | | `get_firmware_offer()` | ✅ | napalm-device-types `FirmwareOfferMixin`: the newest release of the device's own line on the attended sysupgrade server (see *Firmware upgrade*) |
| `get_services_need_restart()` | ❌ | deliberately not offered (NetOrk/netork#2750): an 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). napalm-device-types' `/proc` scan could then read clean exactly after an upgrade; without the method the caller shows the reading as not made. A reading of OpenWrt's own is #51 |
## Configuration management ## Configuration management
+16
View File
@@ -0,0 +1,16 @@
"""No ``get_services_need_restart`` on OpenWrt (NetOrk/netork#2750).
napalm-device-types' ``ServicesRestartMixin`` finds replaced code as deleted files in
``/proc/<pid>/maps``. On OpenWrt an upgrade leaves the old files in the read-only image,
and the kernel can name them by their ``/rom`` or ``/overlay/upper`` path (Linux
before 6.8 shows an overlay file's real path), so that scan could read clean right
after an upgrade. The driver does not offer it,
and the caller shows the reading as not made.
"""
from napalm_openwrt.openwrt import OpenWrtDriver
def test_it_is_not_offered():
assert not hasattr(OpenWrtDriver, "get_services_need_restart")
assert not hasattr(OpenWrtDriver, "_run_services_restart_command")