[debian-mysql] Bug#810968: Bug#810968: mariadb-server-10.0: Logrotate exists 1 if a non-debian mysqld is running (e.g. containerized mysqld)

Lennart Weller lhw at ring0.de
Tue Jan 26 09:02:28 UTC 2016


Well okay I didn't know the config files were being split up.
There are two options of the top of my head:

1) As you said. Just assume the pid file location
2) Check the parent process id being 1
   In this case parent of the parent because of mysqld_safe
   # test $(ps -o ppid= -p $(ps -o ppid= -p $PID)) -eq 1
   This would work in most cases I can think of. mysqld run by a user
   or a container would not be started by the init. But seems like a
   rather complex solution to a fairly simple problem.

January 26 2016 9:18 AM, "Otto Kekäläinen" <otto at seravo.fi> wrote:
> Thanks Lennart, the patch is much nicer to read now.
> 
> It seems to rely on the fact that it should find the line 'pid-file =
> /var/run/mysqld/mysqld.pid' in the file /etc/mysql/my.cnf
> 
> However, since the new mysql/mariadb config decoupling effort (driven
> by Ubuntu developers) the file /etc/mysql/my.cnf is no longer the main
> config file itself, and does not contain the pid line.
> 
> The actual line is now found in:
> grep pid /etc/mysql/mariadb.conf.d/*
> /etc/mysql/mariadb.conf.d/50-server.cnf:pid-file =
> /var/run/mysqld/mysqld.pid
> 
> Ironically simply assuming the exact location
> /var/run/mysqld/mysqld.pid would be more reliable than grepping the
> configs :)
> 
> I am glad the fix works in your situation in Debian Jessie.
> Unfortunately we need to think a bit more to come up with a universal
> solution.. I am happy to review any alternative solutions/patches
> anybody posts to this issue.



More information about the pkg-mysql-maint mailing list