xen-org/xen-api — pull request #1085 by akshayramani (2013-03-18 07:12:36+00:00)
Title: SCTX-1283: Fix race condition when a vm-shutdown is initiated during xapi-startup 

If a shutdown in initiated when xapi is starting up , dbsyc_slave.ml will mark the domain as running AFTER the clean shutdown. Hence the VM is marked as running and resident_on is marked as null.

This commit ensures it checks that the domain is not in a shutdown state before marking it as running.