From c553da9283c74d6e5d6c26bb1b843fb69a64991d Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Thu, 4 Jul 2019 09:35:12 +0200 Subject: [PATCH] pve5to6: check ceph config for mon_host line this already works on luminous, so it does not harm to add it already, and is recommended when both msgr1 and msgr2 is activated in nautilus Signed-off-by: Dominik Csapak --- PVE/CLI/pve5to6.pm | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/PVE/CLI/pve5to6.pm b/PVE/CLI/pve5to6.pm index f22f9259..5ce27b02 100644 --- a/PVE/CLI/pve5to6.pm +++ b/PVE/CLI/pve5to6.pm @@ -431,6 +431,19 @@ sub check_ceph { log_warn("noout flag not set - recommended to prevent rebalancing during upgrades."); } + log_info("checking Ceph config.."); + my $conf = PVE::Cluster::cfs_read_file('ceph.conf'); + if (defined($conf)) { + my $global = $conf->{global}; + if (!defined($global->{mon_host}) && !defined($global->{"mon host"})) { + log_warn("No mon_host entry found in ceph config.\n It is recommended to add mon_host with all monitor addresses(without ports) to the global section."); + } else { + log_pass("Found mon_host entry."); + } + } else { + log_skip("no ceph config found"); + } + my $local_ceph_ver = PVE::Ceph::Tools::get_local_version(1); if (defined($local_ceph_ver)) { if ($local_ceph_ver == 14) {