Merge lp:~ebergen/maria/mysqld_safe_fix into lp:maria
Status: | Needs review |
---|---|
Proposed branch: | lp:~ebergen/maria/mysqld_safe_fix |
Merge into: | lp:maria |
Diff against target: |
40 lines (+7/-2) 1 file modified
scripts/mysqld_safe.sh (+7/-2) |
To merge this branch: | bzr merge lp:~ebergen/maria/mysqld_safe_fix |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Maria-captains | Pending | ||
Review via email: mp+150210@code.launchpad.net |
Description of the change
This contains two changes to mysqld_safe.sh
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.
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.
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.
Unmerged revisions
- 3504. By Eric Bergen
-
Add --crash-script and remove a rm call that causes problems when MYSQL_UNIX_PORT is set
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: /code.launchpad .net/~ebergen/ maria/mysqld_ safe_fix/ +merge/ 150210
Eric> https:/
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