Bug 57296 - Update to UCS 5.1-0/5.2-0 fails due to "empty" fetchmailrc
Update to UCS 5.1-0/5.2-0 fails due to "empty" fetchmailrc
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Mail
UCS 5.2
Other Linux
: P5 normal (vote)
: ---
Assigned To: Iván.Delgado
Juan Carlos
https://git.knut.univention.de/univen...
:
Depends on: 52923
Blocks: 55201
  Show dependency treegraph
 
Reported: 2024-05-17 11:58 CEST by Iván.Delgado
Modified: 2024-05-20 09:19 CEST (History)
3 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 Iván.Delgado univentionstaff 2024-05-17 11:58:49 CEST
+++ This bug was initially created as a clone of Bug #52923 +++

fetchmail (6.4.16-4+deb11u1A~5.1.0.202303091707) wird eingerichtet ...
Neue Version der Konfigurationsdatei /etc/init.d/fetchmail wird installiert ...
Neue Version der Konfigurationsdatei /etc/resolvconf/update-libc.d/fetchmail wird installiert ...
Job for fetchmail.service failed because the control process exited with error code.
See "systemctl status fetchmail.service" and "journalctl -xe" for details.
invoke-rc.d: initscript fetchmail, action "restart" failed.
● fetchmail.service - LSB: init-Script for system wide fetchmail daemon
     Loaded: loaded (/etc/init.d/fetchmail; generated)
     Active: failed (Result: exit-code) since Fri 2024-05-17 09:19:34 CEST; 6ms ago
       Docs: man:systemd-sysv-generator(8)
    Process: 4498 ExecStart=/etc/init.d/fetchmail start (code=exited, status=1/FAILURE)

Mai 17 09:19:34 master systemd[1]: Starting LSB: init-Script for system wide fetchmail daemon...
Mai 17 09:19:34 master fetchmail[4498]: Starting mail retriever agent: fetchmail
Mai 17 09:19:34 master fetchmail[4506]: fetchmail: no mailservers have been specified.
Mai 17 09:19:34 master fetchmail[4507]:  failed!
Mai 17 09:19:34 master systemd[1]: fetchmail.service: Control process exited, code=exited, status=1/FAILURE
Mai 17 09:19:34 master systemd[1]: fetchmail.service: Failed with result 'exit-code'.
Mai 17 09:19:34 master systemd[1]: Failed to start LSB: init-Script for system wide fetchmail daemon.
dpkg: Fehler beim Bearbeiten des Paketes fetchmail (--configure):
 »installiertes fetchmail-Skript des Paketes post-installation«-Unterprozess gab den Fehlerwert 1 zurück
Comment 2 Iván.Delgado univentionstaff 2024-05-17 13:06:03 CEST
In the postinst script of fetchmail, the fetchmail service is restarted automatically during the update to UCS 5.1-0/5.2-0. If there is no "poll" entry in /etc/fetchmailrc, the restart of the fetchmail polling daemon fails and unfortunately the fetchmail.postinst also fails. This causes an abortion of the update to UCS 5.1-0/5.2-0

To prevent this problematic behaviour, in preup.sh the fetchmail.service stopped and then disabled via the corresponding UCR variable: 

  ucr set fetchmail/autostart=no

The old value of "fetchmail/autostart" is saved in the UCR variable "fetchmail/autostart/update510"/"fetchmail/autostart/update520" and restored in postup.sh. Also a restart of fetchmail.service is attempted in postup.sh.

5.1.0

univention-updater (16.0.17)
85a39b9b23d0 | Bug #57296: disable fetchmail during the update


5.2.0

univention-updater (17.0.3)
d7fc081f9234 | Bug #57296: Remove workaround "fetchmail/autostart=false"

9a841b59d47a | Bug #57296: Remove workaround "fetchmail/autostart=false"
Comment 3 Juan Carlos univentionstaff 2024-05-20 08:14:38 CEST
QA:
OK: code review
OK: changes in 5.2/5.1
OK: Workaround in tests removed
OK: tests ok