feat(services-restart): the services that still run replaced code (NetOrk/netork#2700)
ServicesRestartMixin.get_services_need_restart reads, as root and in one fixed read-only command, which systemd services still run code an update replaced on disk: needs-restarting -s on the dnf family, else needrestart in batch list-only mode (-r l and NEEDRESTART_MODE=l, whatever its config says), else the processes whose /proc/<pid>/maps maps deleted code, each named by its cgroup's service as the listening sockets are. A refused root raises instead of reading clean.
This commit is contained in:
1 parent
818016b717
commit
9c889f3715
7 files changed
+558
No files matched your search
@@ -156,6 +156,7 @@ the driver.
|
||||
| `package_managers` | rpm, dnf and yum history, apk's and opkg's databases, `/proc/<pid>/comm` |
|
||||
| `kernel` | `/proc`, `/lib/modules`, gzip, base64 |
|
||||
| `listening` | `ss`, `netstat`, `/proc/<pid>/cgroup` |
|
||||
| `services_restart` | `needs-restarting`, `needrestart`, `/proc/<pid>/maps` and `cgroup` |
|
||||
| `systemd` | `systemctl` |
|
||||
| `virtual_ips` | vip-manager, keepalived, awk |
|
||||
| `system_identity` | SMBIOS via sysfs and `dmidecode` |
|
||||
|
||||
Reference in new issue
Block a user