Bug 43686 - Convert UDL from runit to systemd
Convert UDL from runit to systemd
Status: VERIFIED FIXED
Product: UCS
Classification: Unclassified
Component: Listener (univention-directory-listener)
UCS 4.4
Other Linux
: P5 normal (vote)
: UCS 5.0
Assigned To: Sebastian Lobinger
Jürn Brodersen
: systemd
Depends on: 43685 43470 45173
Blocks: 43330
  Show dependency treegraph
 
Reported: 2017-03-01 13:33 CET by Philipp Hahn
Modified: 2020-11-19 10:29 CET (History)
5 users (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2017-03-01 13:33:37 CET
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)
Comment 1 Philipp Hahn univentionstaff 2017-03-01 16:50:12 CET
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
Comment 2 Sebastian Lobinger univentionstaff 2020-10-22 09:13:16 CEST
I have changed the init.d calls will systemctl call for UDL.
Comment 3 Jürn Brodersen univentionstaff 2020-11-19 10:24:19 CET
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
Comment 4 Jürn Brodersen univentionstaff 2020-11-19 10:29:03 CET
(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)