mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-13 21:24:01 +00:00
5to6: invert check for noout for nautilus
mainly because it looks strange to get a warning after the upgrade is finished and noout has been removed again Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com> (cherry picked from commit 600a106ba0c47150c29f87561d480d4b89085d41) Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
33866e3cdc
commit
a75241fb90
@ -349,8 +349,8 @@ sub check_ceph {
|
|||||||
log_info("getting Ceph status/health information..");
|
log_info("getting Ceph status/health information..");
|
||||||
my $ceph_status = eval { PVE::API2::Ceph->status({ node => $nodename }); };
|
my $ceph_status = eval { PVE::API2::Ceph->status({ node => $nodename }); };
|
||||||
my $osd_flags = eval { PVE::API2::Ceph->get_flags({ node => $nodename }); };
|
my $osd_flags = eval { PVE::API2::Ceph->get_flags({ node => $nodename }); };
|
||||||
my $noout;
|
my $noout_wanted = 1;
|
||||||
$noout = $osd_flags =~ m/noout/ if $osd_flags;
|
my $noout = $osd_flags =~ m/noout/ if $osd_flags;
|
||||||
|
|
||||||
if (!$ceph_status || !$ceph_status->{health}) {
|
if (!$ceph_status || !$ceph_status->{health}) {
|
||||||
log_fail("unable to determine Ceph status!");
|
log_fail("unable to determine Ceph status!");
|
||||||
@ -378,11 +378,6 @@ sub check_ceph {
|
|||||||
} else {
|
} else {
|
||||||
log_fail("missing 'recovery_deletes' and/or 'purged_snapdirs' flag, scrub of all PGs required before upgrading to Nautilus!");
|
log_fail("missing 'recovery_deletes' and/or 'purged_snapdirs' flag, scrub of all PGs required before upgrading to Nautilus!");
|
||||||
}
|
}
|
||||||
if ($noout) {
|
|
||||||
log_pass("noout flag set to prevent rebalancing during cluster-wide upgrades.");
|
|
||||||
} else {
|
|
||||||
log_warn("noout flag not set - recommended to prevent rebalancing during upgrades.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -418,11 +413,24 @@ sub check_ceph {
|
|||||||
log_warn("unable to determine overall Ceph daemon versions!");
|
log_warn("unable to determine overall Ceph daemon versions!");
|
||||||
} elsif (keys %$overall_versions == 1) {
|
} elsif (keys %$overall_versions == 1) {
|
||||||
log_pass("single running overall version detected for all Ceph daemon types.");
|
log_pass("single running overall version detected for all Ceph daemon types.");
|
||||||
|
if ((keys %$overall_versions)[0] =~ /^ceph version 14\./) {
|
||||||
|
$noout_wanted = 0;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
log_warn("overall version mismatch detected, check 'ceph versions' output for details!");
|
log_warn("overall version mismatch detected, check 'ceph versions' output for details!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($noout) {
|
||||||
|
if ($noout_wanted) {
|
||||||
|
log_pass("noout flag set to prevent rebalancing during cluster-wide upgrades.");
|
||||||
|
} else {
|
||||||
|
log_warn("noout flag set, Ceph cluster upgrade seems finished.");
|
||||||
|
}
|
||||||
|
} elsif ($noout_wanted) {
|
||||||
|
log_warn("noout flag not set - recommended to prevent rebalancing during upgrades.");
|
||||||
|
}
|
||||||
|
|
||||||
my $local_ceph_ver = PVE::Ceph::Tools::get_local_version(1);
|
my $local_ceph_ver = PVE::Ceph::Tools::get_local_version(1);
|
||||||
if (defined($local_ceph_ver)) {
|
if (defined($local_ceph_ver)) {
|
||||||
if ($local_ceph_ver == 14) {
|
if ($local_ceph_ver == 14) {
|
||||||
|
Loading…
Reference in New Issue
Block a user