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:
Christian Manivong committed 2026-11-26 18:55:13 +01:00
1 parent c2d9d7e75e
commit b792f6d210
7 files changed
+106 -7

No files matched your search

+2
View File
@@ -27,6 +27,7 @@ from napalm_device_types import (
OpenSshServerMixin,
PortSpec,
ServicePackagesMixin,
ServicesRestartMixin,
StorageDriver,
SystemdServicesMixin,
SystemIdentityMixin,
@@ -65,6 +66,7 @@ class ProxmoxBackupDriver(
ServicePackagesMixin,
ListeningSocketsMixin,
LogSourcesMixin,
ServicesRestartMixin,
SystemIdentityMixin,
SystemdServicesMixin,
ProxmoxScheduledJobsMixin,