Skip to content

Calling initctl reload does not always take #425

@troglobit

Description

@troglobit

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.

Sub-issues

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions