autotest: rpmserver_frontend should listen on external interface

CL:669946 sneaked in a change so that rpmserver won't always attempt to
listen on a fixed hostname. That change won't stick though, because the
server is now only listening on loopback device. Change it to listen on
the publicly known name of the server.

BUG=chromium:762233
TEST=Run rpm_client against a newly provisioned rpmserver remotely.

Change-Id: I55e31b7a3b488709f6d40453bda2f2d4306daad4
Reviewed-on: https://chromium-review.googlesource.com/675674
Commit-Ready: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Xixuan Wu <xixuan@chromium.org>
diff --git a/site_utils/rpm_control_system/frontend_server.py b/site_utils/rpm_control_system/frontend_server.py
index bd162fc..eb4f32a 100755
--- a/site_utils/rpm_control_system/frontend_server.py
+++ b/site_utils/rpm_control_system/frontend_server.py
@@ -367,7 +367,10 @@
     email_handler = rpm_logging_config.set_up_logging_to_file(
             sys.argv[1], LOG_FILENAME_FORMAT)
     frontend_server = RPMFrontendServer(email_handler=email_handler)
-    address = rpm_config.get('RPM_INFRASTRUCTURE', 'frontend_addr')
+    # We assume that external clients will always connect to us via the
+    # hostname, so listening on the hostname ensures we pick the right network
+    # interface.
+    address = socket.gethostname()
     port = rpm_config.getint('RPM_INFRASTRUCTURE', 'frontend_port')
     server = MultiThreadedXMLRPCServer((address, port), allow_none=True)
     server.register_instance(frontend_server)