[autotest] Use a RetryingAFE for lab_inventory.
We get periodic 500 errors from cautotest due to load. So,
retry the RPC calls.
BUG=chromium:498883
TEST=run an inventory sample locally
Change-Id: If9d7258f3d7a28b13b74b4edfe4142f4f4bcd707
Reviewed-on: https://chromium-review.googlesource.com/299559
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Dan Shi <dshi@chromium.org>
diff --git a/site_utils/lab_inventory.py b/site_utils/lab_inventory.py
index 19d5a41..1fda391 100755
--- a/site_utils/lab_inventory.py
+++ b/site_utils/lab_inventory.py
@@ -57,7 +57,7 @@
import common
from autotest_lib.client.bin import utils
from autotest_lib.client.common_lib import time_utils
-from autotest_lib.server import frontend
+from autotest_lib.server.cros.dynamic_suite import frontend_wrappers
from autotest_lib.server.hosts import servo_host
from autotest_lib.site_utils import gmail_lib
from autotest_lib.site_utils import status_history
@@ -955,7 +955,7 @@
if arguments.pool_notify:
logging.debug('Will include pool inventory')
- afe = frontend.AFE(server=None)
+ afe = frontend_wrappers.RetryingAFE(server=None)
inventory = _LabInventory.create_inventory(
afe, start_time, end_time, arguments.boardnames)
logging.info('Found %d hosts across %d boards',