mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-19 18:34:59 +00:00
Don't keep stopping services when the disk space threshold checks fail.
This commit is contained in:
12
bin/pt-agent
12
bin/pt-agent
@@ -5623,15 +5623,21 @@ sub run_agent {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if ( !$disk_space_ok ) {
|
if ( !$disk_space_ok ) {
|
||||||
_warn("Disk bytes free threshold: "
|
_warn("Disk bytes free/percentage threshold: "
|
||||||
. $safeguards->{disk_bytes_free});
|
. $safeguards->{disk_bytes_free}
|
||||||
_warn("Disk percentage free threshold: "
|
. '/'
|
||||||
. $safeguards->{disk_pct_free});
|
. $safeguards->{disk_pct_free});
|
||||||
_warn("Disk space is low, stopping all services:\n$disk_space");
|
_warn("Disk space is low, stopping all services:\n$disk_space");
|
||||||
|
if ( !$state->{all_services_are_stopped} ) {
|
||||||
stop_all_services(
|
stop_all_services(
|
||||||
lib_dir => $lib_dir,
|
lib_dir => $lib_dir,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
_warn('Services will restart when disk space threshold '
|
||||||
|
. 'checks pass');
|
||||||
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
# Have config, safeguards are ok, now get/update the services.
|
# Have config, safeguards are ok, now get/update the services.
|
||||||
($services, $success) = get_services(
|
($services, $success) = get_services(
|
||||||
|
Reference in New Issue
Block a user