Frederic Crozat changed bug 904346
What Removed Added
Flags needinfo?(fcrozat@suse.com)  

Comment # 24 on bug 904346 from
(In reply to David Disseldorp from comment #23)
> (In reply to Robin Roevens from comment #22)
> > Created attachment 613362 [details]
> > systemd boot analysis after winbind.service change
> > 
> > I added 
> > Wants=network-online.target
> > to winbind.service and left 
> > After=syslog.target network-online.target nmb.service
> > as is.
> > 
> > Systemd analysis now shows winbind starting after network is up. And I could
> > now log-in with an AD account immediately.
> 
> Great, thanks for the feedback.
> 
> So it looks as though we need to add the "Wants=network-online.target"
> directive to the winbind service file.
> 
> @Frederich: is it invalid to configure a service with "After=X" directives,
> but without a corresponding "Requires/Wants=X"? This isn't clear from the
> systemd.unit man page documentation.

Wants are only needed if you want to be sure the service referenced will be
activated (if present). If you don't need it, After/Before are enough (they are
just ordering information, not "I need/want this service to run" information).

In your case, the service taking care of "switching on" network-online.target
(either wicked or NM) might not have been enabled, which would explain the
incorrect behavior. By adding "Wants", you ensure the service will be enabled.

-
> 
> The iscsi service script appears to match winbind, in specifying
> "After=network.target network-online.target..." without a corresponding
> "Wants=/Requires=" directive.


You are receiving this mail because: