CP-1981: Resynchronise the locks in the sm_config maps of VDIs in dbsync_slave
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 revert 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. Ideally, the SM backends would store their critical data internally somehow, but until this happens xapi will have to contain the important logic to resynchronise these locks.
This patch implements the logic to resynchronise the sm_config keys based on the information stored in the local database
Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>