NetOrk/netork#2750 decided the BSD drivers carry no get_services_need_restart for now: napalm-device-types' ServicesRestartMixin reads needs-restarting, needrestart or /proc/<pid>/maps and names systemd units through /proc/<pid>/cgroup. FreeBSD and OpenBSD have none of these, so mixing it in would read nothing, or worse, read clean. Without the method netOrk shows the reading as not made.
A FreeBSD reading of its own could work like this (not verified on a host yet):
procstat -a -v as root lists every process's mappings. A vn mapping with execute permission whose path is empty points at a vnode that has no name any more, which after pkg upgrade is a replaced library or binary. Whether an empty path can also mean "name not in the name cache" on UFS and ZFS has to be checked on a real host before an empty path counts as replaced.
sysutils/checkrestart does this already, but it is a port, not base.
A process is not a service on FreeBSD: there is no cgroup. The rc.d service behind a PID would come from service <name> status ("is running as pid N") for the enabled services, as get_services already reads them. A process no service claims is a process.
OpenBSD has no such view (no procstat; procmap needs kern.allowkmem), so it stays without the reading.
Until a FreeBSD host's output is recorded (tests/fixtures/, as for every other parser here), it stays unbuilt: a reading that cannot tell an unnamed vnode from a replaced one must not answer "nothing to restart".
NetOrk/netork#2750 decided the BSD drivers carry no `get_services_need_restart` for now: napalm-device-types' `ServicesRestartMixin` reads `needs-restarting`, `needrestart` or `/proc/<pid>/maps` and names systemd units through `/proc/<pid>/cgroup`. FreeBSD and OpenBSD have none of these, so mixing it in would read nothing, or worse, read clean. Without the method netOrk shows the reading as not made.
A FreeBSD reading of its own could work like this (not verified on a host yet):
- `procstat -a -v` as root lists every process's mappings. A `vn` mapping with execute permission whose path is empty points at a vnode that has no name any more, which after `pkg upgrade` is a replaced library or binary. Whether an empty path can also mean "name not in the name cache" on UFS and ZFS has to be checked on a real host before an empty path counts as replaced.
- `sysutils/checkrestart` does this already, but it is a port, not base.
- A process is not a service on FreeBSD: there is no cgroup. The rc.d service behind a PID would come from `service <name> status` ("is running as pid N") for the enabled services, as `get_services` already reads them. A process no service claims is a process.
- OpenBSD has no such view (no procstat; `procmap` needs `kern.allowkmem`), so it stays without the reading.
Until a FreeBSD host's output is recorded (`tests/fixtures/`, as for every other parser here), it stays unbuilt: a reading that cannot tell an unnamed vnode from a replaced one must not answer "nothing to restart".
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
NetOrk/netork#2750 decided the BSD drivers carry no
get_services_need_restartfor now: napalm-device-types'ServicesRestartMixinreadsneeds-restarting,needrestartor/proc/<pid>/mapsand names systemd units through/proc/<pid>/cgroup. FreeBSD and OpenBSD have none of these, so mixing it in would read nothing, or worse, read clean. Without the method netOrk shows the reading as not made.A FreeBSD reading of its own could work like this (not verified on a host yet):
procstat -a -vas root lists every process's mappings. Avnmapping with execute permission whose path is empty points at a vnode that has no name any more, which afterpkg upgradeis a replaced library or binary. Whether an empty path can also mean "name not in the name cache" on UFS and ZFS has to be checked on a real host before an empty path counts as replaced.sysutils/checkrestartdoes this already, but it is a port, not base.service <name> status("is running as pid N") for the enabled services, asget_servicesalready reads them. A process no service claims is a process.procmapneedskern.allowkmem), so it stays without the reading.Until a FreeBSD host's output is recorded (
tests/fixtures/, as for every other parser here), it stays unbuilt: a reading that cannot tell an unnamed vnode from a replaced one must not answer "nothing to restart".