Univention Bugzilla – Bug 43686
Convert UDL from runit to systemd
Last modified: 2021-05-25 16:02:56 CEST
We should convert /etc/init.d/univention-directory-listener to a univention-directory-listener.service This would allow us to remove runit. - Replace logging to /var/log/univention/listen.log (Bug #43685) - Consider handling of autostart UCRV (Bug #43470)
When replacing runit by systemd, some join scripts/infrastructure must be updated to only start the service after joining: # find / -xdev \( -name log -o -name dpkg -o -name init.d -o -name cache \) -prune -o -type f -exec grep -n --color /etc/runit/univention {} + /usr/lib/univention-install/25univention-dhcp.inst:110:ln -s /etc/runit/univention-dhcp /etc/runit/univention/univention-dhcp >/dev/null 2>&1 /usr/lib/univention-install/90univention-bind-post.inst:88:if [ ! -e /etc/runit/univention/univention-bind-proxy ]; then /usr/lib/univention-install/90univention-bind-post.inst:89: ln -s /etc/runit/univention-bind-proxy /etc/runit/univention/univention-bind-proxy /usr/lib/univention-install/90univention-bind-post.inst:92:if [ ! -e /etc/runit/univention/univention-bind-samba4 ]; then /usr/lib/univention-install/90univention-bind-post.inst:93: ln -s /etc/runit/univention-bind-samba4 /etc/runit/univention/univention-bind-samba4 /usr/lib/univention-install/02univention-directory-notifier.inst:38:ln -sf /etc/runit/univention-directory-notifier /etc/runit/univention/univention-directory-notifier /usr/lib/univention-install/05univention-bind.inst:102:ln -s /etc/runit/univention-bind /etc/runit/univention/univention-bind >/dev/null 2>&1 /usr/lib/univention-install/03univention-directory-listener.inst:38:ln -sf /etc/runit/univention-directory-listener /etc/runit/univention/univention-directory-listener /etc/logrotate.d/univention-directory-notifier:21: test -x /usr/bin/sv && test -e /etc/runit/univention/univention-directory-notifier && sv term univention-directory-notifier || true /etc/logrotate.d/univention-dhcp:21: test -x /usr/bin/sv && test -e /etc/runit/univention/univention-dhcp && sv term univention-dhcp || true /etc/logrotate.d/univention-directory-listener:21: test -x /usr/bin/sv && test -e /etc/runit/univention/univention-directory-listener && sv term univention-directory-listener || true univention-join also has some internal knowledge of runit: /usr/share/univention-join/univention-join:665: if [ -e "/etc/runit/univention/$service" ] /usr/share/univention-join/univention-join:926:if [ -d /etc/runit/univention-directory-notifier ]; then /usr/share/univention-join/univention-join:931:if [ -d /etc/runit/univention-directory-listener ]; then
I have changed the init.d calls will systemctl call for UDL.
Sebastian worked on updating packages to use systemctl, which I did QA for. I worked on the unit file which Sebastian tested. Philipp helped with the implementation and testing. We tested primary and backup manually and otherwise checked jenkins. [5.0-0 5929629142] Bug #43686: replace intid.d with systemctl for univention-directory-listener [5.0-0 3968ea298c] Bug #43686: replace intid.d with systemctl for univention-directory-listener [5.0-0 66a96d1b53] Bug #43686: Convert UDL from runit to systemd [5.0-0 bf16781e34] Bug #43686: update debian/CHANGELOG for univention-heimdal [5.0-0 071f6de1bd] Bug #43686: update debian/CHANGELOG for univention-quota [5.0-0 29370c6011] Bug #43686: update debian/CHANGELOG for univention-ssl [5.0-0 de08c8390d] Bug #43686: update debian/CHANGELOG for univention-system-setup [5.0-0 37dce7b7e2] Bug #43686: replace UDL init.d with systemctl calls in univention-fetchmail [5.0-0 84270c6ebb] Bug #43686: replace init.d with systemctl calls for UDL in univention-mail-dovecut [5.0-0 f63a24af74] Bug #43686: use systemctl calls for UDL in univention-directory-manager-modules [5.0-0 e56fc4e237] Bug #43686: use systemctl for UDL in univention-directory-notifier [5.0-0 d434a0b4aa] Bug #43686: use systemctl for UDL in univention-directory-replication [5.0-0 5c0f92b20c] Bug #43686: use systemctl to restart UDL in univention-join [5.0-0 b404b8c559] Bug #43686: use systemctl calls for UDL in univention-ldap [5.0-0 a4278a5f4c] Bug #43686: use systemctl calls for UDL in univention-management-console [5.0-0 05a305949a] Bug #43686: use systemctl for UDL in univention-management-console-module-adtakeover [5.0-0 7a0825b05c] Bug #43686: use systemctl for UDL in univention-nagios [5.0-0 fbc42ceb62] Bug #43686: use systemctl to start, stop or restart UDL in ucslint [5.0-0 5d049d88b3] Bug #43686: use systemctl calls for UDL in univention-saml [5.0-0 5a657adc8a] Bug #43686: use systemctl calls for UDL in univention-ad-connector [5.0-0 933d045822] Bug #43686: use systemctl calls for UDL in univention-admin-diary [5.0-0 b3c0f32b0f] Bug #43686: use systemctl calls for UDL in univention-dhcp [5.0-0 ecd147dd24] Bug #43686: use systemctl calls for UDL in univention-net-installer [5.0-0 df37833503] Bug #43686: use systemctl calls for UDL in univention-nfs [5.0-0 55d95a2f4b] Bug #43686: use systemctl calls for UDL in univention-pkgdb [5.0-0 1c1c62c14e] Bug #43686: use systemctl calls for UDL in univention-printserver [5.0-0 67fc22c6dd] Bug #43686: use systemctl calls for UDL in univention-s4-connector [5.0-0 68ad963bdc] Bug #43686: use systemctl calls for UDL in univention-samba [5.0-0 fb2cc2558d] Bug #43686: replace init.d with systemctl calls for UDL in univention-samba4 [5.0-0 21929aeb79] Bug #43686: replace init.d with systemctl for UDL in test/product-tests [5.0-0 e9b222070a] Bug #43686: replace init.d with systemctl calls for UDL in test/scenarios [5.0-0 60ca161ffc] Bug #43686: replace init.d with systemctl calls for UDL in test/uct-test/ [5.0-0 11febadac6] Bug #43686: use systemctl calls for UDL in test/univention-demo-configuration/ [5.0-0 a96029e4d9] fixup! Bug #43686: use systemctl for UDL in univention-management-console-module-adtakeover [5.0-0 6590049c33] Bug #43686: update debian/CHANGELOG for univention-demo-configuration [5.0-0 511f4a8088] Bug #43686: update debian/CHANGELOG for ucs-test [5.0-0 968de4f84a] fixup! Bug #43686: use systemctl for UDL in univention-directory-replication [5.0-0 f4cc69dfe7] Bug #43686: use systemctl calls for UDL in univention-lib [5.0-0 f79e9daa5f] Bug #43686: use systemctl calls for UDL in univention-server [5.0-0 caa22e4d3f] Bug #43686: use systemctl calls for UDL in developer-reference [5.0-0 b33b78458b] Bug #43686: use systemctl calls for UDL in univention-appcenter [5.0-0 812c9a1e17] Bug #43686: use systemctl calls for UDL in univention-directory-logger [5.0-0 ba5429bb03] fixup! fixup! Bug #43686: use systemctl for UDL in univention-directory-replication [5.0-0 04807af067] Bug #43686: use systemctl calls for UDL in univention-self-service [5.0-0 d4e1702850] Bug #43686: use systemctl calls for UDL in univention-server-overview [5.0-0 36b5dbcf38] Bug #43686: use systemctl calls for UDL in univention-bind [5.0-0 a3d150f224] Bug #43686: use systemctl calls for UDL in univention-ldb-modules [5.0-0 1658f7537e] fixup! Bug #43686: use systemctl calls for UDL in univention-pkgdb [5.0-0 0df9f5616c] Bug #43686: use systemctl calls for UDL in univention-radius [5.0-0 f1e5d76b30] fixup! Bug #43686: replace init.d with systemctl calls for UDL in test/uct-test/ [5.0-0 60b16dfe09] fixup! Bug #43686: replace init.d with systemctl calls for UDL in univention-samba4 [5.0-0 e2429a130a] Bug #43686: changelog 5.0-0
(In reply to Philipp Hahn from comment #0) ... > - Replace logging to /var/log/univention/listen.log (Bug #43685) We decided against this for now. But it can be changed with a systemd drop-in file for univention-directory-listener.service > - Consider handling of autostart UCRV (Bug #43470) Already implemented in the past. (The unit will be masked if deactivated through ucr)
From Bug #51316: [5.0-0] 72428a9f61 fix Bug #43686: Convert UDL from runit to systemd Package: univention-directory-listener Version: 14.0.5-1A~5.0.0.202102011843
(In reply to Philipp Hahn from comment #5) > From Bug #51316: > [5.0-0] 72428a9f61 fix Bug #43686: Convert UDL from runit to systemd > > Package: univention-directory-listener > Version: 14.0.5-1A~5.0.0.202102011843 looks good, thanks! As mentioned in comment 3, QA has been done and no further problems have surfaced. -> Verified
UCS 5.0 has been released: https://docs.software-univention.de/release-notes-5.0-0-en.html https://docs.software-univention.de/release-notes-5.0-0-de.html If this error occurs again, please use "Clone This Bug".