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
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
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.
This commit is contained in:
1 parent
f186bcd10e
commit
a9abfd535c
2 files changed
+17
No files matched your search
@@ -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_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_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
|
||||
|
||||
|
||||
@@ -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")
|
||||
Reference in new issue
Block a user