[systemd-devel] Question about generators and adding new units in the middle of a transaction

Kay Sievers kay.sievers at vrfy.org
Fri Nov 4 06:39:05 PDT 2011


On Fri, Nov 4, 2011 at 13:22, Manuel Amador <rudd-o at rudd-o.com> wrote:
> I am developing systemd support for ZFS:

> as you can see, I create the units early on bootup using a generator (a
> mechanism that is entirely undocumented, tsk).

It isn't documented, because it's use is not encouraged for most use
cases. The main focus is to be able to support compatibility wrappers
for sysv init scripts, fstab, cryptab, means: read a legacy file and
create a systemd unit from it. It is not a hotplug hook.

> Now, this will happen during udev settle.  What I want is to generate more
> units when pools are discovered and their file systems require to be mounted
> automatically.  That is, I need to re-run the generator and generate new
> units, and then tell systemd to daemon-reload.

The generator runs _before_ systemd starts, if you need to reload
systemd's config during bootup, generators are absolutely not what you
are looking for.

I did not look at the details, maybe you want an instantiated foo at .service?

I fear, that you are trying to force the systemd service engine into a
storage management daemon, which is not what we want. If instantiated
services don't help, a more general/higher level description of the
problem might be helpful for us to understand the problem.

Kay


More information about the systemd-devel mailing list