Univention Bugzilla – Bug 45861
UCS 4.3: runsvdir can't be started
Last modified: 2018-03-14 14:38:04 CET
runsv isn't started after upgrading from UCS 4.2 to a preview of UCS 4.3. Thus, some basic services are not available: Dez 12 16:01:13 master421 univention-runit[399]: Starting Univention process supervision: univention-runitstart-stop-daemon: unable to stat /usr/sbin/runsvdir-start (No such file or directory) Dez 12 16:01:13 master421 univention-runit[399]: failed! Dez 12 16:01:13 master421 systemd[1]: univention-runit.service: Control process exited, code=exited status=2 Dez 12 16:01:13 master421 systemd[1]: Failed to start LSB: Univention process supervision. Dez 12 16:01:13 master421 systemd[1]: univention-runit.service: Unit entered failed state. Dez 12 16:01:13 master421 systemd[1]: univention-runit.service: Failed with result 'exit-code'.
From /usr/share/doc/runit/NEWS.Debian.gz ''' runit (2.1.2-4) unstable; urgency=medium Runit no longer provides /sbin/runsvdir-start symbolic link to /etc/runit/2. Everything this package provides now directly refers to /etc/runit/2, including systemd's service file, but scripts and configuration outside may be need updated. '''
*** Bug 45862 has been marked as a duplicate of this bug. ***
so after base/univention-runit/debian/univention-runit.init base/univention-runit/debian/univention-runit.postinst runit seem to start, but on my system (update from 4.2-3 to 4.3) /etc/service is a link to /etc/runit/runsvdir/default and all sv start univention... failed because sv uses /etc/service univention-runit.postinst has some code to create a proper /etc/service link, but only if /etc/service is not link, so in my case "somebody" create a "wrong" /etc/service link, univention-runit did not update /etc/service to the correct univention link /etc/runit/univention and all sv start univention-di... failed. my workaround was rm /etc/service and ln -s /etc/runit/univention /etc/service after that service bind9/univention-directory-listener works
faf83fc9 link /etc/runit/univention -> /etc/service for 4.3-0 6fbcc0a1 change daemon path
works, but maybe better to check if the link is not "/etc/runit/univention" -elif [ "$(readlink /etc/service)" = "runit/runsvdir/default" ]; then +elif [ "$(readlink /etc/service)" != "/etc/runit/univention" ]; then or?
Replacing runsv with systemd would be complexity reduction for UCS 4.3.
another problem the new runit package replaces the /etc/service link upon unpack (very early in the update process). Until the configuration of univention-runit (postinst repairs the /etc/service link), very late in the update process, runit is broken (because /etc/service is empty). But runit/systemd tries to reload/restart services and with the empty /etc/services all services are stopped (bind, listener, notifier) now during the update. So (a) we have to restart the runit services. (b) remove the /etc/service link from the runit package What i did to test this, was to create the new runit directory before the update. mkdir -p /etc/runit/runsvdir/default cp -a /etc/service/* /etc/runit/runsvdir/default This way runit also works during the period were the link is broken. All runit services were properly restarted/reloaded during the update and running after the update.
(In reply to Felix Botner from comment #7) > another problem > > the new runit package replaces the /etc/service link upon unpack (very early > in the update process). Until the configuration of univention-runit > (postinst repairs the /etc/service link), very late in the update process, > runit is broken (because /etc/service is empty). But runit/systemd tries to > reload/restart services and with the empty /etc/services all services are > stopped (bind, listener, notifier) now during the update. > > So > > (a) > we have to restart the runit services. > > (b) > remove the /etc/service link from the runit package > > What i did to test this, was to create the new runit directory before the > update. > > mkdir -p /etc/runit/runsvdir/default > cp -a /etc/service/* /etc/runit/runsvdir/default > > This way runit also works during the period were the link is broken. All > runit services were properly restarted/reloaded during the update and > running after the update. better solution updater preup -> /etc/runit/runsvdir -> ln -s /etc/runit/univention /etc/runit/runsvdir/default univention-runit ensure that /etc/runit/runsvdir/default exists and is a link to /etc/runit/univention remove the /etc/runit/univention /etc/service stuff seems that the runit package overwrites the /etc/service link but not /etc/runit/runsvdir/default, so we can simply link /etc/runit/runsvdir/default to the univention runit directory and keep the /etc/service default
In case the solution above doesn't work: We might be able to use "/usr/bin/runsvdir /etc/runit/univention" in the univention-runit init script instead of "/etc/runit/2"
6d53c0d2: link /etc/runit/univention to /etc/runit/runsvdir/default instead of /etc/serivce Does this need a changelog entry?
(In reply to Jürn Brodersen from comment #10) > 6d53c0d2: link /etc/runit/univention to /etc/runit/runsvdir/default instead > of /etc/serivce OK > Does this need a changelog entry? yes, just a short notice that we changed the runit config according to debian stretch
92198d08: changelog
OK
UCS 4.3 has been released: https://docs.software-univention.de/release-notes-4.3-0-en.html https://docs.software-univention.de/release-notes-4.3-0-de.html If this error occurs again, please use "Clone This Bug".