Univention Bugzilla – Bug 43687
Convert UDN from runit to systemd
Last modified: 2021-06-17 16:08:17 CEST
We should convert /etc/init.d/univention-directory-notifier to a univention-directory-notifier.service This would allow us to remove runit. - Replace logging to /var/log/univention/notifier.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
Sebastian updated calls to the init script to systemctl. I added a service unit. [5.0-0 76e0131bf5] Bug #43687: Convert UDN from runit to systemd [5.0-0 3c01651332] Bug #43687: replace intid.d with systemctl for UDN in univention-system-setup [5.0-0 1d83346b56] Bug #43687: use systemctl for UDN in univention-join [5.0-0 fc9433dcaa] Bug #43687 ldap: use systemctl to restart UDN in univention-ldap [5.0-0 c5903de583] Bug #43687: update debian/changelog of univention-ldap [5.0-0 71f4f9f755] fixup! Bug #43687: Convert UDN from runit to systemd
Sorry, I forgot to add a changelog: [5.0-0 6bc1403cf9] Bug #43687: changelog
OK: `apt-get install univention-directory-notifier` OK: `systemctl status univention-directory-notifier.service` OK `journalctl -u univention-directory-notifier.service` OK: `pkill -f univention-directory-notifier` → restarted automatically OK: `gitlog -p '#43687'` OK: ChangeLog.xml OK: UMC system service: start, stop OK: logrotate -f /etc/logrotate.d/univention-directory-notifier OK: tree /etc/runit/ OK: dpkg -L univention-directory-notifier OK: git l1 4.4-6.. --grep 'Bug #43687' [5.0-0] c930b2b9b3 Bug #43687 UDN: Remove runit files on upgrade [5.0-0] 69f5d958ea Bug #43687 UDN: Remove runit files on upgrade [5.0-0] 15b92c682b Bug #43687 UDN: Remove runit files on upgrade [5.0-0] 6bc1403cf9 Bug #43687: changelog [5.0-0] 71f4f9f755 fixup! Bug #43687: Convert UDN from runit to systemd [5.0-0] c5903de583 Bug #43687: update debian/changelog of univention-ldap [5.0-0] fc9433dcaa Bug #43687 ldap: use systemctl to restart UDN in univention-ldap [5.0-0] 1d83346b56 Bug #43687: use systemctl for UDN in univention-join [5.0-0] 3c01651332 Bug #43687: replace intid.d with systemctl for UDN in univention-system-setup [5.0-0] 76e0131bf5 Bug #43687: Convert UDN from runit to systemd
REOPEN: During system setup I see the error message: = Running 10_notifier_listener_restart /tmp/tmpggOdcw/post/10_notifier_listener_restart: 41: /tmp/tmpggOdcw/post/10_notifier_listener_restart: Syntax error: "fi" unexpected caused by git:3c01651332f5d36d3fc17c3ceaaf2701566f343f.
(In reply to Florian Best from comment #5) > /tmp/tmpggOdcw/post/10_notifier_listener_restart: 41: > /tmp/tmpggOdcw/post/10_notifier_listener_restart: Syntax error: "fi" unexpected Fixed: [5.0-0] 55993e3495 Bug #43687 USS: Fix UDN and UDL restart base/univention-system-setup/debian/changelog | 6 ++++++ .../lib/univention-system-setup/cleanup-post.d/10_notifier_listener_restart | 15 +-------------- 2 files changed, 7 insertions(+), 14 deletions(-) [5.0-0] 32d5f69cb7 Bug #43687 USS: Fix more ucslint shell issues base/univention-system-setup/debian/control | 1 - .../univention-system-setup-boot.univention-system-setup-boot-prepare.init | 12 +++++++----- base/univention-system-setup/umc/de.po | 4 ++-- base/univention-system-setup/umc/python/setup/util.py | 2 +- .../usr/lib/univention-system-setup/scripts/setup-join.sh | 5 +++-- .../usr/lib/univention-system-setup/scripts/setup_utils.sh | 2 +- base/univention-system-setup/usr/share/univention-system-setup/download-packages | 5 +++-- base/univention-system-setup/usr/share/univention-system-setup/www/de.po | 8 ++++---- 8 files changed, 21 insertions(+), 18 deletions(-) Package: univention-system-setup Version: 13.0.3-7A~5.0.0.202101060858 Branch: ucs_5.0-0
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".