[pve-devel] [PATCH manager 3/4] ceph: services: improve addr selection

Dominik Csapak d.csapak at proxmox.com
Wed Jul 3 15:53:42 CEST 2019


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.csapak at 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





More information about the pve-devel mailing list