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 <pseidensal@suse.com>
(cherry picked from commit
9eb1c34f6fcbf5ac7e1e0b695a0182d5937cc038)
# 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
))