[systemd-devel] Special targets - should they Want or be WantedBy?

Mike Kazantsev mk.fraggod at gmail.com
Wed Mar 23 12:08:02 PDT 2011


On Wed, 23 Mar 2011 19:57:23 +0300
Andrey Borzenkov <arvidjaar at gmail.com> wrote:

> On Wed, Mar 23, 2011 at 7:44 PM, Mike Kazantsev <mk.fraggod at gmail.com> wrote:
> > On Wed, 23 Mar 2011 15:35:35 +0300
> > Andrey Borzenkov <arvidjaar at mail.ru> wrote:
> >
> >>
> >> OK, but how they are broken now? If you start network.target by some
> >> external means (IIRC it was not started by default) it will continue
> >> to work as before - nothing is changed.
> >>
> >> I really miss something obvious here.
> >>

Guess it's just me being confused, proposed changes shouldn't really
break stuff by themselves indeed.


> >
> > You want ipsec started and postgresql and remote-fs started after it's
> > up along with the network.
> >
> > Note the difference.
> >
> > Before:
> >  started: network.target.wants/wicd.service
> >  started: network.target.wants/ipsec.service
> >  started: network.target
> 
> What pulled in network.target?
> 
> >  started: remote-fs.target (Requires=network.target)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^

> >  started: multi-user.target.wants/postgresql.service (only After=network.service)

network.target here, of course.

                                                                     
> >
> > After:
> >  NOT started (fail!): network.target.wants/wicd.service
> >  NOT started (fail!): network.target.wants/ipsec.service
> >  NOT started (fail!): network.target
> >  started w/o net/ipsec (fail!): remote-fs.target (no Requires=network.target now!)

Guess that won't change, even though new mechainism seem to imply that
only stuff reside in .wants here should pull in network.target now, but
that Requires= line isn't part of the proposed changes.


> >  started w/o net/ipsec (fail!): multi-user.target.wants/postgresql.service
> >
> > So, if you won't update ipsec.service to pull in network.target and
> > push it to multi-user.target (by disable/enable or rm/ln) you have a
> > broken setup wrt network.
> > Note that the last step modifies /etc and shouldn't be easy to do
> > automagically in packages, so maybe a warning will be better there.

On a separate note: remote-fs.target doesn't have any WantedBy= or
RequiredBy= lines in "systemctl show" (even w/o and network mounts in
fstab) and Requires=network.target, so network.target seem to be always
activated, but that's probably unrelated issue.


-- 
Mike Kazantsev // fraggod.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20110324/fedc4d64/attachment.pgp>


More information about the systemd-devel mailing list