mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-08 11:07:58 +00:00
Fix crash due to bad localization of var. Update post-install message.
This commit is contained in:
15
bin/pt-agent
15
bin/pt-agent
@@ -8008,12 +8008,11 @@ sub install {
|
||||
my $repeat = $args{repeat};
|
||||
my $done = $args{done};
|
||||
print "OK\n" if $stepno && !$repeat;
|
||||
print "\n" if $repeat;
|
||||
return if $done;
|
||||
printf "Step %d of %d: %s: ",
|
||||
$stepno + 1,
|
||||
$stepno + ($repeat ? 0 : 1),
|
||||
$n_steps,
|
||||
$steps[$stepno];
|
||||
$steps[$repeat ? $stepno - 1 : $stepno];
|
||||
$stepno++ unless $repeat;
|
||||
};
|
||||
|
||||
@@ -8074,7 +8073,7 @@ sub install {
|
||||
die "Sorry, an error occurred while verifying the API key: $e";
|
||||
}
|
||||
elsif ( !$entry_links ) {
|
||||
if ( $client->response && $client->response == 403 ) {
|
||||
if ( $client->response->code && $client->response->code == 403 ) {
|
||||
die "Sorry, the API key $api_key is not valid. Please check the API key and try again.\n";
|
||||
}
|
||||
else {
|
||||
@@ -8102,7 +8101,6 @@ sub install {
|
||||
}
|
||||
$cxn->dbh->disconnect();
|
||||
push @actions, "create-mysql-user: pt_agent,$random_pass";
|
||||
print "OK\n";
|
||||
|
||||
# 5. Save the pt_agent MySQL user info in /etc/percona/agent/my.cnf.
|
||||
# We could set user= and pass= in ~/.pt-agent.conf, but each new agent
|
||||
@@ -8217,9 +8215,8 @@ defaults-file=$agent_my_cnf
|
||||
my $hostname = `hostname`;
|
||||
chomp($hostname);
|
||||
|
||||
print "\nOK: pt-agent is installed and running. "
|
||||
. "Visit https://pws.percona.com to enable services. "
|
||||
. "The agent is listed as its hostname: $hostname\n\n";
|
||||
print "\nThe agent has been installed and started, but it is not running any services yet. "
|
||||
. "Go to https://cloud.percona.com/agents#$hostname to enable services for this agent.\n\n";
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -8446,7 +8443,7 @@ sub check_if_mysql_restarted {
|
||||
eval {
|
||||
$cxn->connect();
|
||||
};
|
||||
my $e = $EVAL_ERROR;
|
||||
$e = $EVAL_ERROR;
|
||||
if ( $e ) {
|
||||
sleep 3 if $tryno < $tries; # failure, try again
|
||||
}
|
||||
|
Reference in New Issue
Block a user