mirror of
https://github.com/MariaDB/server.git
synced 2025-08-05 13:16:09 +03:00
Verbose printouts added
This commit is contained in:
@@ -629,6 +629,10 @@ sub mtr_check_stop_servers ($) {
|
|||||||
{
|
{
|
||||||
mtr_error("we could not kill or clean up all processes");
|
mtr_error("we could not kill or clean up all processes");
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mtr_verbose("All ports where free, continuing");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -736,8 +740,9 @@ sub mtr_ping_with_timeout($) {
|
|||||||
foreach my $srv ( @$spec )
|
foreach my $srv ( @$spec )
|
||||||
{
|
{
|
||||||
$res= 1; # We are optimistic
|
$res= 1; # We are optimistic
|
||||||
if ( $srv->{'pid'} and
|
if ( $srv->{'pid'} and defined $srv->{'port'} )
|
||||||
defined $srv->{'port'} and mtr_ping_port($srv->{'port'}) )
|
{
|
||||||
|
if ( mtr_ping_port($srv->{'port'}) )
|
||||||
{
|
{
|
||||||
mtr_verbose("waiting for process $srv->{'pid'} to stop ".
|
mtr_verbose("waiting for process $srv->{'pid'} to stop ".
|
||||||
"using port $srv->{'port'}");
|
"using port $srv->{'port'}");
|
||||||
@@ -747,6 +752,11 @@ sub mtr_ping_with_timeout($) {
|
|||||||
$res= 0;
|
$res= 0;
|
||||||
next TIME;
|
next TIME;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
# Process was not using port
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
last; # If we got here, we are done
|
last; # If we got here, we are done
|
||||||
}
|
}
|
||||||
@@ -845,6 +855,8 @@ sub stop_reap_all {
|
|||||||
sub mtr_ping_port ($) {
|
sub mtr_ping_port ($) {
|
||||||
my $port= shift;
|
my $port= shift;
|
||||||
|
|
||||||
|
mtr_verbose("mtr_ping_port: $port");
|
||||||
|
|
||||||
my $remote= "localhost";
|
my $remote= "localhost";
|
||||||
my $iaddr= inet_aton($remote);
|
my $iaddr= inet_aton($remote);
|
||||||
if ( ! $iaddr )
|
if ( ! $iaddr )
|
||||||
@@ -860,10 +872,12 @@ sub mtr_ping_port ($) {
|
|||||||
if ( connect(SOCK, $paddr) )
|
if ( connect(SOCK, $paddr) )
|
||||||
{
|
{
|
||||||
close(SOCK); # FIXME check error?
|
close(SOCK); # FIXME check error?
|
||||||
|
mtr_verbose("USED");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
mtr_verbose("FREE");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user