Is this proof that systemd is completely broken?

Sam Varshavchik mrsam at courier-mta.com
Sat Jul 12 16:01:56 UTC 2014


Corinna Vinschen writes:

> On Jul 12 10:00, Sam Varshavchik wrote:
> > Now that I have your attention, the background is as follows. This is a
> > server with only statically configured network interfaces. NetworkManager  
> is
> > not installed. All network interfaces are statically configured via
> > /etc/sysconfig/network-scripts.
> >
> > The server is regularly updated to current Fedora packages. For the last
> > month, or so, the server has failed to come up in a sane state, reliably.
> > After it responds to pings, after ssh-ing in, and examining the aftermath,
> > the logs of all network services are consistent, in that they claim that
> > each network service – which includes: named-chroot, httpd, dhcpd, and
> > privoxy – their boot logs claim that no network interfaces were up at the
> > time they're started.
>
> This is probably not exactly what you're looking for, but I had the same
> or, at least, a similar problem.
>
> The network init script creates four interfaces.  All network services
> which listen on 0.0.0.0 or :: start up fine, even if they start too
> early.  Network services which are supposed to listen to explicit
> network addresses often fail to start, because the bind(2) calls fail.
>
> What I did was to screw a new target between network-online and the
> affected services, like this:
>
>   $ cat /etc/systemd/system/multi-user.target.wants/network-waiter.target
>   #  Wait for Network being online.
>   #  Let all network services depend on this one.
>
>   [Unit]
>   Description=Fake target to make sure network is online before starting  
> dependent services
>   After=network-online.target
>   Before=dovecot.service named.service postfix.service sshd.service
>
> This seems to help.  It sure would be nice if these service files
> would be corrected instead.

This is certainly a valid workaround for the bug.

But this wasn't my point. I am looking for validation, based on the data I  
posted, that systemd's dependency resolution is broken. Systemd's fancy  
dependency resolution is supposted to be its flagship feature. I installed a  
service that should execute before reaching network.target. Systemd should  
wait until my service finished executing, before reaching network.target,  
and then starting all the services that should be started after reaching  
network.target. Yet, the timestamps I collected from my log files appear to  
prove, fairly conclusively, that systemd is starting services after  
network.target before my service finishes executing.

Fail.

I'm perfectly open to the possibility that I am misinterpreting something.  
If so, please someone tell me what detail I missed; and how the data I  
posted actually makes sense.

I'll wait.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.fedoraproject.org/pipermail/users/attachments/20140712/9651c50b/attachment.sig>


More information about the users mailing list