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

Calling initctl reload does not always take #425

Open
troglobit opened this issue Feb 13, 2025 · 0 comments
Open

Calling initctl reload does not always take #425

troglobit opened this issue Feb 13, 2025 · 0 comments
Assignees
Labels
Milestone

Comments

@troglobit
Copy link
Owner

troglobit commented Feb 13, 2025

One major strength of Finit is its ability to roll out system-wide changes in the same runlevel. The basic idea for how that works is as follows:

  1. Daemon configurations are updated/added, e.g.:
    • /etc/dnsmasq.conf
    • /etc/frr/frr.conf
  2. Notify Finit of the changes:
    • initctl touch dnsmasq
    • initctl touch frr
  3. Changes are activated:
    • initctl reload

The touch commands modify the timestamp of the files in /etc/finit.d/enabled/*.conf. Finit does not rely on the timestamps but subscribes to inotify events for all its .conf files (same as .pid files) and registers changes to these files on its internal TODO list.

However, in systems that perform rapid configuration changes, e.g., the Infix network operating system, where the time between the last touch command and reload is very short, the reload event may be received by Finit before the kernel inotify event for the last touched files. This causes Finit to not restart (or SIGHUP) the affected services.

Background: other process monitors use mechanisms like D-Bus to serialize all events. Finit has this legacy system for > backwards compatibility, some users still use their OS' touch(1) command instead of initctl touch. In the future, likely v5.0, the initctl touch command would use the same IPC to notify Finit of both daemon changes and reload.

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