Trigger file desciptor restart condition only in /bin/ dirs #3

Closed
opened 2024-06-19 17:57:40 +00:00 by hygienic-books · 0 comments

Resolution to issue #1 was a bit too aggressive on closer inpsection. With it we introduced behavior where any open file descriptor listed by an lsof command would trigger a system reboot. This would frequently include file descriptors for memory-backed anonymous files in /memfd and shared memory objects in /dev/shm which weren't our concern in #1. We care about binaries such as dockerd and zabbix_agent2 still running in old versions via open file descriptors.

Let's reduce the list of lsof results: As a good enough approximation we can begin caring only about file descriptors that point to a path that includes string /s?bin/ where s? is supposed to mean an optional character s. This will cover /usr/sbin/, /usr/local/bin/ etc. and should get us most of the way there for what the intent behind #1 was.

Resolution to issue #1 was a bit too aggressive on closer inpsection. With it we introduced behavior where any open file descriptor listed by an `lsof` command would trigger a system reboot. This would frequently include file descriptors for memory-backed anonymous files in `/memfd` and shared memory objects in `/dev/shm` which weren't our concern in #1. We care about binaries such as `dockerd` and `zabbix_agent2` still running in old versions via open file descriptors. Let's reduce the list of `lsof` results: As a good enough approximation we can begin caring only about file descriptors that point to a path that includes string `/s?bin/` where `s?` is supposed to mean an optional character `s`. This will cover `/usr/sbin/`, `/usr/local/bin/` etc. and should get us most of the way there for what the intent behind #1 was.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: quico-os-setup/arch-needs-restart#3
No description provided.