Univention Bugzilla – Bug 42380
Switch to systemd - breaks UCS-4.2 update due to startup dependency loop in network stack
Last modified: 2017-09-26 10:47:15 CEST
Debian-Jessie uses systemd by default.
This breaks the update to 4.2 during reboot, as there is a circular dependency in the network stack: During startup all /etc/network/if-up.d/ scripts are run, which themselves call back to (re-)start other init scripts while systemd is still trying to get networking.service started:
298 /bin/bash -e /etc/init.d/networking start
393 \_ ifup -a
510 \_ /bin/sh -c run-parts --exit-on-error /etc/network/if-up.d
511 \_ run-parts --exit-on-error /etc/network/if-up.d
518 \_ /bin/sh /etc/network/ip-up.d/05_rdate
519 \_ /bin/sh /usr/sbin/invoke-rc.d rdate start
537 \_ systemctl start rdate.service
546 \_ /bin/sh /etc/network/ip-up.d/30_univention-directory-policy
519 \_ /bin/sh /usr/sbin/invoke-rc.d univention-directory-policy start
537 \_ systemctl start univention-directory-policy.service
With systemd it is its jobs to restart services as interfaces come and go. As such those scripts should be removed from if-up.d/ *iff* we go the systemd way. That would probably breaks systems, where systemd is *not* used.
On the positive side removing those scripts would solve the problem, that the services are currently restarted for each interface, which is a pain if many interfaces/bridges/bonds/vlans are used; see Bug #32481 and Bug #39334
Another option would be to disable those scripts if systemd is used, which I have done for now:
> [ -d /run/systemd/system ] && exit 0
Another (probably) problematic case is saml/univention-saml/debian/univention-saml.init, which directly invokes the init scripts of "memcahced" and "stunnel4", which would be another loop.
There may be other cases where init scripts call other init scripts; I have declared them as LSB-dependencies, but they should be checked again carefully.
+++ This bug was initially created as a clone of Bug #38438 +++
(In reply to Philipp Hahn from comment #0)
> Another option would be to disable those scripts if systemd is used, which I
> have done for now:
> > [ -d /run/systemd/system ] && exit 0
r72562 | Bug #42380 net: Disable (re-)starting services when systemd is used.
Work-around for now; revert as needed
r75516 | Bug #42380 runit: clamp Max-delay to 5s
r75517 | Bug #42380 bind: Depend on fixed runit
Bug 42389 dropped the 070_bind9_restart.patch for bind9 (Bug 29659), this should be covered.
Regarding Comment 3, maybe this has been dealt with in bind9 itself. Quoting the changelog:
bind9 (1:9.9.5.dfsg-8) unstable; urgency=medium
* Launch rndc command in the background in networking scripts to avoid a
hang in named from bringing down the entire network (closes: #760555).
-- Michael Gilbert <firstname.lastname@example.org> Thu, 01 Jan 2015 17:51:52 +0000
r77173 | Bug #42380: systemd networking
(In reply to Philipp Hahn from comment #1)
> r72562 | Bug #42380 net: Disable (re-)starting services when systemd is used.
(In reply to Philipp Hahn from comment #2)
> r75516 | Bug #42380 runit: clamp Max-delay to 5s
> r75517 | Bug #42380 bind: Depend on fixed runit
(In reply to Philipp Hahn from comment #5)
> r77173 | Bug #42380: systemd networking
UCS 4.2 has been released:
If this error occurs again, please use "Clone This Bug".