[systemd-devel] Support for staged startup

Hoyer, Marko (ADITG/SW2) mhoyer at de.adit-jv.com
Thu Jan 29 22:06:06 PST 2015


Hi Alison,

> -----Original Message-----
> From: Alison Chaiken [mailto:alison at she-devel.com]
> Sent: Thursday, January 29, 2015 8:17 PM
> To: systemd-devel at lists.freedesktop.org
> Cc: Hoyer, Marko (ADITG/SW2)
> Subject: Re: Support for staged startup
> 
> Marko Hoyer asks:
> > I'd like to realize a staged startup with systemd which is mainly
> about:
> > - starting up a static tree up to a final service
> > - the only job of the final service is to kick off the start of an
> > additional sub tree of units This kind of startup could be realized
> > simply by adding an additional one shot service which executes:
> > systemctl start xxx.target
> 
> Marko, one target can already be specified as "After" another.   If
> B.target is present in one of the appropriate directories and specifies
> 
> After=A.target
> 
> and all the services of the final sub-tree are symlinked in a
> B.target.wants directory, doesn't the behavior you need result?   What
> is  missing?    Of course, some of the units linked in B.target.wants
> may already be started by the time A.target completes if they are part
> of a earlier target or if they are needed by an earlier unit.   To
> suppress that behavior, you'd have to edit the individual units.
> 
> I don't know of any use case for one unit to start another directly.
> Is there one?

1.) Coming up with a small tree first reduces the loading time of the unit set (not so much important in my case)

2.) If you wanna create some dynamics between target A and target B so that depending on the startup situation services are already started before A or in another round they are delayed until A is done, you probably need to disconnect them from the static startup tree and pull them in dynamically at the desired time.

> 
> -- Alison
> 
> --
> Alison Chaiken                           alison at she-devel.com
> 650-279-5600
> http://{she-devel.com,exerciseforthereader.org}
> Never underestimate the cleverness of advertisers, or mischief makers,
> or criminals.  -- Don Norman

Best regards

Marko Hoyer
Software Group II (ADITG/SW2)

Tel. +49 5121 49 6948



More information about the systemd-devel mailing list