Logrotate conf file for mysql-server and my.cnf disagree

Bug #879560 reported by Jared Biel
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mysql-5.1 (Ubuntu)
Invalid
Medium
Unassigned
Lucid
Invalid
Undecided
Unassigned
Maverick
Won't Fix
Undecided
Unassigned
Natty
Won't Fix
Undecided
Unassigned
Oneiric
Won't Fix
Undecided
Unassigned
mysql-5.5 (Ubuntu)
Fix Released
Undecided
Unassigned
Lucid
Won't Fix
Undecided
Unassigned
Maverick
Won't Fix
Undecided
Unassigned
Natty
Won't Fix
Undecided
Unassigned
Oneiric
Won't Fix
Undecided
Unassigned
mysql-dfsg-5.1 (Ubuntu)
Invalid
Undecided
Unassigned
Lucid
Won't Fix
Medium
Unassigned
Maverick
Invalid
Undecided
Unassigned
Natty
Invalid
Undecided
Unassigned
Oneiric
Invalid
Undecided
Unassigned

Bug Description

The stock my.cnf file (part of mysql-common) specifies that an error log is to be created at /var/log/mysql/error.log. The logrotate conf file /etc/logrotate.d/mysql-server (part of mysql-server-5.1) doesn't take this file into account so it can continue to grow forever unchecked.

The logrotate conf file has the comment "The error log is obsolete, messages go to syslog now.". These packages are not in agreement with each other. I'm currently using Natty but this bug is also present in the Oneric packages.

Related branches

Revision history for this message
Jared Biel (jared-biel) wrote :

I just took a look at upstream (Debian) and the my.conf files in both oldstable (Lenny) and stable (Squeeze) do not manually specify an error log file. This is "correct" behavior as understood by the logrotate conf file.

Jared Biel (jared-biel)
description: updated
Revision history for this message
Ben Howard (darkmuggle-deactivatedaccount) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please execute the following command, as it will automatically gather debugging information, in a terminal:
apport-collect 879560

When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs.

Changed in mysql-5.1 (Ubuntu):
status: New → Incomplete
Revision history for this message
Jared Biel (jared-biel) wrote :

Hi Ben,

This isn't a bug that affects running processes. It's a packaging bug.

Thanks

Changed in mysql-5.1 (Ubuntu):
status: Incomplete → New
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Jared, apport-collect has very little to do with running processes. It will feed us back the exact versions of packages you have installed so we can check to see in what version this problem may have been introduced and that it hasn't been fixed in more recent versions.

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Ok, this bug was introduced in mysql-dfsg-5.1 version 5.1.37-1ubuntu6, this changelog entry:

  * debian/additions/my.cnf:
    - Remove pid declaration
    - Set up error logging to /var/log/mysql since we're not piping
      anything around logger anymore.

The old init script piped mysql's stderr to syslog with

ERR_LOGGER="logger -p daemon.err -t /etc/init.d/mysql -i"

This should have included an addition to mysql-server-5.1.mysql-server.logrotate to add this new error log, but it did not.

I've confirmed it still exists in the latest version of the mysql-5.1 package. Marking as Triaged, as this is an Ubuntu-specific issue and does not need any further forwarding. Setting importance to Medium, as mysql actually doesn't print many errors unless it is *extremely* broken, otherwise we might have heard about this sooner (this change is just under 2 years old and has been in the wild since 10.04 was released 18 months ago.)

Because this is a small, clear change, I will also nominate it for SRU to lucid.

Changed in mysql-5.1 (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Changed in mysql-dfsg-5.1 (Ubuntu Lucid):
importance: Undecided → Medium
status: New → Triaged
Changed in mysql-5.1 (Ubuntu Lucid):
status: New → Invalid
tags: added: bitesize
Changed in mysql-dfsg-5.1 (Ubuntu):
status: New → Invalid
Changed in mysql-dfsg-5.1 (Ubuntu Maverick):
status: New → Invalid
Changed in mysql-dfsg-5.1 (Ubuntu Natty):
status: New → Invalid
Changed in mysql-dfsg-5.1 (Ubuntu Oneiric):
status: New → Invalid
Changed in mysql-5.1 (Ubuntu Maverick):
status: New → Won't Fix
Changed in mysql-5.1 (Ubuntu Natty):
status: New → Won't Fix
Changed in mysql-5.1 (Ubuntu Oneiric):
status: New → Won't Fix
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

(please note that mysql-dfsg-5.1 was renamed to mysql-5.1 in the 10.10 release, hence the split between the tasks)

Revision history for this message
James Page (james-page) wrote :

mysql-5.1 has been dropped from precise - marking dev task as 'Invalid'.

Changed in mysql-5.1 (Ubuntu):
status: Triaged → Invalid
Revision history for this message
Nathan Bird (ecthellion) wrote :

Seeing this on a new installation of mysql server 5.5 in Precise as well. I see this on all my ubuntu servers Lucid -> Precise-- on some of the lucid ones i see one mysql.log.old

The largest I see any of them are about ~35KB most in 10-20KB.

mysql-server 5.5.24-0ubuntu0.12.04.1

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Nathan, you must have a modified /etc/mysql/my.cnf then. log_error is not set in any of the 5.5 packages for precise or quantal, so there should actually be no error log being written. I have a fix committed to the packaging branch for that (bug #1014732) .. and this log rotate will also be fixed.

Changed in mysql-5.5 (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mysql-5.5 - 5.5.25a-0ubuntu1

---------------
mysql-5.5 (5.5.25a-0ubuntu1) quantal; urgency=low

  [ Clint Byrum ]
  * New upstream release.
  * d/additions/my.cnf: Ensure mysql errors are written to log file.
    (LP: #1014732)
  * d/mysql-server-5.5.mysql-server.logrotate: Add
    /var/log/mysql/error.log so it is rotated properly. (LP: #879560)
  * d/control: remove Vcs-* as they are inaccurate in Ubuntu.
  * d/rules: use WITH_SSL=bundled to ensure that we do not accidentally
    build against openssl.
  * d/control, d/rules: cherry pick fix from Debian to use gcc 4.4 only
    for i386 to work around problems with yaSSL assembly (LP: #1012139)

  [ Matthieu Baerts (matttbe) ]
  * Update apport hook for python3 ; patch by Edward Donovan (LP: #1013171)
 -- Clint Byrum <email address hidden> Thu, 19 Jul 2012 16:14:50 -0700

Changed in mysql-5.5 (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Rolf Leggewie (r0lf) wrote :

Maverick has long since stopped to receive any updates. Marking the Maverick task for this ticket as "Won't Fix".

Changed in mysql-5.5 (Ubuntu Maverick):
status: New → Won't Fix
Changed in mysql-5.5 (Ubuntu Natty):
status: New → Won't Fix
Changed in mysql-5.5 (Ubuntu Oneiric):
status: New → Won't Fix
Revision history for this message
Rolf Leggewie (r0lf) wrote :

lucid has seen the end of its life and is no longer receiving any updates. Marking the lucid task for this ticket as "Won't Fix".

Changed in mysql-dfsg-5.1 (Ubuntu Lucid):
status: Triaged → Won't Fix
Rolf Leggewie (r0lf)
Changed in mysql-5.5 (Ubuntu Lucid):
status: New → Won't Fix
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.