[autotest] autoupdater.py run rootfs update and stateful update in series
Stateful update takes <1 minute, and running it in parallel with rootfs
update only adds complexity to the logs and risk of flake.
BUG=chromium:547548
TEST=moblab tryjob
Change-Id: I8f60a7398973accd00d47b0e924366bbbbca0209
Reviewed-on: https://chromium-review.googlesource.com/348857
Commit-Ready: Aviv Keshet <akeshet@chromium.org>
Tested-by: Aviv Keshet <akeshet@chromium.org>
Reviewed-by: Chris Sosa <sosa@chromium.org>
diff --git a/client/common_lib/cros/autoupdater.py b/client/common_lib/cros/autoupdater.py
index 2c1e783..f2d89c6 100644
--- a/client/common_lib/cros/autoupdater.py
+++ b/client/common_lib/cros/autoupdater.py
@@ -499,30 +499,23 @@
self.reset_stateful_partition()
try:
- updaters = [
- multiprocessing.process.Process(target=self.update_rootfs),
- multiprocessing.process.Process(target=self.update_stateful)
- ]
- if not update_root:
- logging.info('Root update is skipped.')
- updaters = updaters[1:]
+ try:
+ if not update_root:
+ logging.info('Root update is skipped.')
+ else:
+ self.update_rootfs()
- # Run the updaters in parallel.
- for updater in updaters: updater.start()
- for updater in updaters: updater.join()
-
- # Re-raise the first error that occurred.
- if not self._update_error_queue.empty():
- update_error = self._update_error_queue.get()
+ self.update_stateful()
+ except:
self.revert_boot_partition()
self.reset_stateful_partition()
- raise update_error
+ raise
logging.info('Update complete.')
except:
# Collect update engine logs in the event of failure.
if self.host.job:
- logging.info('Collecting update engine logs...')
+ logging.info('Collecting update engine logs due to failure...')
self.host.get_file(
self.UPDATER_LOGS, self.host.job.sysinfo.sysinfodir,
preserve_perm=False)