mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-10 21:19:59 +00:00
Fix parsing server error message. Add 'sending' and 'running' suffixes to service names.
This commit is contained in:
@@ -6788,7 +6788,7 @@ sub run_service {
|
|||||||
# Load the Service object from local service JSON file.
|
# Load the Service object from local service JSON file.
|
||||||
# $service changes from a string scalar to a Service object.
|
# $service changes from a string scalar to a Service object.
|
||||||
$service = load_service(
|
$service = load_service(
|
||||||
service => $service,
|
service => "$service running",
|
||||||
lib_dir => $lib_dir,
|
lib_dir => $lib_dir,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -7209,7 +7209,7 @@ sub send_data {
|
|||||||
# Load the Service object from local service JSON file.
|
# Load the Service object from local service JSON file.
|
||||||
# $service changes from a string scalar to a Service object.
|
# $service changes from a string scalar to a Service object.
|
||||||
$service = load_service(
|
$service = load_service(
|
||||||
service => $service,
|
service => "$service sending",
|
||||||
lib_dir => $lib_dir,
|
lib_dir => $lib_dir,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -7246,8 +7246,8 @@ sub send_data {
|
|||||||
my $error_msg;
|
my $error_msg;
|
||||||
my $content = $client->response->content;
|
my $content = $client->response->content;
|
||||||
if ( $content ) {
|
if ( $content ) {
|
||||||
my $error_hashref = decode_json($content);
|
my $errors = decode_json($content);
|
||||||
$error_msg = $error_hashref->{error};
|
$error_msg = join("\n", @$errors);
|
||||||
}
|
}
|
||||||
$logger->warning('Error ' . $e->status . " sending $data_file: "
|
$logger->warning('Error ' . $e->status . " sending $data_file: "
|
||||||
. ($error_msg || '(No error message from server)'));
|
. ($error_msg || '(No error message from server)'));
|
||||||
|
Reference in New Issue
Block a user