Release of s6-rc 0.5.3.0 service manager and s6-linux-init 1.0.7 init system

A significant release of the s6-rc 0.5.3.0 service manager has been prepared, designed to control the launch of initialization scripts and services, taking into account dependencies. The s6-rc toolkit can be used both in initialization systems and for organizing the launch of arbitrary services in conjunction with events that reflect a change in the state of the system. Full dependency tree tracking is provided and services are automatically started or terminated to reach a specified state. The code is written in C language and distributed under the ISC license.

The s6-rc service manager, which can be thought of as an analogue of sysv-rc or OpenRC, includes a set of utilities for starting and stopping long-running processes (daemons) or immediately terminated init scripts. In the course of work, dependencies between components are taken into account, parallel launch of scripts and services that do not intersect with each other is ensured, and the sequence of script execution that repeats at different launches is guaranteed. All state changes are processed taking into account dependencies, making sure that dependencies are not violated (for example, when a service is started, the dependencies necessary for its operation will be automatically launched, and when it stops, dependent services will also be stopped).

Instead of runlevels, s6-rc offers a more universal concept of bundles, which allows you to group services according to arbitrary criteria and tasks to be solved. To increase efficiency, a compiled dependency database is used, which is created by the s6-rc-compile utility based on the contents of directories with files for starting/stopping services. The s6-rc-db and s6-rc-update utilities are offered for parsing and manipulating the database. The system supports sysv-init compatible init scripts and can import dependency information from sysv-rc or OpenRC.

Of the advantages of s6-rc is a compact implementation that does not contain anything extra, except for components for solving direct problems, and consumes a minimum of resources. Unlike other service managers, s6-rc supports proactive (offline) dependency graphing for an existing set of services, which allows you to perform resource-intensive dependency analysis separately, and not at boot time or state change. At the same time, the system is not monolithic and is divided into a series of separate and replaceable modules, each of which, in accordance with the Unix philosophy, solves only a specific task.

In combination with the s6 utilities that monitor the operation of processes (analogous to daemontools and runit), the toolkit allows you to simultaneously monitor the operation of long-running services, for example, by restarting them in case of abnormal terminations, and ensure that a sequence of commands is launched in a reproducible form that is repeated at different launches. Supported, among other things, are features such as activating a service when accessing a socket (launching a handler when accessing a network port), logging process events (replacing syslogd) and controlled granting of additional privileges (similar to sudo).

At the same time, the release of the s6-linux-init 1.0.7.0 package is available, which offers an implementation of the init process for building ready-made initialization systems for operating systems based on the Linux kernel, in which the s6 and s6-rc utilities are used to manage services and initialization scripts. At the same time, s6 and s6-rc are not tied to s6-linux-init and, if desired, can be used with any initialization systems.

In addition, the project provides:

  • s6-networking is a set of utilities for creating network services, similar to ucspi.
  • s6-frontend - A wrapper to recreate daemontools and runit functionality on top of s6.
  • s6-portable-utils is a set of generic Unix utilities such as cut, chmod, ls, sort, and grep optimized for minimal resource consumption and released under an ISC license.
  • s6-linux-utils is a set of Linux-specific utilities such as chroot, freeramdisk, logwatch, mount, and swapon.
  • s6-dns is a set of client libraries and utilities that replace typical DNS utilities from BIND and djbdns.

In the new version of s6-rc, the s6-rc-compile utility now reads data about dependencies and service sets from directories instead of files. The use of directories makes it easier to add services to the database with information about dependencies when installing programs through the package manager, as it allows you to avoid making changes to files. Support for the old file-based format has been retained for compatibility. In the new version of s6-linux-init, the "-S" option has been added to the s6-linux-init-maker utility to synchronize data in containers.

Source: opennet.ru

Add a comment