Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logrotate config doesn't match layout on disk #523

Open
barryprice opened this issue Sep 21, 2024 · 1 comment
Open

logrotate config doesn't match layout on disk #523

barryprice opened this issue Sep 21, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@barryprice
Copy link

barryprice commented Sep 21, 2024

Steps to reproduce

  1. Deploy (on jammy/amd64 here), and wait for enough workload to generate a lot of logs

Expected behavior

logrotate should rotate mysql's log files to avoid filling the disk

Actual behavior

logrotate looks for files that don't exist, and doesn't rotate the actual log files - which eventually will fill the disk.

logrotate config:

$ grep ^/var /etc/logrotate.d/flush_mysql_logs 
/var/snap/charmed-mysql/common/var/log/mysql/error.log {
/var/snap/charmed-mysql/common/var/log/mysql/general.log {
/var/snap/charmed-mysql/common/var/log/mysql/slowquery.log {

Actual contents of the log directory:

$ ls -l /var/snap/charmed-mysql/common/var/log/mysql/
total 268
drwxrwx--- 2 snap_daemon snap_daemon 122880 Sep 12 07:34 archive_error
drwxrwx--- 2 snap_daemon snap_daemon 139264 Sep 12 07:33 archive_general
drwxrwx--- 2 snap_daemon snap_daemon   4096 Sep 10 13:29 archive_slowquery

We found this file under the archive_general dir recently:

-rw-r----- 1 snap_daemon root 44G Sep 15 23:28 /var/snap/charmed-mysql/common/var/log/mysql/archive_general/general.log-20240912_0733

Versions

Operating system: Ubuntu 22.04.4 LTS

Juju CLI: 2.9.51-ubuntu-amd64

Juju agent: 2.9.49

Charm revision: 8.0/stable / 240

LXD: none

Log output

Juju debug log: not relevant

Additional context

The installed mysql snap is:

charmed-mysql        8.0.36         103    latest/stable  dataplatformbot  held
@barryprice barryprice added the bug Something isn't working label Sep 21, 2024
Copy link

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/DPE-5535.

This message was autogenerated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant