Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Services are always reloaded when dependencies are reloaded #415

Closed
troglobit opened this issue Oct 17, 2024 · 0 comments
Closed

Services are always reloaded when dependencies are reloaded #415

troglobit opened this issue Oct 17, 2024 · 0 comments
Assignees
Labels

Comments

@troglobit
Copy link
Owner

troglobit commented Oct 17, 2024

Background

Since 4d05bf9 all rdeps to a service are automatically marked as "dirty" if the service becomes dirty. This works well to handle the original case:

ospfd.conf:
    service [2345] <!pid/zebra> log ospfd -A 127.0.0.1 -u root -g root -- OSPF daemon

zebra.conf:
    service [2345] <!> log zebra -A 127.0.0.1 -u root -g root -- Zebra Routing daemon

If zebra.conf is changed, we stop both zebra and ospfd on initctl reload.

Issue

However, the following case causes restart of iitod when syslogd (from the sysklogd project) is marked dirty. syslogd handles reloading its .conf file on SIGHUP, and unlike the zebra case, all state is kept.

sysklogd.conf:
    service if:udevd nowarn env:-/etc/default/sysklogd <run/udevadm:5/success> \
            [S0123456789] syslogd -F $SYSLOGD_ARGS -- System log daemon

iitod.conf:
    service [S0123456789] <!pid/syslogd> iitod -- LED daemon

Since syslogd can handle itself properly, and the pid/syslogd condition is more of a system barrier (don't start before logging is up), it does not make sense to restart iitod or any service really that depends on syslogd.

This issue propose returning to the pre-2021 behavior where rdeps are paused (SIGSTOP'ed) while syslogd is reloaded and has reasserted its condition.

@troglobit troglobit added the bug label Oct 17, 2024
@troglobit troglobit self-assigned this Oct 17, 2024
troglobit added a commit to kernelkit/infix that referenced this issue Oct 17, 2024
This patch fixes a upstream issue troglobit/finit#415, greatly reducing
the amount of service restarts, needlessly affecting, e.g., iitod when
services like syslogd¹ is reloaded.

____
¹) Traditional UNIX services that properly support SIGHUP.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant