bisect-kit: detect locked DUT in unexpected status

It's allowed to lock hosts in the lab while they are running tests or
perform other tasks. Because we don't do search and lock in an atomic
step, it's possible that the locked host is racing to run tests at the
same time.

We have ever encountered some mystery host state issues, I guess this
might be the reason.
 - a host is unlocked while we are still bisecting
 - a host is in provisioning state while it is still locked by us

BUG=None
TEST=None

Change-Id: If932bdbd69f43562dc38ed9e089ccb6c8f32b870
Reviewed-on: https://chromium-review.googlesource.com/1328386
Commit-Ready: Kuang-che Wu <kcwu@chromium.org>
Tested-by: Kuang-che Wu <kcwu@chromium.org>
Reviewed-by: Chung-yih Wang <cywang@chromium.org>
1 file changed