ceph: get_monaddr_list: exclude general monitor section

Else, if a general MON section existed in the ceph.conf, we added a
undefined entry and a cephfs storage can't be mounted anymore.

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Alwin Antreich
2019-01-09 11:59:12 +01:00
committed by Thomas Lamprecht
parent 5b5534a9d7
commit 187df8553e

View File

@ -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);
};