From 9eb1c34f6fcbf5ac7e1e0b695a0182d5937cc038 Mon Sep 17 00:00:00 2001 From: Patrick Seidensal Date: Wed, 6 Nov 2019 11:45:51 +0100 Subject: [PATCH] mgr/prometheus: return FQDN for default server_addr Instead of returning '0.0.0.0' the prometheus module returns the FQDN of the host, as it is the case for '::'. Fixes: https://tracker.ceph.com/issues/42664 Signed-off-by: Patrick Seidensal --- src/pybind/mgr/prometheus/module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybind/mgr/prometheus/module.py b/src/pybind/mgr/prometheus/module.py index 9aa7ba64215..62e809ac95d 100644 --- a/src/pybind/mgr/prometheus/module.py +++ b/src/pybind/mgr/prometheus/module.py @@ -1087,7 +1087,7 @@ class Module(MgrModule): # Publish the URI that others may use to access the service we're # about to start serving self.set_uri('http://{0}:{1}/'.format( - socket.getfqdn() if server_addr == '::' else server_addr, + socket.getfqdn() if server_addr in ['::', '0.0.0.0'] else server_addr, server_port )) -- 2.39.5