Autotest: Have the scheduler not die trying to kill a dead pid
Currently if the drone tries to kill a process that has a PID that does
not exist, the scheduler can crash and leave itself in a bad state on
reboot.
Therefore in this CL we instead log a message in this situation and
continue on.
Added a new type of autoserv error and if the pid is dead that error is
raised to drone_utility which will catch the error and continue.
BUG=chromium-os:33374
TEST=ensured that a nonexistant PID logs a message into
drone_utlity.warnings and a valid PID is actually killed by
kill_process.
Change-Id: If8712ae946fba3644d462accb80307a7faa825eb
Reviewed-on: https://gerrit.chromium.org/gerrit/30350
Reviewed-by: Yu-Ju Hong <yjhong@chromium.org>
Reviewed-by: Chris Masone <cmasone@chromium.org>
Commit-Ready: Simran Basi <sbasi@google.com>
Tested-by: Simran Basi <sbasi@google.com>
diff --git a/client/common_lib/error.py b/client/common_lib/error.py
index 0702f67..c6febba 100644
--- a/client/common_lib/error.py
+++ b/client/common_lib/error.py
@@ -453,6 +453,11 @@
pass
+class AutoservPidAlreadyDeadError(AutoservError):
+ """Error occured by trying to kill a nonexistant PID"""
+ pass
+
+
# packaging system errors
class PackagingError(AutotestError):