Fix bug #388 - staging-kvm08 device is in running status while the job ..
Fix bug #388 - staging-kvm08 device is in running status while the job ..

See https://bugs.linaro.org/show_bug.cgi?id=388

Database transactions for state transitions and elsewhere should be committed
 with proper retries.

Change-Id: I0c86a8112557f51be7196cc1630eef3774483181

Linaro/lava-server,Linaro/lava-server,Linaro/lava-server,Linaro/lava-server