feat(services-restart): which services on the node still run replaced code, as root (NetOrk/netork#2750)
Both drivers mix in napalm-device-types' ServicesRestartMixin. The command goes over the exec path, root's login as a rule, behind an id -u guard: a login other than root would see only its own processes and read as clean, so it prints nothing and the read raises. A running VM's QEMU is listed as a process; an LXC container's processes are left out by the parse, since a container updates itself. No stdin.
This commit is contained in:
1 parent
c2d9d7e75e
commit
b792f6d210
7 files changed
+106
-7
No files matched your search
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
- `get_services_need_restart()` on both drivers (napalm-device-types' `ServicesRestartMixin`,
|
||||
NetOrk/netork#2750): the services that still run code an update replaced on disk, so they
|
||||
keep the old library until they restart. One fixed, read-only command over the exec path,
|
||||
which is root's login: `needs-restarting -s`, else `needrestart` in list-only mode, else the
|
||||
processes whose `/proc/<pid>/maps` maps deleted code, each named by its cgroup's service. A
|
||||
running VM's QEMU (`qemu.slice`) is listed as a process; an LXC container's processes are
|
||||
left out, since a container updates itself. It runs only when the login is root
|
||||
(`id -u` is 0): another login gets no report and the read raises, rather than read as
|
||||
clean what it cannot see. No stdin.
|
||||
|
||||
## [0.13.0] - 2026-11-26
|
||||
|
||||
### Added
|
||||
|
||||
Reference in new issue
Block a user