Re: Holidays Brainstorming: instanced supervision

From: Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups_at_NTLWorld.com>
Date: Tue, 19 Jan 2016 07:27:37 +0000

Olivier Brunel:

> With instanced services, it means when you enable such a service you
> add/specify an instance name. So e.g. the servicedir is "getty_at_" but
> you enable "getty_at_tty2" -- which just means the servicedir getty@ is
> copied under a different name in the scandir.
>
> The intent being that to enable another getty, you just enable
> getty_at_tty3 and that's it. [...]
>

nosh has much the same. Look at the nosh-bundles package and you'll
find a set of ttylogin_at_ttyv* service bundles, for starters. There are
plenty of others, from mdmfs_at_-tmp to populate_at_var, with a whole bunch of
kmod_at_* service bundles along the way.

The convert-systemd-units tool can convert templatized systemd units.

The configuration import subsystem instantiates multiple instances of a
generic service for per-user dbus daemons, Warden jails, webcamd
services, rfcomm_pppd services, static_arp, static_ndp, pefs, geli,
geom, fsck, ZFS mounts, and so forth. If you want to know where the
idea of instances of a generic can be used, look in the nosh-bundles
package.

There's no instantiation mechanism in the service bundles themselves.
Everything is pre-instantiated at conversion/creation time. That's when
all of the template parameter substitution happens, not at runtime.

This is not to say that it's impossible to share service/ directories
amongst service bundles. It's quite possible, and part of the design.
It's just not used for instantiation; because in that case the service/
directories differ in their run/start/stop/restart programs, because of
the instance names.
Received on Tue Jan 19 2016 - 07:27:37 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC