From f9f8cd7d014493ad98f2874752142c17dade165a Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Thu, 4 Jul 2019 10:31:06 +0200 Subject: [PATCH] 5to6: ceph mon host check: switch config check from defined to hash values exist we can get here if a empty (or one with just comments) ceph.conf exists Signed-off-by: Thomas Lamprecht --- PVE/CLI/pve5to6.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PVE/CLI/pve5to6.pm b/PVE/CLI/pve5to6.pm index 30efdbdd..ab92e31a 100644 --- a/PVE/CLI/pve5to6.pm +++ b/PVE/CLI/pve5to6.pm @@ -433,7 +433,7 @@ sub check_ceph { log_info("checking Ceph config.."); my $conf = PVE::Cluster::cfs_read_file('ceph.conf'); - if (defined($conf)) { + if (%$conf) { my $global = $conf->{global}; my $global_monhost = $global->{mon_host} // $global->{"mon host"} // $global->{"mon-host"}; @@ -454,7 +454,7 @@ sub check_ceph { log_pass("ms_bind_ipv6 not enabled"); } } else { - log_skip("no ceph config found"); + log_warn("Empty ceph config found"); } my $local_ceph_ver = PVE::Ceph::Tools::get_local_version(1);