[autotest] Use RetryingAFE to get host info

This is to reduce the flake caused by RPC server load.

BUG=chromium:594559
TEST=local run suite

Change-Id: Ifcf01a0286b92448c07de76f33c9a53c00447286
Reviewed-on: https://chromium-review.googlesource.com/332823
Commit-Ready: Dan Shi <dshi@google.com>
Tested-by: Dan Shi <dshi@google.com>
Reviewed-by: Kevin Cheng <kevcheng@chromium.org>
diff --git a/server/site_autotest.py b/server/site_autotest.py
index eafe540..f36a162 100755
--- a/server/site_autotest.py
+++ b/server/site_autotest.py
@@ -41,11 +41,13 @@
         @returns value of the 'job_repo_url' host attribute, if present.
         """
         try:
-            from autotest_lib.server import frontend
+            from autotest_lib.server.cros.dynamic_suite import frontend_wrappers
             if self.host:
-                afe = frontend.AFE(debug=False)
+                afe = frontend_wrappers.RetryingAFE(timeout_min=5, delay_sec=10)
                 hosts = afe.get_hosts(hostname=self.host.hostname)
                 if hosts and JOB_REPO_URL in hosts[0].attributes:
+                    logging.info('Get job repo url from host attributes: %s',
+                                 hosts[0].attributes[JOB_REPO_URL])
                     return hosts[0].attributes[JOB_REPO_URL]
                 logging.warning("No %s for %s", JOB_REPO_URL, self.host)
         except (ImportError, urllib2.URLError):