Bug 52885 - Upgrade to UCS 5.0 failed due to univention-dhcp
Upgrade to UCS 5.0 failed due to univention-dhcp
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: DHCP
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0
Assigned To: Jürn Brodersen
Sönke Schwardt-Krummrich
:
Depends on: 43688
Blocks:
  Show dependency treegraph
 
Reported: 2021-03-09 22:08 CET by Florian Best
Modified: 2021-05-25 16:00 CEST (History)
4 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 Florian Best univentionstaff 2021-03-09 22:08:29 CET
https://jenkins.knut.univention.de:8181/job/UCS-5.0/job/UCS-5.0-0/view/Default/job/AutotestUpgrade/SambaVersion=s4,Systemrolle=master/ws/test/autotest-071-master-s4.log

[master071] 2021-03-09T01:15:44.139490	The system can not be updated to UCS 5.0 due to the following reasons:
[master071] 2021-03-09T01:15:44.139490	package_status:
[master071] 2021-03-09T01:15:44.139490		The package state on this system is inconsistent.
[master071] 2021-03-09T01:15:44.139490		Please run 'dpkg --configure -a' manually
[master071] 2021-03-09T01:15:44.148844	Error: Please check "/var/log/univention/updater.log" for details.
[master071] 2021-03-09T01:15:44.208284	ERROR: update failed. Please check /var/log/univention/updater.log
[master071] 2021-03-09T01:15:44.426278	ERROR: univention-upgrade failed exitcode 1

https://jenkins.knut.univention.de:8181/job/UCS-5.0/job/UCS-5.0-0/view/Default/job/AutotestUpgrade/SambaVersion=s4,Systemrolle=master/ws/test/updater.log

Errors were encountered while processing:
 univention-dhcp

E: Sub-process /usr/bin/dpkg returned an error code (1)
Error: Failed to execute "apt-get -o DPkg::Options::=--force-confold -o DPkg::Options::=--force-overwrite -o DPkg::Options::=--force-overwrite-dir --trivial-only=no --assume-yes --quiet=1 -u dist-upgrade"
exitcode of univention-updater: 1
ERROR: update failed. Please check /var/log/univention/updater.log


Setting up univention-dhcp (14.0.3-4A~5.0.0.202102222236) ...
Installing new version of config file /etc/univention/service.info/services/univention-dhcp.cfg ...
Installing new version of config file /etc/univention/templates/files/etc/dhcp/dhcpd.conf ...
Installing new version of config file /etc/univention/templates/files/etc/logrotate.d/univention-dhcp ...
Installing new version of config file /etc/univention/templates/info/univention-dhcp.info ...
Failed to process Subfile /etc/univention/templates/files/etc/ldap/slapd.conf.d/64univention-ldap-server_acl-master-admin-settings
Failed to process Subfile /etc/univention/templates/files/etc/ldap/slapd.conf.d/64univention-ldap-server_acl-master-admin-settings
File: /etc/logrotate.d/univention-dhcp
File: /etc/dhcp/dhcpd.conf
Removing obsolete conffile /etc/init.d/univention-dhcp ...
Removing obsolete conffile /etc/univention/templates/files/etc/init.d/isc-dhcp-server ...
Not updating dhcpd/autostart
Failed to process Subfile /etc/univention/templates/files/etc/ldap/slapd.conf.d/64univention-ldap-server_acl-master-admin-settings
Setting security/packetfilter/package/univention-dhcp/udp/67/all
Setting security/packetfilter/package/univention-dhcp/udp/67/all/en
Setting security/packetfilter/package/univention-dhcp/udp/68/all
Setting security/packetfilter/package/univention-dhcp/udp/68/all/en
Not updating dhcpd/restart/listener
Failed to process Subfile /etc/univention/templates/files/etc/ldap/slapd.conf.d/64univention-ldap-server_acl-master-admin-settings
File: /etc/security/packetfilter.d/80_univention-firewall_policy.sh
File: /etc/security/packetfilter.d/10_univention-firewall_start.sh
2021-03-09 01:01:18.813756076+01:00 (in joinscript_init)
A system update is currently being performed. The execution of the join script /usr/lib/univention-install/25univention-dhcp.inst is therefore postponed.
isc-dhcp-server.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install is-enabled isc-dhcp-server
univention-firewall.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install is-enabled univention-firewall
Job for isc-dhcp-server.service failed because the control process exited with error code.
See "systemctl status isc-dhcp-server.service" and "journalctl -xe" for details.
dpkg: error processing package univention-dhcp (--configure):
 installed univention-dhcp package post-installation script subprocess returned error exit status 1

I guess this was introduced in Bug #43688 git:3362c3c6e21b089ac47ff24bfc849e5f5bd28916.
Could also be Bug #52828. See also Bug #52259 comment 7.


btw. is it purpose what we don't set the iptable rules with "?" instead of "="?

+               security/packetfilter/package/univention-dhcp/udp/67/all=ACCEPT \
+               security/packetfilter/package/univention-dhcp/udp/67/all/en="DHCP" \
+               security/packetfilter/package/univention-dhcp/udp/68/all=ACCEPT \
+               security/packetfilter/package/univention-dhcp/udp/68/all/en="DHCP" \
Comment 1 Jürn Brodersen univentionstaff 2021-03-12 11:16:05 CET
This happens because the bind9.service and diversion for it have been removed. The bind9.service is removed early than the new files are copied, the diversion is removed later in the postinst. That can results in a broken bind9.service for some packages during the configuration phase.
The bind9 package tries to restart the bind9 service which fails. This subsequently fails the installation of univention-dhcp because no dns is running.


[5.0-0 7fb331efce] Bug #52885: Fix broken bind during package configuration phase
Comment 2 Sönke Schwardt-Krummrich univentionstaff 2021-03-16 18:32:28 CET
OK: installation
OK: update
OK: code change
OK: changelog entry
OK: functional change
OK: package built and installable
Comment 3 Florian Best univentionstaff 2021-05-25 16:00:14 CEST
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".