[pve-devel] [PATCH manager 1/2] pve5to6: check ceph config for mon_host line

Dominik Csapak d.csapak at proxmox.com
Thu Jul 4 09:35:12 CEST 2019


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 <d.csapak at proxmox.com>
---
 PVE/CLI/pve5to6.pm | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/PVE/CLI/pve5to6.pm b/PVE/CLI/pve5to6.pm
index c167ebca..bb54c735 100644
--- a/PVE/CLI/pve5to6.pm
+++ b/PVE/CLI/pve5to6.pm
@@ -421,6 +421,19 @@ sub check_ceph {
 	}
     }
 
+    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) {
-- 
2.20.1





More information about the pve-devel mailing list