Commit 0bf40b3e authored by Bjorn Munch's avatar Bjorn Munch

Bug #40406 Please make mtr print better messages when servers fail to start

Added some more details to warning messages, this should be enough.
parent ad1824ee
...@@ -116,18 +116,20 @@ sub sleep_until_file_created ($$$) { ...@@ -116,18 +116,20 @@ sub sleep_until_file_created ($$$) {
return 1; return 1;
} }
my $seconds= ($loop * $sleeptime) / 1000;
# Check if it died after the fork() was successful # Check if it died after the fork() was successful
if ( defined $proc and ! $proc->wait_one(0) ) if ( defined $proc and ! $proc->wait_one(0) )
{ {
mtr_warning("Process $proc died"); mtr_warning("Process $proc died after mysql-test-run waited $seconds " .
"seconds for $pidfile to be created.");
return 0; return 0;
} }
mtr_debug("Sleep $sleeptime milliseconds waiting for $pidfile"); mtr_debug("Sleep $sleeptime milliseconds waiting for $pidfile");
# Print extra message every 60 seconds # Print extra message every 60 seconds
my $seconds= ($loop * $sleeptime) / 1000; if ( $seconds > 1 && int($seconds * 10) % 600 == 0 && $seconds < $timeout )
if ( $seconds > 1 and int($seconds * 10) % 600 == 0 )
{ {
my $left= $timeout - $seconds; my $left= $timeout - $seconds;
mtr_warning("Waited $seconds seconds for $pidfile to be created, " . mtr_warning("Waited $seconds seconds for $pidfile to be created, " .
...@@ -138,6 +140,8 @@ sub sleep_until_file_created ($$$) { ...@@ -138,6 +140,8 @@ sub sleep_until_file_created ($$$) {
} }
mtr_warning("Timeout after mysql-test-run waited $timeout seconds " .
"for the process $proc to create a pid file.");
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment