mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-07-24 06:28:52 +00:00
pve6to7: improve vzdump.cron check
handle errors, and fix filename referenced in the warning. Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
e522a2db5c
commit
437ade60b5
@ -563,12 +563,18 @@ sub check_backup_retention_settings {
|
||||
"7.x will no longer keep only the last backup, but all backups");
|
||||
}
|
||||
|
||||
my $vzdump_cron = PVE::Cluster::cfs_read_file('vzdump.cron');
|
||||
eval {
|
||||
my $vzdump_cron = PVE::Cluster::cfs_read_file('vzdump.cron');
|
||||
|
||||
# only warn once, there might be many jobs...
|
||||
if (scalar(grep { defined($_->{maxfiles}) } $vzdump_cron->{jobs}->@*)) {
|
||||
# only warn once, there might be many jobs...
|
||||
if (scalar(grep { defined($_->{maxfiles}) } $vzdump_cron->{jobs}->@*)) {
|
||||
$pass = 0;
|
||||
log_warn("/etc/pve/vzdump.cron - $maxfiles_msg");
|
||||
}
|
||||
};
|
||||
if (my $err = $@) {
|
||||
$pass = 0;
|
||||
log_warn("/etc/pve/vzdump_cron - $maxfiles_msg");
|
||||
log_warn("unable to parse node's VZDump configuration - $err");
|
||||
}
|
||||
|
||||
log_pass("no problems found.") if $pass;
|
||||
|
Loading…
Reference in New Issue
Block a user