start/stop/status scripts don't actually check if running
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MySQL Sandbox |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I created a 1M/2S setup with make_replicatio
I then did ~/sandboxes/
This, incorrectly, reported that all 3 nodes were running:
[c_mboehm@test-db3 sandboxes]$ ./status_all
REPLICATION rsandbox_5_5_38
master on
node1 on
node2 on
I did a stop_all to shutdown the slaves and then did start_all to bring them back up and got this:
[c_mboehm@test-db3 sandboxes]$ ./start_all
executing "start" on master
sandbox server already started (found pid file /home/c_
sandbox server started
executing "start" on slave 1
.. sandbox server started
executing "start" on slave 2
. sandbox server started
[c_mboehm@test-db3 sandboxes]$ cat /home/c_
29683
[c_mboehm@test-db3 sandboxes]$ ps -Af |grep 29683
c_mboehm 23778 10338 0 19:47 pts/0 00:00:00 grep 29683
[c_mboehm@test-db3 sandboxes]$
So seems the status scripts are just checking for the existence of a pid file and not actually checking if that pid exists, or even better would be that a connection to that mysql instance can be ping'd (SELECT 1 etc).
Changed in mysql-sandbox: | |
status: | Confirmed → Fix Released |
Thanks for this report. Yes, the status script is too naive. There is a simple fix, which I tested and will be applied soon.