use PVE::API2::LXC;
use PVE::API2::Qemu;
use PVE::API2::Certificates;
+use PVE::API2::Cluster::Ceph;
use PVE::AccessControl;
use PVE::Ceph::Tools;
log_info("getting Ceph status/health information..");
my $ceph_status = eval { PVE::API2::Ceph->status({ node => $nodename }); };
- my $osd_flags = eval { PVE::API2::Ceph->get_flags({ node => $nodename }); };
+ my $noout = eval { PVE::API2::Cluster::Ceph->get_flag({ flag => "noout" }); };
+ if ($@) {
+ log_fail("failed to get 'noout' flag status - $@");
+ }
+
my $noout_wanted = 1;
- my $noout = $osd_flags && $osd_flags =~ m/noout/;
if (!$ceph_status || !$ceph_status->{health}) {
log_fail("unable to determine Ceph status!");
}
}
- log_info("getting Ceph OSD flags..");
- eval {
- if (!$osd_flags) {
- log_fail("unable to get Ceph OSD flags!");
- } else {
- if (!($osd_flags =~ m/recovery_deletes/ && $osd_flags =~ m/purged_snapdirs/)) {
- log_fail("missing 'recovery_deletes' and/or 'purged_snapdirs' flag, scrub of all PGs required before upgrading to Nautilus!");
- }
- }
- };
-
# TODO: check OSD min-required version, if to low it breaks stuff!
log_info("getting Ceph daemon versions..");
log_warn("unable to determine overall Ceph daemon versions!");
} elsif (keys %$overall_versions == 1) {
log_pass("single running overall version detected for all Ceph daemon types.");
- if ((keys %$overall_versions)[0] =~ /^ceph version 15\./) {
- $noout_wanted = 0;
- }
+ $noout_wanted = 0; # off post-upgrade, on pre-upgrade
} else {
log_warn("overall version mismatch detected, check 'ceph versions' output for details!");
}
my $global_monhost = $global->{mon_host} // $global->{"mon host"} // $global->{"mon-host"};
if (!defined($global_monhost)) {
log_warn("No 'mon_host' entry found in ceph config.\n It's recommended to add mon_host with all monitor addresses (without ports) to the global section.");
- } else {
- log_pass("Found 'mon_host' entry.");
}
my $ipv6 = $global->{ms_bind_ipv6} // $global->{"ms bind ipv6"} // $global->{"ms-bind-ipv6"};
my $ipv4 = $global->{ms_bind_ipv4} // $global->{"ms bind ipv4"} // $global->{"ms-bind-ipv4"};
if ($ipv6 eq 'true' && (!defined($ipv4) || $ipv4 ne 'false')) {
log_warn("'ms_bind_ipv6' is enabled but 'ms_bind_ipv4' is not disabled.\n Make sure to disable 'ms_bind_ipv4' for ipv6 only clusters, or add an ipv4 network to public/cluster network.");
- } else {
- log_pass("'ms_bind_ipv6' is enabled and 'ms_bind_ipv4' disabled");
}
- } else {
- log_pass("'ms_bind_ipv6' not enabled");
}
if (defined($global->{keyring})) {
log_warn("[global] config section contains 'keyring' option, which will prevent services from starting with Nautilus.\n Move 'keyring' option to [client] section instead.");
- } else {
- log_pass("no 'keyring' option in [global] section found.");
}
} else {
my $local_ceph_ver = PVE::Ceph::Tools::get_local_version(1);
if (defined($local_ceph_ver)) {
- if ($local_ceph_ver == 14) {
- my $ceph_volume_osds = PVE::Ceph::Tools::ceph_volume_list();
- my $scanned_osds = PVE::Tools::dir_glob_regex('/etc/ceph/osd', '^.*\.json$');
- if (-e '/var/lib/ceph/osd/' && !defined($scanned_osds) && !(keys %$ceph_volume_osds)) {
- log_warn("local Ceph version is Nautilus, local OSDs detected, but no conversion from ceph-disk to ceph-volume done (yet).");
- }
+ if ($local_ceph_ver <= 14) {
+ log_fail("local Ceph version too low, at least Octopus required..");
}
} else {
log_fail("unable to determine local Ceph version.");
my $log_problem = sub {
my ($ctid) = @_;
- log_warn("Found at least one CT ($ctid) which does not support running in a unified " .
- "cgroup v2 layout - either upgrade it or set systemd.unified_cgroup_hierarchy=0 " .
- "in the kernel cmdline - skipping further checks"
+ log_warn("Found at least one CT ($ctid) which does not support running in a unified cgroup v2" .
+ " layout.\n Either upgrade the Container distro or set systemd.unified_cgroup_hierarchy=0 " .
+ "in the Proxmox VE hosts' kernel cmdline! Skipping further CT compat checks."
);
};
if ($param->{full}) {
check_containers_cgroup_compat();
} else {
- log_skip("Expensive checks not performed without 'full' parameter");
+ log_skip("NOTE: Expensive checks, like CT cgroupv2 compat, not performed without '--full' parameter");
}
print_header("SUMMARY");