mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-11 13:40:07 +00:00
Stop all services when pt-agent stops due to signal.
This commit is contained in:
@@ -6028,6 +6028,10 @@ sub run_agent {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stop_all_services(
|
||||||
|
lib_dir => $lib_dir,
|
||||||
|
);
|
||||||
|
|
||||||
# This shouldn't happen until the service is stopped/killed.
|
# This shouldn't happen until the service is stopped/killed.
|
||||||
$logger->info('Agent ' . $agent->name . ' has stopped');
|
$logger->info('Agent ' . $agent->name . ' has stopped');
|
||||||
return;
|
return;
|
||||||
@@ -7746,7 +7750,7 @@ sub stop_all_services {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
if ( $EVAL_ERROR ) {
|
if ( $EVAL_ERROR ) {
|
||||||
$logger->warning("Error removing services from crontab: $EVAL_ERROR");
|
$logger->error("Error removing services from crontab: $EVAL_ERROR");
|
||||||
}
|
}
|
||||||
|
|
||||||
# Stop all real services by running their stop-<service> meta-service.
|
# Stop all real services by running their stop-<service> meta-service.
|
||||||
|
Reference in New Issue
Block a user