Univention Bugzilla – Bug 53175
univention-dhcp fails to install after initial join on non-primary
Last modified: 2021-05-25 16:03:15 CEST
Installation of univention-dhcp fails on a non-primary systems already joined, which will be the norm with UCS 5.0-0 as USS no longer installs DHCP as part of the initial installation. The problem is that univention-dhcp: Depends isc-dhcp-server-ldap: Depends isc-dhcp-server /var/lib/dpkg/info/isc-dhcp-server.postinst tries to start the daemon with /etc/dhcp/dhcpd.conf already templated by univention-dhcp. This will fail as the daemon will do a LDAP search first for (&(objectClass=dhcpServer)(cn=$hostname)) which is only created later by /usr/lib/univention-install/25univention-dhcp.inst when later it gets invoked from /var/lib/dpkg/info/univention-dhcp.postinst. The failed start will abort isc-dhcp-server.postinst, which aborts the full package installation. We have augmented isc-dhcp-server with /usr/lib/systemd/system/isc-dhcp-server.service.d/univention-dhcp.conf: ConditionPathExists=/etc/dhcp/dhcpd.conf ConditionPathExists=/var/univention-join/joined which are both fulfilled as the system is already joined and the file exists.
[phahn/dhcp] a43f767a0c Bug #53175: Delay DHCP server start until after join services/univention-dhcp/25univention-dhcp.inst | 1 + services/univention-dhcp/debian/changelog | 6 +++++ services/univention-dhcp/debian/univention-dhcp.postinst | 5 ++++ services/univention-dhcp/debian/univention-dhcp.postrm | 46 ++++++++++++++++++++++++++++++++++++ services/univention-dhcp/univention-dhcp.conf | 1 + 5 files changed, 59 insertions(+) [phahn/dhcp] 2a5c2bba9d Bug #53175: Restart DHCP server after join services/univention-dhcp/25univention-dhcp.inst | 1 + 1 file changed, 1 insertion(+) Package: univention-dhcp Version: 14.0.4-1A~5.0.0.202104271840 OK: Upgrading old installation OK: New installation FYI: Also added a univention-dhcp.postrm for "apt prune". No separate changelog as this is part of the transition to systemd Bug #43688
What I tested: prune cleans up -> OK Installation (univention-dhcp) and start of "isc-dhcp-server": primary -> OK backup -> OK replicant -> OK managed -> OK Installation before join -> service is stopped -> join -> service is started -> OK No behavior changes -> No changelog necessary -> OK -> 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".