[autotest] Stop powerd on servo, if it's running.
An ongoing servo outage in the lab is being caused by powerd
shutting down beaglebones. Although a new beaglebone image is
available that doesn't include powerd, many failed beaglebones
still run the old image. This changes verify() for servos to
stop powerd so that the unit can stay up long enough to download
and apply the permanent fix.
BUG=chromium:614047
TEST=None
Change-Id: I23f910a183f89776c364fe96000a137ba334eea8
Reviewed-on: https://chromium-review.googlesource.com/347243
Commit-Ready: Richard Barnette <jrbarnette@chromium.org>
Tested-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Kevin Cheng <kevcheng@chromium.org>
Reviewed-by: Dan Shi <dshi@google.com>
diff --git a/server/hosts/servo_host.py b/server/hosts/servo_host.py
index 0ebec71..517cb0d 100644
--- a/server/hosts/servo_host.py
+++ b/server/hosts/servo_host.py
@@ -588,6 +588,15 @@
@raises ServoHostVerifyFailure if servo host does not pass the checks.
"""
+ # TODO(jrbarnette) Old versions of beaglebone_servo include
+ # the powerd package. In some (not yet understood)
+ # circumstances, powerd on beaglebone will shut down after
+ # attempting to suspend. Current versions of
+ # beaglebone_servo don't have powerd, but until we can purge
+ # the lab of the old images, we need to make sure powerd
+ # isn't running.
+ self.run('stop powerd', ignore_status=True)
+
logging.info('Applying an update to the servo host, if necessary.')
self.update_image(wait_for_update=False)
self._check_servo_config()