Logrotate not flushing logs in 5.7

Bug #1632003 reported by Sander van Schie
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
New
Undecided
Unassigned

Bug Description

As noted on https://www.percona.com/doc/percona-server/5.7/installation/apt_repo.html the debian-sys-maint user is no longer created by default in Percona Server 5.7. This however results in a logrotate configuration which doesn't flush logs after rotating the log files.

The postrotate script tries to perform a "/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping", which fails as the debian.cnf is no longer present. After this, it checks if mysqld is running and if so does an exit 1:

        postrotate
                test -x /usr/bin/mysqladmin || exit 0

                # If this fails, check debian.conf!
                MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf"
                if [ -z "`$MYADMIN ping 2>/dev/null`" ]; then
                  # Really no mysqld or rather a missing debian-sys-maint user?
                  # If this occurs and is not a error please report a bug.
                  if ps cax | grep -q mysqld; then
                    exit 1
                  fi
                else
                  $MYADMIN flush-logs
                fi
        endscript

Is this intended and we are supposed to create the user/file ourselves if we want a working logrotate?

Tags: pkg
tags: added: pkg
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-3577

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.