[autotest] Requeueing a HQE should abort all queued special tasks.

If one schedules multiple pre-job special tasks, and one of them fails,
the scheduler still thinks it should try to run the rest of them.  We
need to make sure to kill off any remaining pre-job tasks if one of them
fails and we requeue the HQE.  They will get re-created when the HQE is
assigned another host again.

BUG=chromium:249437
DEPLOY=scheduler
TEST=A reset and provision task were scheduled.  The reset task failed,
and the provision task was marked as complete.  This is in stark
opposition to the previous behavior, which was a scheduler crash.

Change-Id: I8261751f63b34892ecbad68f117ed9b85e41c1ed
Reviewed-on: https://gerrit.chromium.org/gerrit/63653
Commit-Queue: Alex Miller <milleral@chromium.org>
Reviewed-by: Alex Miller <milleral@chromium.org>
Tested-by: Alex Miller <milleral@chromium.org>
1 file changed