[Bug 2120936] Re: logrotate returns an error if mysql service is disabled

Julian Andres Klode 2120936 at bugs.launchpad.net
Tue Sep 2 09:24:44 UTC 2025


Hello Ghadi, or anyone else affected,

Accepted mysql-8.0 into noble-proposed. The package will build now and
be available at
https://launchpad.net/ubuntu/+source/mysql-8.0/8.0.43-0ubuntu0.24.04.2
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, what testing has been
performed on the package and change the tag from verification-needed-
noble to verification-done-noble. If it does not fix the bug for you,
please add a comment stating that, and change the tag to verification-
failed-noble. 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 for helping!

N.B. The updated package will be released to -updates after the bug(s)
fixed by this package have been verified and the package has been in
-proposed for a minimum of 7 days.

** Changed in: mysql-8.0 (Ubuntu Noble)
       Status: New => Fix Committed

** Tags added: verification-needed-noble

** Changed in: mysql-8.0 (Ubuntu Jammy)
       Status: New => Fix Committed

** Tags added: verification-needed-jammy

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/2120936

Title:
  logrotate returns an error if mysql service is disabled

Status in mysql-8.0 package in Ubuntu:
  New
Status in mysql-8.4 package in Ubuntu:
  Fix Released
Status in mysql-8.0 source package in Jammy:
  Fix Committed
Status in mysql-8.0 source package in Noble:
  Fix Committed
Status in mysql-8.4 source package in Plucky:
  Fix Committed
Status in mysql-8.4 source package in Questing:
  Fix Released

Bug description:
  [Description]

  After the MR part of this bug report:
  https://bugs.launchpad.net/ubuntu/+source/mysql-8.0/+bug/1850980

  logrotate returns an error when running the mysql log rotation script
  if the mysql service is disabled.

  It is expected of logrotate not to return an error if the service is disabled since a disabled service will not generate logs to rotate anyways.
  I have written a fix that checks first the status of the mysql service before running the rest of the log rotate script.

  [Test Plan]

  Run the following commands, and verify the output of logrotate:

  $ sudo apt install mysql-server

  $ sudo systemctl stop mysql.service

  $ sudo logrotate -f /etc/logrotate.conf

  If no error is returned by logrotate it means the fix was successful,
  else the following error is shown:

  error: error running shared postrotate script for '/var/log/mysql.log
  /var/log/mysql/*log '

  
  [Where problems could occur]

  Since the changes is related to logs, possible issues may be that the script falsely detects that the mysql service is disabled and not rotate the logs.
  Any problems resulting from this patch are expected to only be limited to log rotation.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mysql-8.0/+bug/2120936/+subscriptions




More information about the Ubuntu-sponsors mailing list