The logrotate postscript doesn't work as debian-sys-maint password is not shared between instances.
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/
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/
Now: 2021-12-08 14:10
Last rotated at 2021-12-08 13:13
log needs rotating
rotating log /var/log/
dateext suffix '-20211208'
glob pattern '-[0-9]
renaming /var/log/
old log /var/log/
renaming /var/log/
old log /var/log/
renaming /var/log/
old log /var/log/
renaming /var/log/
old log /var/log/
renaming /var/log/
old log /var/log/
renaming /var/log/
old log /var/log/
renaming /var/log/
old log /var/log/
renaming /var/log/
old log /var/log/
log /var/log/
renaming /var/log/
creating new /var/log/
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
The charm doesn't set up log rotation; I suspect it's a package issue.