we map '$type addr' to '$type_addr' anyway in the ceph.conf parser,
so this is not necessary

also use 'public_addr' if it is set

Signed-off-by: Dominik Csapak <d.csa...@proxmox.com>
---
 PVE/Ceph/Services.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/Ceph/Services.pm b/PVE/Ceph/Services.pm
index bcdb39ee..45eb6c3f 100644
--- a/PVE/Ceph/Services.pm
+++ b/PVE/Ceph/Services.pm
@@ -98,7 +98,7 @@ sub get_services_info {
        if ($section =~ m/^$type\.(\S+)$/) {
            my $id = $1;
            my $service = $result->{$id};
-           my $addr = $d->{"$type addr"} // $d->{"${type}_addr"} // $d->{host};
+           my $addr = $d->{"${type}_addr"} // $d->{public_addr} // $d->{host};
            $service->{name} //= $id;
            $service->{addr} //= $addr;
            $service->{state} //= 'unknown';
-- 
2.20.1


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to