Fixes - HA , VM stuck in scheduling due to instance not found on icehouse build

It has been observed that when a VM is spawned, it is stuck in BUILD state
and does not get scheduled to be spawned by the nova-scheduler. On debugging
more, it was seen that nova-api creates an entry in instances_action database
as what to do with the VM. nova-scheduler reads this entry and schedules the VM.

In this particular case, the write to MySQL table is asynchronous and hence
nova-scheduler tries to read the table before it could get commited into
MySQL.

The fix is to make sure that MySQL read access is blocked and retried
when there is outstanding writes.

Closes-bug: 1369735
Change-Id: Ieb437c143f043efcb078da9577329c33bedc083b
Merge "Fixes - HA , VM stuck in scheduling due to instance not found on icehouse build"