Catch all errors when provisioning & make start_master_ssh multiprocess safe
Currently autoupdating.py only catches AutoservRunErrors when
updating the rootfs and stateful, thus allowing autotest
infrastructure errors to not be caught properly.
Updates start_master_ssh so that it protects against multiple
processes cleaning up the old connection and creating a new one
in parallel.
BUG=chromium:468062
TEST=provision still works on moblab.
Change-Id: I5a2c31ead5b15ca66c1f8035df27e9c3420b41a8
Reviewed-on: https://chromium-review.googlesource.com/260664
Trybot-Ready: Simran Basi <sbasi@chromium.org>
Tested-by: Simran Basi <sbasi@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
Commit-Queue: Simran Basi <sbasi@chromium.org>
diff --git a/client/common_lib/cros/autoupdater.py b/client/common_lib/cros/autoupdater.py
index 17fb490..990874a 100644
--- a/client/common_lib/cros/autoupdater.py
+++ b/client/common_lib/cros/autoupdater.py
@@ -366,6 +366,10 @@
self.host.hostname)
self._update_error_queue.put(update_error)
raise update_error
+ except Exception as e:
+ # Don't allow other exceptions to not be caught.
+ self._update_error_queue.put(e)
+ raise e
try:
self._verify_update_completed()
@@ -397,6 +401,10 @@
self.host.hostname)
self._update_error_queue.put(update_error)
raise update_error
+ except Exception as e:
+ # Don't allow other exceptions to not be caught.
+ self._update_error_queue.put(e)
+ raise e
def run_update(self, force_update, update_root=True):