The 'locks' for the VDIs, which are maintained by the SM backends now, are stored in xapi's database. In the event of a master failover, the pool database may rev
ert to a previous backup, which is then resynced with reality. Unfortunately there's no logic to resync the SM backends' data, nor any hook point to do this. Idea
lly, the SM backends would store their critical data internally somehow, but until this happens xapi will have to contain the important logic to resynchronise the
se locks.
This patch adds a host-post-declare-dead script that causes the reset of the locks of VDIs that were present on a host that has been declared dead.
Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>