]> git.proxmox.com Git - pve-manager.git/commitdiff
5to6: ceph global mon host check: also detect mon-host
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 4 Jul 2019 08:29:58 +0000 (10:29 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 4 Jul 2019 08:30:39 +0000 (10:30 +0200)
and adapt message a bit

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/CLI/pve5to6.pm

index 8e5c85387d28c1fce49929c7e5865f78957bab3e..30efdbddcaa8f213f5db25bfa5ffa637417018c5 100644 (file)
@@ -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.");
        }