-
-
Notifications
You must be signed in to change notification settings - Fork 66
Description
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:
- Daemon configurations are updated/added, e.g.:
/etc/dnsmasq.conf
/etc/frr/frr.conf
- Notify Finit of the changes:
initctl touch dnsmasq
initctl touch frr
- 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 ofinitctl touch
. In the future, likely v5.0, theinitctl touch
command would use the same IPC to notify Finit of both daemon changes and reload.