Add support to the scheduler to run autoserv --collect_crashinfo after a job finishes or is aborted.
* added new state "Gathering" for when we're running collect_crashinfo and copying logs to the results repository
* added new GatherLogsTask to the scheduler to perform these two tasks, and made it get run either after a job finishes or after a job is aborted.  this task shares a lot with FinalReparseTask, so extracted common code into a new PostJobTask.
* made changes to scheduler/drone code to support generic monitoring and recovery of processes via pidfiles, since we need to be able to recover the collect_crashinfo processes too.  this will also made the scheduler recover parse processes instead of just killing them as it does now, which is nice.
* changed abort logic significantly.  since we now need to put aborted jobs through the gathering and parsing stages, but then know to put them into "aborted" afterwards, we can't depend on the old path of abort -> aborting -> aborted statuses.  instead, we need to add an "aborted" flag to the HQE DB table and use that.  this actually makes things generally cleaner in my opinion -- for one,  we can get rid of the "Abort" and "Aborting" statuses altogether.  added a migration to add this flag, edited model and relevant logic appropriately, including changing how job statuses are reported for aborted entries.

Signed-off-by: Steve Howard <showard@google.com>


git-svn-id: http://test.kernel.org/svn/autotest/trunk@3031 592f7852-d20e-0410-864c-8624ca9c26a4
11 files changed