Bug 44924 - duplicate services in init scripts can cause update to UCS 4.2 to fail
duplicate services in init scripts can cause update to UCS 4.2 to fail
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Update - Release updates
UCS 4.2
Other Linux
: P5 enhancement (vote)
: UCS 4.2-1-errata
Assigned To: Janek Walkenhorst
Felix Botner
:
Depends on: 22566 35651 35688
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-03 17:07 CEST by Erik Damrose
Modified: 2018-06-27 13:03 CEST (History)
5 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 5: Blocking further progress on the daily work
User Pain: 0.286
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2017070321000483
Bug group (optional):
Max CVSS v3 score:


Attachments
exim4 (6.30 KB, application/x-shellscript)
2017-07-26 13:39 CEST, Felix Botner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Damrose univentionstaff 2017-07-03 17:07:32 CEST
This series of patches are not present in UCS 4.2; The relevant patches seem to have been dropped for UCS 4.2

This caused an update failure in at least one case, where an additional postfix  init script file with the ending ".debian" existed. The postfix.postinst then failed:

# updater.log
insserv: script postfix: service mail-transport-agent already provided!

The update failed, as some packages could not be configured as a consequence:
Fehler traten auf beim Bearbeiten von:
 postfix
 postfix-ldap
 univention-mail-postfix
 univention-maintenance
 univention-role-server-common
 univention-bind
 univention-server-slave
 bsd-mailx
 univention-bind-proxy
 univention-mail-postfix-forward

As a workaround, if the system is in the state, is to install the old sysv-rc package. The remaining packages are then configured, and the update to 4.2 can be started again:
# apt-get install sysv-rc=2.88dsf-41.43.201408220944


+++ This bug was initially created as a clone of Bug #35651 +++

+++ This bug was initially created as a clone of Bug #22566 +++

+++ This bug was initially created as a clone of Bug #22507 +++

For UCS-4 insserv should be disabled by default.
Diverted .debian files by UCR should be ignored.
Comment 1 Erik Damrose univentionstaff 2017-07-03 17:49:17 CEST
Actually, two log lines are relevant:

insserv: script postfix: service mail-transport-agent already provided!
insserv: exiting now!
Comment 2 Erik Damrose univentionstaff 2017-07-12 10:06:53 CEST
At ticket 2017070321000483 the error seems to be, that an old exim4 init script was present. Purging the exim packages resolved the issue. We could check for that in preup.sh
Comment 3 Janek Walkenhorst univentionstaff 2017-07-25 17:21:30 CEST
This will probably be detected by the changes from Bug #44915

*** This bug has been marked as a duplicate of bug 44915 ***
Comment 4 Felix Botner univentionstaff 2017-07-26 13:39:09 CEST
Created attachment 9060 [details]
exim4

Created attachment 9058 [details]
exim4

Reproducible with:

* UCS 4.1- copy the exim4 init script to /etc/init.d/ 
* insserv -n returns 0
* start update to 4.2
* postfix will fail (although the new "insserv" -n returns 0, insserv -n postfix fails, and this is what update-rc.d postfix defaults calls, and this is started in postfix.postinst during the update)
Comment 5 Felix Botner univentionstaff 2017-07-26 13:41:39 CEST
Add a check for "service .* already provided" in the insserv -n output in the 4.2-0 preup.sh (similar to the check for Bug #44915)

-> insserv -n 2>&1 | grep 'service .* already provided!'
Comment 6 Janek Walkenhorst univentionstaff 2017-07-27 16:00:57 CEST
Bug #44924: Extend preup checks to detect duplicate or obsolete init scripts
r81479
Comment 7 Felix Botner univentionstaff 2017-08-07 14:27:51 CEST
OK, works, please copy to extern, so i can re-check
Comment 8 Janek Walkenhorst univentionstaff 2017-08-07 14:59:48 CEST
Published
Comment 9 Felix Botner univentionstaff 2017-08-07 16:15:18 CEST
OK, works
Comment 10 Stefan Gohmann univentionstaff 2018-03-15 08:27:53 CET
Is already published.
Comment 11 Philipp Hahn univentionstaff 2018-06-27 13:03:44 CEST
ucs-3.0/ucs@26878 only used "update-rc.d -f univention-bind *disable*", which only removes the /etc/rc?.d/S* links, but leaves behind/creates the /etc/rc?.d/K* links.
During the update from UCS-4.1 to UCS-4.2 the preup.sh updater scripts calls "insserv -n", which then detects multiple init scripts providing "bind9" and aborts the upgrade.
> WARNING: bind9 is provided by multiple scripts in /etc/init.d/
>         Aborting, because the update would likely fail.

Removing those symbolic links fixes the problem:
  update-rc.d -f univention-bind remove
  update-rc.d -f univention-bind-proxy remove