Code review comment for lp:~ebergen/maria/mysqld_safe_fix

Revision history for this message
Michael Widenius (monty) wrote :

Hi!

>>>>> "Eric" == Eric Bergen <email address hidden> writes:

Eric> Eric Bergen has proposed merging lp:~ebergen/maria/mysqld_safe_fix into lp:maria.
Eric> Requested reviews:
Eric> Maria-captains (maria-captains)

Eric> For more details, see:
Eric> https://code.launchpad.net/~ebergen/maria/mysqld_safe_fix/+merge/150210

Eric> This contains two changes to mysqld_safe.sh

Eric> The first adds an option --crash-script for a script to call when mysqld crashes. This can be useful for gathering extra information, notifying operators, or triggering a failover when using HA.

This part is ok.

Eric> The second removes a rm command that deleted the sock file. This could delete the sock file for another instance when MYSQL_UNIX_PORT environment variable is set.

What you removed was:

- rm -f $safe_mysql_unix_port "$pid_file" # Some extra safety

You can't remove the delation of "$pid_file";

Without that mysqld_safe.sh will not properly.

There is one problem with not removing the socket port:
- If you don't do that, mysqld will not restart from a crash as the
old socket file will stop the server from starting.

Eric> This caused problems for me because I use a non-standard installation. Upgrading the MariaDB-Server rpm would delete the sock file from my relocated mysqld leaving it orphaned.

If you specify "socket" in your my.cnf, this should never go wrong.

If you don't specify "socket" and you have another MySQL server
running, your new server should not start as the socket file would be
conflicting.

Can you please describe in litte more detail how your installation
looked like where you got conflicting socket names?

I will wait with applying your crash-script option until we find a
solution for the above.

Regards,
Monty

« Back to merge proposal