From 780a57b6d15acd3ab159060dc75d64aaec1f9f36 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Thu, 4 Jul 2019 10:29:58 +0200 Subject: [PATCH] 5to6: ceph global mon host check: also detect mon-host and adapt message a bit Signed-off-by: Thomas Lamprecht --- PVE/CLI/pve5to6.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PVE/CLI/pve5to6.pm b/PVE/CLI/pve5to6.pm index 8e5c8538..30efdbdd 100644 --- a/PVE/CLI/pve5to6.pm +++ b/PVE/CLI/pve5to6.pm @@ -435,8 +435,10 @@ sub check_ceph { 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."); + + 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."); } -- 2.39.5