The logrotate postscript doesn't work as debian-sys-maint password is not shared between instances.

Bug #1953626 reported by Mirek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL InnoDB Cluster Charm
Invalid
Undecided
Unassigned
mysql-8.0 (Ubuntu)
New
Undecided
Unassigned

Bug Description

The logrotate postscript doesn't work as debian-sys-maint password is not shared between instances. The error is Access Denied.

Don't know if it's only when I've switched to syslog in charm but I've spotted it after the switch to syslog. The workaround is to set a new password on each node and update /etc/mysql/debian.cnf with a new password.

sudo logrotate -v --force /etc/logrotate.conf
rotating pattern: /var/log/mysql.log /var/log/mysql/*log forced from command line (7 rotations)
empty log files are rotated, old logs are removed
switching euid to 0 and egid to 4
considering log /var/log/mysql.log
  log /var/log/mysql.log does not exist -- skipping
considering log /var/log/mysql/error.log
  Now: 2021-12-08 14:10
  Last rotated at 2021-12-08 13:13
  log needs rotating
rotating log /var/log/mysql/error.log, log->rotateCount is 7
dateext suffix '-20211208'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
renaming /var/log/mysql/error.log.7.gz to /var/log/mysql/error.log.8.gz (rotatecount 7, logstart 1, i 7),
old log /var/log/mysql/error.log.7.gz does not exist
renaming /var/log/mysql/error.log.6.gz to /var/log/mysql/error.log.7.gz (rotatecount 7, logstart 1, i 6),
old log /var/log/mysql/error.log.6.gz does not exist
renaming /var/log/mysql/error.log.5.gz to /var/log/mysql/error.log.6.gz (rotatecount 7, logstart 1, i 5),
old log /var/log/mysql/error.log.5.gz does not exist
renaming /var/log/mysql/error.log.4.gz to /var/log/mysql/error.log.5.gz (rotatecount 7, logstart 1, i 4),
old log /var/log/mysql/error.log.4.gz does not exist
renaming /var/log/mysql/error.log.3.gz to /var/log/mysql/error.log.4.gz (rotatecount 7, logstart 1, i 3),
old log /var/log/mysql/error.log.3.gz does not exist
renaming /var/log/mysql/error.log.2.gz to /var/log/mysql/error.log.3.gz (rotatecount 7, logstart 1, i 2),
old log /var/log/mysql/error.log.2.gz does not exist
renaming /var/log/mysql/error.log.1.gz to /var/log/mysql/error.log.2.gz (rotatecount 7, logstart 1, i 1),
old log /var/log/mysql/error.log.1.gz does not exist
renaming /var/log/mysql/error.log.0.gz to /var/log/mysql/error.log.1.gz (rotatecount 7, logstart 1, i 0),
old log /var/log/mysql/error.log.0.gz does not exist
log /var/log/mysql/error.log.8.gz doesn't exist -- won't try to dispose of it
renaming /var/log/mysql/error.log to /var/log/mysql/error.log.1
creating new /var/log/mysql/error.log mode = 0640 uid = 114 gid = 4
running postrotate script
switching euid to 0 and egid to 0
compressing log with: /bin/gzip
switching uid to 0 and gid to 4
switching euid to 0 and egid to 0

Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

The charm doesn't set up log rotation; I suspect it's a package issue.

Changed in charm-mysql-innodb-cluster:
status: New → Invalid
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.