Bug 44377 - Cyrus IMAP not starting automatically after upgrade to 4.2
Cyrus IMAP not starting automatically after upgrade to 4.2
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Mail
UCS 4.2
Other Linux
: P5 normal (vote)
: UCS 4.2-0-errata
Assigned To: Daniel Tröder
Erik Damrose
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2017-04-18 09:09 CEST by Daniel Tröder
Modified: 2017-05-10 15:17 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
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.171
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2017042121000196, 2017050221000131
Bug group (optional): External feedback
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Tröder univentionstaff 2017-04-18 09:09:16 CEST
On (at least) OX systems after the upgrade to UCS 4.2 the Cyrus IMAP server is not running.

https://help.univention.com/t/ucs-4-2-update-ox-app-suite-spielt-verrueckt-hilfe/5508

systemctl enable cyrus-imapd.service
Comment 1 Nico Gulden univentionstaff 2017-04-21 09:49:04 CEST
External feedback in Ticket#2017042121000196 may match this issue, as well.
Comment 2 Daniel Tröder univentionstaff 2017-04-27 09:53:17 CEST
r78966:
  * adjust "restart" calls to systemd
  * adjust package dependencies to Jessie
  * add unjoin script

Package: univention-mail-cyrus
Version: 9.0.0-3A~4.2.0.201704270951
Branch: ucs_4.2-0
Scope: errata4.2-0
Comment 3 Christina Scheinig univentionstaff 2017-05-08 09:18:05 CEST
A customer reported the same behavior.

I found this error message in /var/log/mail.log
May  7 10:14:35 ucs42 cyrus/master[4288]: about to exec /usr/lib/cyrus/bin/lmtpd
May  7 10:14:35 ucs42 cyrus/lmtp[4288]: DBERROR db5: BDB1538 Program version 5.3 doesn't match environment version 5.1
May  7 10:14:35 ucs42 cyrus/lmtp[4288]: DBERROR: dbenv->open '/var/lib/cyrus/db' failed: BDB0091 DB_VERSION_MISMATCH: Database environment version mismatch
May  7 10:14:35 ucs42 cyrus/lmtp[4288]: DBERROR: init() on berkeley

Is this error related to the problem, or is this an other issue?
Comment 4 Daniel Tröder univentionstaff 2017-05-08 10:24:02 CEST
(In reply to Christina Scheinig from comment #3)
> A customer reported the same behavior.
> 
> I found this error message in /var/log/mail.log
> May  7 10:14:35 ucs42 cyrus/master[4288]: about to exec
> /usr/lib/cyrus/bin/lmtpd
> May  7 10:14:35 ucs42 cyrus/lmtp[4288]: DBERROR db5: BDB1538 Program version
> 5.3 doesn't match environment version 5.1
> May  7 10:14:35 ucs42 cyrus/lmtp[4288]: DBERROR: dbenv->open
> '/var/lib/cyrus/db' failed: BDB0091 DB_VERSION_MISMATCH: Database
> environment version mismatch
> May  7 10:14:35 ucs42 cyrus/lmtp[4288]: DBERROR: init() on berkeley
> 
> Is this error related to the problem, or is this an other issue?
That is Bug #44487.
Comment 5 Sönke Schwardt-Krummrich univentionstaff 2017-05-08 13:08:07 CEST
OK: code change
??: functional test
??: advisory
Comment 6 Sönke Schwardt-Krummrich univentionstaff 2017-05-09 23:40:44 CEST
(In reply to Sönke Schwardt-Krummrich from comment #5)
> OK: code change
I have to withdraw this statement.

→ after updating to UCS 4.2-0 the package version "9.0.0-2A~4.2.0.201703151922" is installed, but the postinst snippet tests against "9.0.0-1". Therefore "systemctl enable cyrus-imapd.service" is never called.
→ I fixed that

univention-mail-cyrus.yaml:
r79261 | Bug #44377: updated package version in advisory
r79167 | Bug #44377: advisory update

univention-mail-cyrus (9.0.0-9):
r79260 | Bug #44377: fix version comparison in postinst script


→ but unfortunately the cyrus-imapd.service gets never enabled if directly installed on UCS 4.2-0 with newest errata:

root@master:~# univention-install univention-mail-server univention-mail-cyrus
[...]
root@master:~# reboot
[...]
root@master:~# systemctl status cyrus-imapd.service
● cyrus-imapd.service - Cyrus IMAP/POP3 daemons
   Loaded: loaded (/lib/systemd/system/cyrus-imapd.service; disabled)
 

→ REOPEN

Why is this service not enabled automatically by the cyrus-* packages?
Maybe we should enable the service during update AND during initial installation: "$1" = configure && -z "$2"  ?
Comment 7 Daniel Tröder univentionstaff 2017-05-10 10:20:45 CEST
Looks like this one: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=790885

79264: enable Cyrus service also on install
79267: update advisories

Package: univention-mail-cyrus
Version: 9.0.0-10A~4.2.0.201705101016
Branch: ucs_4.2-0
Scope: errata4.2-0
Comment 8 Erik Damrose univentionstaff 2017-05-10 11:34:09 CEST
OK: Test against correct errata package version
OK: cyrus is enabled as systemd service for new package installations and when the package is updated
OK: yaml
Verified
Comment 9 Janek Walkenhorst univentionstaff 2017-05-10 15:17:05 CEST
<http://errata.software-univention.de/ucs/4.2/12.html>