[autotest] Add job_aborter
Add the skeleton of job_aborter. All of the cases that job_aborter
has to handle are added.
Due to considerations for job_aborter that came up, existing code has
been redesigned.
1. The implementation for aborting a job has been moved out. The
existing design is unnecessarily complex. The abort signaling
mechanism should not need to go through job_reporter and can be
handled directly by job_shepherd. Since job_shepherd is written in
Go, the async aspect of that will be much easier to write than the
Python async that would be needed for job_reporter to play middleman.
The new logic will be added to monitor_db, job_aborter, and
job_shepherd; job_reporter need not play.
2. Job lease liveness is determined by fcntl locks. This is more
reliable than working with pids and/or sending signals. (As a bonus, this
prevents a job from being owned by two processes at the same in
certain cases.)
BUG=chromium:748234
TEST=Unittests
Change-Id: I51cad974722e2e549e94819b6a3411d569919383
Reviewed-on: https://chromium-review.googlesource.com/676085
Commit-Ready: Allen Li <ayatane@chromium.org>
Tested-by: Allen Li <ayatane@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
diff --git a/bin/test_lucifer b/bin/test_lucifer
index 3e422e5..e8628ef 100755
--- a/bin/test_lucifer
+++ b/bin/test_lucifer
@@ -10,4 +10,4 @@
# cd for pytest configuration files
cd "$bin_dir/../venv"
-"${bin_dir}/python_venv" -m pytest lucifer
+"${bin_dir}/python_venv" -m pytest lucifer "$@"