[debian-mysql] Bug#810968: 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
Mon Feb 22 11:00:21 UTC 2016


Hey Otto,
Sorry I totally forgot about this. Yes, I do have an updated patch.
I actually found there to be some issues with containers which had
embedded mysqld forked from the start script so I added an additional
check to the 2) version.

Following problems might exist in the future with this version:
 - When mysqld is called without mysqld_safe
 - Somebody managed to start mysqld as init

So it shouldn't be too much of an issue in general.

Lennart

On Sun, Feb 21, 2016 at 03:48:38PM +0200, Otto Kekäläinen wrote:
> Hello Lennart!
> 
> Do you intend to make one more version of the patch so that it is
> perfect and it is safe for me to include it in the next upload?
> 
> Thanks for your help!
> 
> 2016-01-26 11:13 GMT+02:00 Otto Kekäläinen <otto at seravo.fi>:
> >> 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.
> >
> > Option 2 seems OK. Alternatively we could check processed owned by user 'mysql'.
> >
> > Yes, the solution might be a bit complex, but I am fine with it as
> > long as the bash code is well documented and as clean as possible, so
> > that potential regressions/bugs in future are easy to track down and
> > new people are confident in tweaking the code. Try avoiding long
> > oneliners and short-cut code style (to the extend possible, it is
> > after all bash scripting).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logrotate.patch
Type: text/x-diff
Size: 852 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-mysql-maint/attachments/20160222/809ba097/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-mysql-maint/attachments/20160222/809ba097/attachment.sig>


More information about the pkg-mysql-maint mailing list