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
@@ -38,6 +38,7 @@ from napalm_device_types import (
|
||||
OpenSshServerMixin,
|
||||
PortSpec,
|
||||
ServicePackagesMixin,
|
||||
ServicesRestartMixin,
|
||||
SnmpAgentMixin,
|
||||
SystemdServicesMixin,
|
||||
SystemIdentityMixin,
|
||||
@@ -98,6 +99,7 @@ class ProxmoxDriver(
|
||||
ServicePackagesMixin,
|
||||
ListeningSocketsMixin,
|
||||
LogSourcesMixin,
|
||||
ServicesRestartMixin,
|
||||
SystemIdentityMixin,
|
||||
SystemdServicesMixin,
|
||||
ProxmoxScheduledJobsMixin,
|
||||
|
||||
Reference in new issue
Block a user