[debian-mysql] Bug#830976: logrotate failures if mysql server is not running

Meik Hellmund Meik.Hellmund at math.uni-leipzig.de
Wed Dec 14 13:42:14 UTC 2016


Package: mariadb-server-10.0
Followup-For: Bug #830976


I got  errors from cron:
 /etc/cron.daily/logrotate:
 logrotate_script: 3: [: /var/run/mysqld/mysqld.pid: unexpected operator

The reason I found: The postrotate script of /etc/logrotate.d/mysql-server
contains 
  my_print_defaults --mysqld | grep -oP "pid-file=\K[^$]+"
and this generates on my machine two identical lines of output:
/var/run/mysqld/mysqld.pid
/var/run/mysqld/mysqld.pid

So I added  " | uniq"  after the grep. Perhaps " | head -n1" 
would be even better. 


-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.8.0-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages mariadb-server-10.0 depends on:
ii  adduser                   3.115
ii  debconf [debconf-2.0]     1.5.59
ii  libaio1                   0.3.110-3
ii  libc6                     2.24-8
ii  libdbi-perl               1.636-1+b1
ii  libpam0g                  1.1.8-3.3
ii  libstdc++6                6.2.1-6
ii  lsb-base                  9.20161125
ii  mariadb-client-10.0       10.0.28-2
ii  mariadb-common            10.0.28-2
ii  mariadb-server-core-10.0  10.0.28-2
ii  passwd                    1:4.2-3.3
ii  perl                      5.24.1~rc4-1
ii  psmisc                    22.21-2.1+b1
ii  zlib1g                    1:1.2.8.dfsg-4

Versions of packages mariadb-server-10.0 recommends:
ii  libhtml-template-perl  2.95-2

Versions of packages mariadb-server-10.0 suggests:
ii  bsd-mailx [mailx]  8.1.2-0.20160123cvs-3
pn  mariadb-test       <none>
pn  tinyca             <none>

-- Configuration Files:
/etc/logrotate.d/mysql-server changed [not included]

-- debconf information excluded



More information about the pkg-mysql-maint mailing list