Fix log reopen in >=2.2.33

Bug #1777008 reported by Michael Heuberger
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dovecot (Ubuntu)
Fix Released
Undecided
Unassigned
Bionic
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

 * The version in Bionic fails to reopen the log which is needed for log
   rotation

 * Fix by backporting a change from latter versions

[Test Case]

 * sudo apt install mail-stack-delivery
   # set log_path = /var/log/dovecot.log in 10-logging.conf:
   sudo vi /etc/dovecot/conf.d/10-logging.conf
   sudo systemctl restart dovecot

   In another terminal:
   sudo mv /var/log/dovecot.log /var/log/dovecot.log.1
   sudo doveadm log reopen

   Verify that /var/log/dovecot.log is *not* created. That shows the bug.

[Regression Potential]

 * log handling code is changed, so in theory this could affect log
   handling. But since only the code for sig_reopen_logs (which is broken
   without the fix) is changed we should be good.
   There also is a header change part of the upstream change, that could
   in theory affect log handling.

[Other Info]

 * n/a

----

Version 2.2 comes with lots of bugs, especially this nasty one
https://www.dovecot.org/pipermail/dovecot/2017-November/109971.html

Would be good to bump to 2.3 for Bionic. Thanks!

Related branches

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi Michael,
at the time we worked on the version for Bionic 2.3 was not ready yet.
See bug 1771524 for details if you want, but the above is the TL;DR.

Due to the SRu policy [1] and 2.3 being a rather bug jump from 2.2 it is imposing too much regression to pull all of 2.3 into Bionic.

For your issue though, one could consider evaluating and backporting [2].
It needs to be evaluated if it needs more than just the change, but if so would that adress your issue?

If so lets change the title to something like "fix log reopen"

The patch seems applicable, so further if one would provide a PPA would you be willing and able to test the PPA package if it fixed the issue or exposes other log related issues?

[1]: https://wiki.ubuntu.com/StableReleaseUpdates
[2]: https://github.com/dovecot/core/commit/84703c2f19113ac731e4638ba782fa87e0748ba6

Changed in dovecot (Ubuntu):
status: New → Incomplete
Revision history for this message
Michael Heuberger (michael.heuberger) wrote :

Thanks for your input Christian. Agree in all points then. Tried to rename ticket title but server returned an error.

Hence doing nothing from here an leave it into your hands. Thanks heaps.

- Michael

summary: - Bump to v2.3 due to many bugs
+ Fix log reopen in >=2.2.33
Changed in dovecot (Ubuntu):
status: Incomplete → Confirmed
Changed in dovecot (Ubuntu Bionic):
status: New → Confirmed
tags: added: server-next
Changed in dovecot (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

There is a test build in [1] that I'd ask you to try before going forward.

It would also be great if you could assist by providing short steps to reproduce that we could use as test verification of the issue under the terms of [2], to fill the test section for the SRU template here.

The changes itself seem small enough, I opened a merge proposal for another community/team member to double check for silly mistakes [3]

[1]: https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/3300
[2]: https://wiki.ubuntu.com/StableReleaseUpdates#SRU_Bug_Template
[3]: https://code.launchpad.net/~paelzer/ubuntu/+source/dovecot/+git/dovecot/+merge/348195

description: updated
Changed in dovecot (Ubuntu Bionic):
status: Confirmed → Triaged
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Michael, or anyone else affected,

Accepted dovecot into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/dovecot/1:2.2.33.2-1ubuntu4.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in dovecot (Ubuntu Bionic):
status: Triaged → Fix Committed
tags: added: verification-needed verification-needed-bionic
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Download full text (3.8 KiB)

As-is:
root@b:~# vim /etc/dovecot/conf.d/10-logging.conf
root@b:~# sudo systemctl restart dovecot
root@b:~# sudo mv /var/log/dovecot.log /var/log/dovecot.log.1
root@b:~# sudo doveadm log reopen
root@b:~# ll /var/log/dovecot.log
ls: cannot access '/var/log/dovecot.log': No such file or directory

Upgrade:
# apt install mail-stack-delivery
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  libfreetype6
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
  dovecot-core dovecot-imapd dovecot-managesieved dovecot-pop3d dovecot-sieve
Suggested packages:
  dovecot-gssapi dovecot-ldap dovecot-lmtpd dovecot-mysql dovecot-pgsql dovecot-solr dovecot-sqlite ntp
The following packages will be upgraded:
  dovecot-core dovecot-imapd dovecot-managesieved dovecot-pop3d dovecot-sieve mail-stack-delivery
6 upgraded, 0 newly installed, 0 to remove and 14 not upgraded.
Need to get 3289 kB of archives.
After this operation, 1024 B disk space will be freed.
Do you want to continue? [Y/n] Y
Get:1 http://archive.ubuntu.com/ubuntu bionic-proposed/main amd64 dovecot-managesieved amd64 1:2.2.33.2-1ubuntu4.1 [41.6 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic-proposed/main amd64 dovecot-sieve amd64 1:2.2.33.2-1ubuntu4.1 [311 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-proposed/main amd64 dovecot-pop3d amd64 1:2.2.33.2-1ubuntu4.1 [32.3 kB]
Get:4 http://archive.ubuntu.com/ubuntu bionic-proposed/main amd64 dovecot-imapd amd64 1:2.2.33.2-1ubuntu4.1 [153 kB]
Get:5 http://archive.ubuntu.com/ubuntu bionic-proposed/main amd64 dovecot-core amd64 1:2.2.33.2-1ubuntu4.1 [2740 kB]
Get:6 http://archive.ubuntu.com/ubuntu bionic-proposed/main amd64 mail-stack-delivery all 1:2.2.33.2-1ubuntu4.1 [10.4 kB]
Fetched 3289 kB in 1s (2986 kB/s)
(Reading database ... 29440 files and directories currently installed.)
Preparing to unpack .../dovecot-managesieved_1%3a2.2.33.2-1ubuntu4.1_amd64.deb ...
Unpacking dovecot-managesieved (1:2.2.33.2-1ubuntu4.1) over (1:2.2.33.2-1ubuntu4) ...
Preparing to unpack .../dovecot-sieve_1%3a2.2.33.2-1ubuntu4.1_amd64.deb ...
Unpacking dovecot-sieve (1:2.2.33.2-1ubuntu4.1) over (1:2.2.33.2-1ubuntu4) ...
Preparing to unpack .../dovecot-pop3d_1%3a2.2.33.2-1ubuntu4.1_amd64.deb ...
Unpacking dovecot-pop3d (1:2.2.33.2-1ubuntu4.1) over (1:2.2.33.2-1ubuntu4) ...
Preparing to unpack .../dovecot-imapd_1%3a2.2.33.2-1ubuntu4.1_amd64.deb ...
Unpacking dovecot-imapd (1:2.2.33.2-1ubuntu4.1) over (1:2.2.33.2-1ubuntu4) ...
Preparing to unpack .../dovecot-core_1%3a2.2.33.2-1ubuntu4.1_amd64.deb ...
Unpacking dovecot-core (1:2.2.33.2-1ubuntu4.1) over (1:2.2.33.2-1ubuntu4) ...
Setting up dovecot-core (1:2.2.33.2-1ubuntu4.1) ...
(Reading database ... 29440 files and directories currently installed.)
Preparing to unpack .../mail-stack-delivery_1%3a2.2.33.2-1ubuntu4.1_all.deb ...
Unpacking mail-stack-delivery (1:2.2.33.2-1ubuntu4.1) over (1:2.2.33.2-1ubuntu4) ...
Processing triggers for ufw (0.35-5) ...
Processing triggers for ureadahead (0.100.0-20) ...
Setting up dovecot-sieve (1:2.2.33.2-1ubuntu4.1) ...
S...

Read more...

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dovecot - 1:2.2.33.2-1ubuntu4.1

---------------
dovecot (1:2.2.33.2-1ubuntu4.1) bionic; urgency=medium

  * d/p/lp1777008-log-Fix-log-reopening-on-SIGUSR1.patch: Fix log reopen on
    SIGUSR1 for log rotation (LP: #1777008)

 -- Christian Ehrhardt <email address hidden> Tue, 19 Jun 2018 08:03:41 +0200

Changed in dovecot (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for dovecot has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.