Skip to content

Finit v4.5

Compare
Choose a tag to compare
@github-actions github-actions released this 30 Oct 22:06
· 112 commits to master since this release

Changes

  • Refactor runparts and /etc/rc.local to no longer block the main loop, allowing initctl calls to interact with Finit. Issue #356
  • Refactor the run stanza to no longer block the main loop, issue #362
  • Allow sulogin with a user different from root, issue #357
  • Allow disabling invocation of rescue mode from kernel command line
  • Add initctl -f to force-skip asking Finit for existing services when creating new services during bootstrap, e.g. /etc/rc.local
  • initctl runlevel now returns N S instead of N 10 in bootstrap
  • initctl runlevel N during bootstrap is now allowed. It changes the next runlevel to go to when bootstrap has completed. Effectively overriding the runlevel N statement in /etc/finit.conf
  • Improved logging on failure to execvp() a run/task/service, now with errno, e.g., "No such file or directory" when the command is missing from $PATH
  • Add Bash completion support for initctl, configurable, issue #360
  • Handle absolute path to initctl [enable|disable], not supported
  • Update finit.conf(5) man page with the recommended directory hierarchy in /etc/finit.d/
  • The runparts code has been split into /libexec/finit/runparts
  • The runparts command now takes two options: sysv and progress. The former ensures only SNNfoo and KNNfoo scripts are run.
  • Add SysV Init Compatibility section to documentation
  • Increased MAX path for commands, and arguments: 64 -> 256
  • The bundled watchdog daemon no longer tries to log at startup, because syslog is not available yet, any startup message leak to console
  • Extend if: option with runtime evaluation of conditions. E.g., start a task only if:<run/foo/failure> (here the run task 'foo' failed)
  • Document new if:, conflict:, nowarn options for run/task/service first introduced in v4.4
  • Failure to open fstab should log to console, not just log to /dev/kmsg
  • Rename /lib/finit/system/*.conf, added numbered prefix to ensure proper execution order, e.g., udevd should always run first
  • Plugins and bundled services: dbus, keventd, watchdogd, and runparts, are now loaded after all services in /lib/finit/system/. A new runtime-only path (for inspection) in /run/finit/system/ is used
  • Redirect log* output to console when finit.debug is enabled
  • Assert <int/container> condition if we detect running in container
  • Add support for mdev's netlink daemon mode, issue #367
  • Add support for mdevd in 10-hotplug.conf, preferred over plain mdev
  • Disable modprobe plugin by default, udevd and mdev/mdevd loads modules
  • Update documentation for run/task shell limitations, issue #376
  • Update documentation regarding automount of /run and /tmp
  • Update plugin documentation, add section about limited tmpfiles.d(5) support
  • Skip registering service when if:!name matches a known service. This allows conditional loading of alternative services, e.g. if udevd is already loaded we do not need mdevd
  • Drop doc/bootstrap.md, inaccurate and confusing to users

Fixes

  • Fix #227: believed to have been fixed in v4.3, the root cause was actually that Finit was waiting for a process that was no longer in the system. The fix is to ask the kernel on process-stop-timeout and replay the lost PID so that Finit can continue with reboot/shutdown

  • Fix #358: fix inotify events for /etc/finit.conf, improved log messages and error handling

  • Fix #361: cgroup move fail if run/task/services start as non-root. Regression in the v4.4 release cycle while adding support for the pre:/post:/ready: scripts. Now the latter scripts also properly run in their correct cgroup

  • Fix #366: document fsck.* kernel command line options and simplify the configure flags --enable-fsckfix and --enable-fastboot to only adjust the default values for the fsck.* options.

  • Fix #371: swap load order of /lib/finit/system/* vs /etc/finit.d/*
    We must run 10-hotplug.conf first to ensure devices and modules are up and loaded before the user's run/task/services are called. The order at bootstrap is now saved in /run/finit/conf.order for inspection, /run/finit/exec.order shows the start order of each process

  • Fix #372: lost udevadm calls due to overloading

  • Adjust final udevadm settle timeout: 5 -> 30 sec

  • Fixed dbus plugin, the function that located <pidfile> ... in the dbus/system.conf caused spurious line breaks which led to the service not being loaded properly

  • The runparts executor now skips backup files (foo~)

  • The runparts stanza now properly appends start to scripts that start with S[0-9]+. This has been broken for a very long time.

  • Fix #377: expand service env:file variables, allow constructs like:

      RUNDIR=/var/run/somesvc
      DAEMON_ARGS=--workdir $RUNDIR --other-args...
    
  • Fix #378: warn on console if run/task times out during bootstrap

  • Fix #378: add run/task support for <!> to allow transition from bootstrap to multi-user runlevel even though task has not run yet.

  • Fix #382: do not clear <service/foo/STATE> conditions on reload.
    Introduced back in v4.3-rc2, 82cc10b, the support for automatic service conditions have had a weird and unintended behavior. Any change in state (see doc/svc-machine.png) caused Finit to clear out all previously acquired service conditions.

    However, when moving between RUNNING and PAUSED states, a service should not have its conditions cleared. The PAUSED state, seen also by all conditions moving to FLUX, is only temporary while an initctl reload is processed. If a service has no changes to be applied it will move back to RUNNING.

    Also, we cannot clear the service conditions because other run/task or services may depend on it and clearing them would cause Finit to SIGTERM these processes (since they are no longer eligible to run).