mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-12 14:18:32 +00:00
Update VersionCheck in all tools.
This commit is contained in:
@@ -4371,10 +4371,11 @@ local $Data::Dumper::Indent = 1;
|
||||
local $Data::Dumper::Sortkeys = 1;
|
||||
local $Data::Dumper::Quotekeys = 0;
|
||||
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use File::Basename qw();
|
||||
use File::Spec;
|
||||
use FindBin qw();
|
||||
|
||||
eval {
|
||||
require Percona::Toolkit;
|
||||
@@ -4414,12 +4415,14 @@ sub version_check {
|
||||
my $instances = $args{instances} || [];
|
||||
my $instances_to_check;
|
||||
|
||||
eval {
|
||||
if (exists $ENV{PERCONA_VERSION_CHECK} && !$ENV{PERCONA_VERSION_CHECK}) {
|
||||
PTDEBUG && _d('--version-check disabled by PERCONA_VERSION_CHECK=0');
|
||||
if ( !$args{force} ) {
|
||||
if ( $FindBin::Bin && -d "$FindBin::Bin/../.bzr" ) {
|
||||
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
eval {
|
||||
foreach my $instance ( @$instances ) {
|
||||
my ($name, $id) = get_instance_id($instance);
|
||||
$instance->{name} = $name;
|
||||
@@ -4467,15 +4470,17 @@ sub version_check {
|
||||
PTDEBUG && _d('Version check failed:', $EVAL_ERROR);
|
||||
}
|
||||
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
if ( @$instances_to_check ) {
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
if ( $ENV{PTDEBUG_VERSION_CHECK} ) {
|
||||
|
@@ -3287,10 +3287,11 @@ local $Data::Dumper::Indent = 1;
|
||||
local $Data::Dumper::Sortkeys = 1;
|
||||
local $Data::Dumper::Quotekeys = 0;
|
||||
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use File::Basename qw();
|
||||
use File::Spec;
|
||||
use FindBin qw();
|
||||
|
||||
eval {
|
||||
require Percona::Toolkit;
|
||||
@@ -3330,12 +3331,14 @@ sub version_check {
|
||||
my $instances = $args{instances} || [];
|
||||
my $instances_to_check;
|
||||
|
||||
eval {
|
||||
if (exists $ENV{PERCONA_VERSION_CHECK} && !$ENV{PERCONA_VERSION_CHECK}) {
|
||||
PTDEBUG && _d('--version-check disabled by PERCONA_VERSION_CHECK=0');
|
||||
if ( !$args{force} ) {
|
||||
if ( $FindBin::Bin && -d "$FindBin::Bin/../.bzr" ) {
|
||||
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
eval {
|
||||
foreach my $instance ( @$instances ) {
|
||||
my ($name, $id) = get_instance_id($instance);
|
||||
$instance->{name} = $name;
|
||||
@@ -3383,15 +3386,17 @@ sub version_check {
|
||||
PTDEBUG && _d('Version check failed:', $EVAL_ERROR);
|
||||
}
|
||||
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
if ( @$instances_to_check ) {
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
if ( $ENV{PTDEBUG_VERSION_CHECK} ) {
|
||||
|
@@ -4182,10 +4182,11 @@ local $Data::Dumper::Indent = 1;
|
||||
local $Data::Dumper::Sortkeys = 1;
|
||||
local $Data::Dumper::Quotekeys = 0;
|
||||
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use File::Basename qw();
|
||||
use File::Spec;
|
||||
use FindBin qw();
|
||||
|
||||
eval {
|
||||
require Percona::Toolkit;
|
||||
@@ -4225,12 +4226,14 @@ sub version_check {
|
||||
my $instances = $args{instances} || [];
|
||||
my $instances_to_check;
|
||||
|
||||
eval {
|
||||
if (exists $ENV{PERCONA_VERSION_CHECK} && !$ENV{PERCONA_VERSION_CHECK}) {
|
||||
PTDEBUG && _d('--version-check disabled by PERCONA_VERSION_CHECK=0');
|
||||
if ( !$args{force} ) {
|
||||
if ( $FindBin::Bin && -d "$FindBin::Bin/../.bzr" ) {
|
||||
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
eval {
|
||||
foreach my $instance ( @$instances ) {
|
||||
my ($name, $id) = get_instance_id($instance);
|
||||
$instance->{name} = $name;
|
||||
@@ -4278,15 +4281,17 @@ sub version_check {
|
||||
PTDEBUG && _d('Version check failed:', $EVAL_ERROR);
|
||||
}
|
||||
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
if ( @$instances_to_check ) {
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
if ( $ENV{PTDEBUG_VERSION_CHECK} ) {
|
||||
|
@@ -4043,10 +4043,11 @@ local $Data::Dumper::Indent = 1;
|
||||
local $Data::Dumper::Sortkeys = 1;
|
||||
local $Data::Dumper::Quotekeys = 0;
|
||||
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use File::Basename qw();
|
||||
use File::Spec;
|
||||
use FindBin qw();
|
||||
|
||||
eval {
|
||||
require Percona::Toolkit;
|
||||
@@ -4086,12 +4087,14 @@ sub version_check {
|
||||
my $instances = $args{instances} || [];
|
||||
my $instances_to_check;
|
||||
|
||||
eval {
|
||||
if (exists $ENV{PERCONA_VERSION_CHECK} && !$ENV{PERCONA_VERSION_CHECK}) {
|
||||
PTDEBUG && _d('--version-check disabled by PERCONA_VERSION_CHECK=0');
|
||||
if ( !$args{force} ) {
|
||||
if ( $FindBin::Bin && -d "$FindBin::Bin/../.bzr" ) {
|
||||
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
eval {
|
||||
foreach my $instance ( @$instances ) {
|
||||
my ($name, $id) = get_instance_id($instance);
|
||||
$instance->{name} = $name;
|
||||
@@ -4139,15 +4142,17 @@ sub version_check {
|
||||
PTDEBUG && _d('Version check failed:', $EVAL_ERROR);
|
||||
}
|
||||
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
if ( @$instances_to_check ) {
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
if ( $ENV{PTDEBUG_VERSION_CHECK} ) {
|
||||
|
33
bin/pt-find
33
bin/pt-find
@@ -2855,10 +2855,11 @@ local $Data::Dumper::Indent = 1;
|
||||
local $Data::Dumper::Sortkeys = 1;
|
||||
local $Data::Dumper::Quotekeys = 0;
|
||||
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use File::Basename qw();
|
||||
use File::Spec;
|
||||
use FindBin qw();
|
||||
|
||||
eval {
|
||||
require Percona::Toolkit;
|
||||
@@ -2898,12 +2899,14 @@ sub version_check {
|
||||
my $instances = $args{instances} || [];
|
||||
my $instances_to_check;
|
||||
|
||||
eval {
|
||||
if (exists $ENV{PERCONA_VERSION_CHECK} && !$ENV{PERCONA_VERSION_CHECK}) {
|
||||
PTDEBUG && _d('--version-check disabled by PERCONA_VERSION_CHECK=0');
|
||||
if ( !$args{force} ) {
|
||||
if ( $FindBin::Bin && -d "$FindBin::Bin/../.bzr" ) {
|
||||
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
eval {
|
||||
foreach my $instance ( @$instances ) {
|
||||
my ($name, $id) = get_instance_id($instance);
|
||||
$instance->{name} = $name;
|
||||
@@ -2951,15 +2954,17 @@ sub version_check {
|
||||
PTDEBUG && _d('Version check failed:', $EVAL_ERROR);
|
||||
}
|
||||
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
if ( @$instances_to_check ) {
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
if ( $ENV{PTDEBUG_VERSION_CHECK} ) {
|
||||
|
@@ -2797,10 +2797,11 @@ local $Data::Dumper::Indent = 1;
|
||||
local $Data::Dumper::Sortkeys = 1;
|
||||
local $Data::Dumper::Quotekeys = 0;
|
||||
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use File::Basename qw();
|
||||
use File::Spec;
|
||||
use FindBin qw();
|
||||
|
||||
eval {
|
||||
require Percona::Toolkit;
|
||||
@@ -2840,12 +2841,14 @@ sub version_check {
|
||||
my $instances = $args{instances} || [];
|
||||
my $instances_to_check;
|
||||
|
||||
eval {
|
||||
if (exists $ENV{PERCONA_VERSION_CHECK} && !$ENV{PERCONA_VERSION_CHECK}) {
|
||||
PTDEBUG && _d('--version-check disabled by PERCONA_VERSION_CHECK=0');
|
||||
if ( !$args{force} ) {
|
||||
if ( $FindBin::Bin && -d "$FindBin::Bin/../.bzr" ) {
|
||||
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
eval {
|
||||
foreach my $instance ( @$instances ) {
|
||||
my ($name, $id) = get_instance_id($instance);
|
||||
$instance->{name} = $name;
|
||||
@@ -2893,15 +2896,17 @@ sub version_check {
|
||||
PTDEBUG && _d('Version check failed:', $EVAL_ERROR);
|
||||
}
|
||||
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
if ( @$instances_to_check ) {
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
if ( $ENV{PTDEBUG_VERSION_CHECK} ) {
|
||||
|
@@ -4023,10 +4023,11 @@ local $Data::Dumper::Indent = 1;
|
||||
local $Data::Dumper::Sortkeys = 1;
|
||||
local $Data::Dumper::Quotekeys = 0;
|
||||
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use File::Basename qw();
|
||||
use File::Spec;
|
||||
use FindBin qw();
|
||||
|
||||
eval {
|
||||
require Percona::Toolkit;
|
||||
@@ -4066,12 +4067,14 @@ sub version_check {
|
||||
my $instances = $args{instances} || [];
|
||||
my $instances_to_check;
|
||||
|
||||
eval {
|
||||
if (exists $ENV{PERCONA_VERSION_CHECK} && !$ENV{PERCONA_VERSION_CHECK}) {
|
||||
PTDEBUG && _d('--version-check disabled by PERCONA_VERSION_CHECK=0');
|
||||
if ( !$args{force} ) {
|
||||
if ( $FindBin::Bin && -d "$FindBin::Bin/../.bzr" ) {
|
||||
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
eval {
|
||||
foreach my $instance ( @$instances ) {
|
||||
my ($name, $id) = get_instance_id($instance);
|
||||
$instance->{name} = $name;
|
||||
@@ -4119,15 +4122,17 @@ sub version_check {
|
||||
PTDEBUG && _d('Version check failed:', $EVAL_ERROR);
|
||||
}
|
||||
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
if ( @$instances_to_check ) {
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
if ( $ENV{PTDEBUG_VERSION_CHECK} ) {
|
||||
|
@@ -5498,10 +5498,11 @@ local $Data::Dumper::Indent = 1;
|
||||
local $Data::Dumper::Sortkeys = 1;
|
||||
local $Data::Dumper::Quotekeys = 0;
|
||||
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use File::Basename qw();
|
||||
use File::Spec;
|
||||
use FindBin qw();
|
||||
|
||||
eval {
|
||||
require Percona::Toolkit;
|
||||
@@ -5541,12 +5542,14 @@ sub version_check {
|
||||
my $instances = $args{instances} || [];
|
||||
my $instances_to_check;
|
||||
|
||||
eval {
|
||||
if (exists $ENV{PERCONA_VERSION_CHECK} && !$ENV{PERCONA_VERSION_CHECK}) {
|
||||
PTDEBUG && _d('--version-check disabled by PERCONA_VERSION_CHECK=0');
|
||||
if ( !$args{force} ) {
|
||||
if ( $FindBin::Bin && -d "$FindBin::Bin/../.bzr" ) {
|
||||
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
eval {
|
||||
foreach my $instance ( @$instances ) {
|
||||
my ($name, $id) = get_instance_id($instance);
|
||||
$instance->{name} = $name;
|
||||
@@ -5594,15 +5597,17 @@ sub version_check {
|
||||
PTDEBUG && _d('Version check failed:', $EVAL_ERROR);
|
||||
}
|
||||
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
if ( @$instances_to_check ) {
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
if ( $ENV{PTDEBUG_VERSION_CHECK} ) {
|
||||
|
33
bin/pt-kill
33
bin/pt-kill
@@ -5720,10 +5720,11 @@ local $Data::Dumper::Indent = 1;
|
||||
local $Data::Dumper::Sortkeys = 1;
|
||||
local $Data::Dumper::Quotekeys = 0;
|
||||
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use File::Basename qw();
|
||||
use File::Spec;
|
||||
use FindBin qw();
|
||||
|
||||
eval {
|
||||
require Percona::Toolkit;
|
||||
@@ -5763,12 +5764,14 @@ sub version_check {
|
||||
my $instances = $args{instances} || [];
|
||||
my $instances_to_check;
|
||||
|
||||
eval {
|
||||
if (exists $ENV{PERCONA_VERSION_CHECK} && !$ENV{PERCONA_VERSION_CHECK}) {
|
||||
PTDEBUG && _d('--version-check disabled by PERCONA_VERSION_CHECK=0');
|
||||
if ( !$args{force} ) {
|
||||
if ( $FindBin::Bin && -d "$FindBin::Bin/../.bzr" ) {
|
||||
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
eval {
|
||||
foreach my $instance ( @$instances ) {
|
||||
my ($name, $id) = get_instance_id($instance);
|
||||
$instance->{name} = $name;
|
||||
@@ -5816,15 +5819,17 @@ sub version_check {
|
||||
PTDEBUG && _d('Version check failed:', $EVAL_ERROR);
|
||||
}
|
||||
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
if ( @$instances_to_check ) {
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
if ( $ENV{PTDEBUG_VERSION_CHECK} ) {
|
||||
|
@@ -7170,10 +7170,11 @@ local $Data::Dumper::Indent = 1;
|
||||
local $Data::Dumper::Sortkeys = 1;
|
||||
local $Data::Dumper::Quotekeys = 0;
|
||||
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use File::Basename qw();
|
||||
use File::Spec;
|
||||
use FindBin qw();
|
||||
|
||||
eval {
|
||||
require Percona::Toolkit;
|
||||
@@ -7213,12 +7214,14 @@ sub version_check {
|
||||
my $instances = $args{instances} || [];
|
||||
my $instances_to_check;
|
||||
|
||||
eval {
|
||||
if (exists $ENV{PERCONA_VERSION_CHECK} && !$ENV{PERCONA_VERSION_CHECK}) {
|
||||
PTDEBUG && _d('--version-check disabled by PERCONA_VERSION_CHECK=0');
|
||||
if ( !$args{force} ) {
|
||||
if ( $FindBin::Bin && -d "$FindBin::Bin/../.bzr" ) {
|
||||
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
eval {
|
||||
foreach my $instance ( @$instances ) {
|
||||
my ($name, $id) = get_instance_id($instance);
|
||||
$instance->{name} = $name;
|
||||
@@ -7266,15 +7269,17 @@ sub version_check {
|
||||
PTDEBUG && _d('Version check failed:', $EVAL_ERROR);
|
||||
}
|
||||
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
if ( @$instances_to_check ) {
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
if ( $ENV{PTDEBUG_VERSION_CHECK} ) {
|
||||
|
@@ -7453,10 +7453,11 @@ local $Data::Dumper::Indent = 1;
|
||||
local $Data::Dumper::Sortkeys = 1;
|
||||
local $Data::Dumper::Quotekeys = 0;
|
||||
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use File::Basename qw();
|
||||
use File::Spec;
|
||||
use FindBin qw();
|
||||
|
||||
eval {
|
||||
require Percona::Toolkit;
|
||||
@@ -7496,12 +7497,14 @@ sub version_check {
|
||||
my $instances = $args{instances} || [];
|
||||
my $instances_to_check;
|
||||
|
||||
eval {
|
||||
if (exists $ENV{PERCONA_VERSION_CHECK} && !$ENV{PERCONA_VERSION_CHECK}) {
|
||||
PTDEBUG && _d('--version-check disabled by PERCONA_VERSION_CHECK=0');
|
||||
if ( !$args{force} ) {
|
||||
if ( $FindBin::Bin && -d "$FindBin::Bin/../.bzr" ) {
|
||||
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
eval {
|
||||
foreach my $instance ( @$instances ) {
|
||||
my ($name, $id) = get_instance_id($instance);
|
||||
$instance->{name} = $name;
|
||||
@@ -7549,15 +7552,17 @@ sub version_check {
|
||||
PTDEBUG && _d('Version check failed:', $EVAL_ERROR);
|
||||
}
|
||||
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
if ( @$instances_to_check ) {
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
if ( $ENV{PTDEBUG_VERSION_CHECK} ) {
|
||||
|
@@ -13082,10 +13082,11 @@ local $Data::Dumper::Indent = 1;
|
||||
local $Data::Dumper::Sortkeys = 1;
|
||||
local $Data::Dumper::Quotekeys = 0;
|
||||
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use File::Basename qw();
|
||||
use File::Spec;
|
||||
use FindBin qw();
|
||||
|
||||
eval {
|
||||
require Percona::Toolkit;
|
||||
@@ -13125,12 +13126,14 @@ sub version_check {
|
||||
my $instances = $args{instances} || [];
|
||||
my $instances_to_check;
|
||||
|
||||
eval {
|
||||
if (exists $ENV{PERCONA_VERSION_CHECK} && !$ENV{PERCONA_VERSION_CHECK}) {
|
||||
PTDEBUG && _d('--version-check disabled by PERCONA_VERSION_CHECK=0');
|
||||
if ( !$args{force} ) {
|
||||
if ( $FindBin::Bin && -d "$FindBin::Bin/../.bzr" ) {
|
||||
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
eval {
|
||||
foreach my $instance ( @$instances ) {
|
||||
my ($name, $id) = get_instance_id($instance);
|
||||
$instance->{name} = $name;
|
||||
@@ -13178,15 +13181,17 @@ sub version_check {
|
||||
PTDEBUG && _d('Version check failed:', $EVAL_ERROR);
|
||||
}
|
||||
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
if ( @$instances_to_check ) {
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
if ( $ENV{PTDEBUG_VERSION_CHECK} ) {
|
||||
|
@@ -3398,10 +3398,11 @@ local $Data::Dumper::Indent = 1;
|
||||
local $Data::Dumper::Sortkeys = 1;
|
||||
local $Data::Dumper::Quotekeys = 0;
|
||||
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use File::Basename qw();
|
||||
use File::Spec;
|
||||
use FindBin qw();
|
||||
|
||||
eval {
|
||||
require Percona::Toolkit;
|
||||
@@ -3441,12 +3442,14 @@ sub version_check {
|
||||
my $instances = $args{instances} || [];
|
||||
my $instances_to_check;
|
||||
|
||||
eval {
|
||||
if (exists $ENV{PERCONA_VERSION_CHECK} && !$ENV{PERCONA_VERSION_CHECK}) {
|
||||
PTDEBUG && _d('--version-check disabled by PERCONA_VERSION_CHECK=0');
|
||||
if ( !$args{force} ) {
|
||||
if ( $FindBin::Bin && -d "$FindBin::Bin/../.bzr" ) {
|
||||
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
eval {
|
||||
foreach my $instance ( @$instances ) {
|
||||
my ($name, $id) = get_instance_id($instance);
|
||||
$instance->{name} = $name;
|
||||
@@ -3494,15 +3497,17 @@ sub version_check {
|
||||
PTDEBUG && _d('Version check failed:', $EVAL_ERROR);
|
||||
}
|
||||
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
if ( @$instances_to_check ) {
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
if ( $ENV{PTDEBUG_VERSION_CHECK} ) {
|
||||
|
@@ -4022,10 +4022,11 @@ local $Data::Dumper::Indent = 1;
|
||||
local $Data::Dumper::Sortkeys = 1;
|
||||
local $Data::Dumper::Quotekeys = 0;
|
||||
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use File::Basename qw();
|
||||
use File::Spec;
|
||||
use FindBin qw();
|
||||
|
||||
eval {
|
||||
require Percona::Toolkit;
|
||||
@@ -4065,12 +4066,14 @@ sub version_check {
|
||||
my $instances = $args{instances} || [];
|
||||
my $instances_to_check;
|
||||
|
||||
eval {
|
||||
if (exists $ENV{PERCONA_VERSION_CHECK} && !$ENV{PERCONA_VERSION_CHECK}) {
|
||||
PTDEBUG && _d('--version-check disabled by PERCONA_VERSION_CHECK=0');
|
||||
if ( !$args{force} ) {
|
||||
if ( $FindBin::Bin && -d "$FindBin::Bin/../.bzr" ) {
|
||||
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
eval {
|
||||
foreach my $instance ( @$instances ) {
|
||||
my ($name, $id) = get_instance_id($instance);
|
||||
$instance->{name} = $name;
|
||||
@@ -4118,15 +4121,17 @@ sub version_check {
|
||||
PTDEBUG && _d('Version check failed:', $EVAL_ERROR);
|
||||
}
|
||||
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
if ( @$instances_to_check ) {
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
if ( $ENV{PTDEBUG_VERSION_CHECK} ) {
|
||||
|
@@ -736,10 +736,11 @@ local $Data::Dumper::Indent = 1;
|
||||
local $Data::Dumper::Sortkeys = 1;
|
||||
local $Data::Dumper::Quotekeys = 0;
|
||||
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use File::Basename qw();
|
||||
use File::Spec;
|
||||
use FindBin qw();
|
||||
|
||||
eval {
|
||||
require Percona::Toolkit;
|
||||
@@ -779,12 +780,14 @@ sub version_check {
|
||||
my $instances = $args{instances} || [];
|
||||
my $instances_to_check;
|
||||
|
||||
eval {
|
||||
if (exists $ENV{PERCONA_VERSION_CHECK} && !$ENV{PERCONA_VERSION_CHECK}) {
|
||||
PTDEBUG && _d('--version-check disabled by PERCONA_VERSION_CHECK=0');
|
||||
if ( !$args{force} ) {
|
||||
if ( $FindBin::Bin && -d "$FindBin::Bin/../.bzr" ) {
|
||||
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
eval {
|
||||
foreach my $instance ( @$instances ) {
|
||||
my ($name, $id) = get_instance_id($instance);
|
||||
$instance->{name} = $name;
|
||||
@@ -832,15 +835,17 @@ sub version_check {
|
||||
PTDEBUG && _d('Version check failed:', $EVAL_ERROR);
|
||||
}
|
||||
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
if ( @$instances_to_check ) {
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
if ( $ENV{PTDEBUG_VERSION_CHECK} ) {
|
||||
|
@@ -8860,10 +8860,11 @@ local $Data::Dumper::Indent = 1;
|
||||
local $Data::Dumper::Sortkeys = 1;
|
||||
local $Data::Dumper::Quotekeys = 0;
|
||||
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use File::Basename qw();
|
||||
use File::Spec;
|
||||
use FindBin qw();
|
||||
|
||||
eval {
|
||||
require Percona::Toolkit;
|
||||
@@ -8903,12 +8904,14 @@ sub version_check {
|
||||
my $instances = $args{instances} || [];
|
||||
my $instances_to_check;
|
||||
|
||||
eval {
|
||||
if (exists $ENV{PERCONA_VERSION_CHECK} && !$ENV{PERCONA_VERSION_CHECK}) {
|
||||
PTDEBUG && _d('--version-check disabled by PERCONA_VERSION_CHECK=0');
|
||||
if ( !$args{force} ) {
|
||||
if ( $FindBin::Bin && -d "$FindBin::Bin/../.bzr" ) {
|
||||
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
eval {
|
||||
foreach my $instance ( @$instances ) {
|
||||
my ($name, $id) = get_instance_id($instance);
|
||||
$instance->{name} = $name;
|
||||
@@ -8956,15 +8959,17 @@ sub version_check {
|
||||
PTDEBUG && _d('Version check failed:', $EVAL_ERROR);
|
||||
}
|
||||
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
if ( @$instances_to_check ) {
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
if ( $ENV{PTDEBUG_VERSION_CHECK} ) {
|
||||
|
@@ -11679,10 +11679,11 @@ local $Data::Dumper::Indent = 1;
|
||||
local $Data::Dumper::Sortkeys = 1;
|
||||
local $Data::Dumper::Quotekeys = 0;
|
||||
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use File::Basename qw();
|
||||
use File::Spec;
|
||||
use FindBin qw();
|
||||
|
||||
eval {
|
||||
require Percona::Toolkit;
|
||||
@@ -11722,12 +11723,14 @@ sub version_check {
|
||||
my $instances = $args{instances} || [];
|
||||
my $instances_to_check;
|
||||
|
||||
eval {
|
||||
if (exists $ENV{PERCONA_VERSION_CHECK} && !$ENV{PERCONA_VERSION_CHECK}) {
|
||||
PTDEBUG && _d('--version-check disabled by PERCONA_VERSION_CHECK=0');
|
||||
if ( !$args{force} ) {
|
||||
if ( $FindBin::Bin && -d "$FindBin::Bin/../.bzr" ) {
|
||||
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
eval {
|
||||
foreach my $instance ( @$instances ) {
|
||||
my ($name, $id) = get_instance_id($instance);
|
||||
$instance->{name} = $name;
|
||||
@@ -11775,15 +11778,17 @@ sub version_check {
|
||||
PTDEBUG && _d('Version check failed:', $EVAL_ERROR);
|
||||
}
|
||||
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
if ( @$instances_to_check ) {
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
if ( $ENV{PTDEBUG_VERSION_CHECK} ) {
|
||||
|
@@ -4305,10 +4305,11 @@ local $Data::Dumper::Indent = 1;
|
||||
local $Data::Dumper::Sortkeys = 1;
|
||||
local $Data::Dumper::Quotekeys = 0;
|
||||
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use Digest::MD5 qw(md5_hex);
|
||||
use Sys::Hostname qw(hostname);
|
||||
use File::Basename qw();
|
||||
use File::Spec;
|
||||
use FindBin qw();
|
||||
|
||||
eval {
|
||||
require Percona::Toolkit;
|
||||
@@ -4348,12 +4349,14 @@ sub version_check {
|
||||
my $instances = $args{instances} || [];
|
||||
my $instances_to_check;
|
||||
|
||||
eval {
|
||||
if (exists $ENV{PERCONA_VERSION_CHECK} && !$ENV{PERCONA_VERSION_CHECK}) {
|
||||
PTDEBUG && _d('--version-check disabled by PERCONA_VERSION_CHECK=0');
|
||||
if ( !$args{force} ) {
|
||||
if ( $FindBin::Bin && -d "$FindBin::Bin/../.bzr" ) {
|
||||
PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
eval {
|
||||
foreach my $instance ( @$instances ) {
|
||||
my ($name, $id) = get_instance_id($instance);
|
||||
$instance->{name} = $name;
|
||||
@@ -4401,15 +4404,17 @@ sub version_check {
|
||||
PTDEBUG && _d('Version check failed:', $EVAL_ERROR);
|
||||
}
|
||||
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
if ( @$instances_to_check ) {
|
||||
eval {
|
||||
update_check_times(
|
||||
instances => $instances_to_check,
|
||||
vc_file => $args{vc_file}, # testing
|
||||
now => $args{now}, # testing
|
||||
);
|
||||
};
|
||||
if ( $EVAL_ERROR ) {
|
||||
PTDEBUG && _d('Error updating version check file:', $EVAL_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
if ( $ENV{PTDEBUG_VERSION_CHECK} ) {
|
||||
|
Reference in New Issue
Block a user