[pve-devel] [PATCH storage] Exclude general MON section in get_monaddr_list

Alwin Antreich a.antreich at proxmox.com
Wed Jan 9 11:59:12 CET 2019


If a general MON section exists in the ceph.conf, the get_monaddr_list
adds a undefined entry and a cephfs storage can't be mounted anymore.

Signed-off-by: Alwin Antreich <a.antreich at proxmox.com>
---
 PVE/CephConfig.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/CephConfig.pm b/PVE/CephConfig.pm
index b420fcc..aad2701 100644
--- a/PVE/CephConfig.pm
+++ b/PVE/CephConfig.pm
@@ -107,7 +107,7 @@ sub get_monaddr_list {
     }
 
     my $config = $parse_ceph_file->($configfile);
-    @$server = sort map { $config->{$_}->{'mon addr'} } grep {/mon/} %{$config};
+    @$server = sort map { $config->{$_}->{'mon addr'} } grep {/mon\./} %{$config};
 
     return join(',', @$server);
 };
-- 
2.11.0





More information about the pve-devel mailing list