[systemd-devel] Delaying device service creation
Lennart Poettering
lennart at poettering.net
Fri Jul 3 09:27:03 PDT 2015
On Fri, 03.07.15 14:25, Francis Moreau (francis.moro at gmail.com) wrote:
> >> But in the case of cryptsetup with 'tmp' option, the device can have a
> >> disk label initially, since it's reformatted at each boot.
> >
> > hmm, usually "tmp" is combined with a /dev/urandom key, and hence is
> > effectively empty initially...
> >
> > This might be broken if you indeed use a fixed key each time, so that
> > the old disk label is still visible initially.
> >
> >> Systemd can't do little with the HW event but it can choose the moment
> >> when the device unit is created or is marked with an 'active' state and
> >> also choose when all the device deps are started.
> >
> > well, but it doesn't work that way... we do not delay device
> > state changes until all the deps are fulfilled, and I am not convinced
> > we should. It's the general logic we follow: ordering deps control
> > only the state changes systemd itself triggers, but do not affect
> > systemd's view of external events. They only affect the order in which
> > we process the job queue, but they are irrelevant for the actual
> > states of the units.
>
> Ok. Maybe an error or a warning for services that have ordering
> dependencies on device such as Before=<device> would be useful.
Indeed, I think we should indeed warn in this case. Added to the TODO
list now.
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list