From: Sage Weil Date: Wed, 2 Jun 2021 02:31:47 +0000 (-0400) Subject: mgr/restful: use get_mgr_ip() instead of hostname X-Git-Tag: v16.2.5~87^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=df03e6587fe19552e8a76d87b0d4ce333df1b502;p=ceph.git mgr/restful: use get_mgr_ip() instead of hostname Now we match dashboard! Signed-off-by: Sage Weil (cherry picked from commit df7994617438a53db84edfd1e83c8439e0cad8f6) --- diff --git a/src/pybind/mgr/restful/module.py b/src/pybind/mgr/restful/module.py index b5f9d6f0af9..df34b160661 100644 --- a/src/pybind/mgr/restful/module.py +++ b/src/pybind/mgr/restful/module.py @@ -313,7 +313,7 @@ class Module(MgrModule): # Publish the URI that others may use to access the service we're # about to start serving self.set_uri("https://{0}:{1}/".format( - socket.gethostname() if server_addr == "::" else server_addr, + self.get_mgr_ip() if server_addr == "::" else server_addr, server_port ))