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

Ghadi Rahme 2120936 at bugs.launchpad.net
Sat Sep 6 12:23:27 UTC 2025


Autopkgtests failure for libreoffice on jammy are unrelated to mysql and
are an issue with the builder:

```
2940s Processing triggers for libc-bin (2.35-0ubuntu3.10) ...
4282s autopkgtest-virt-ssh [21:22:08]: copydown destination failed, status 255
4286s autopkgtest-virt-ssh [21:22:12]: ------- nova console-log 41dfa0ec-7aa0-4dfe-8654-add7143763fd (adt-jammy-ppc64el-libreoffice-20250902-163202-juju-7f2275-prod-proposed-migration-environment-20-2e8f6896-4f18-40da-bbe8-2dda8a08f0d6) ------
4286s ERROR (CommandError): No server with a name or ID of '41dfa0ec-7aa0-4dfe-8654-add7143763fd' exists.
4286s ---------------------------------------------------
4286s ------- nova show 41dfa0ec-7aa0-4dfe-8654-add7143763fd (adt-jammy-ppc64el-libreoffice-20250902-163202-juju-7f2275-prod-proposed-migration-environment-20-2e8f6896-4f18-40da-bbe8-2dda8a08f0d6) ------
4286s ERROR (CommandError): No server with a name or ID of '41dfa0ec-7aa0-4dfe-8654-add7143763fd' exists.
4286s ---------------------------------------------------
4286s 
6911s autopkgtest [22:05:57]: ERROR: testbed failure: sent `auxverb_debug_fail', got `copy-failed', expected `ok...'
```


Failures on noble are also unrelated to the patch.

-- 
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