]> xenbits.xensource.com Git - xcp/xen-api.git/commit
CP-1981: Track the vdi_activations in the local database
authorJon Ludlam <jonathan.ludlam@eu.citrix.com>
Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)
committerJon Ludlam <jonathan.ludlam@eu.citrix.com>
Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)
commite517caab5bf081504c0e1a8ab2df2cf757688879
tree003b2107ff5c857c15c6fd9bf4e99a19b24487e4
parentcb3fe5f97747107d9d2daf9c55e4a08e16de3691
CP-1981: Track the vdi_activations in the local database

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 maintains a list of the VDIs that have been activatedi (including RW/RO mode) in the local database.

Signed-off-by: Jon Ludlam <jonathan.ludlam@eu.citrix.com>
ocaml/xapi/OMakefile
ocaml/xapi/sm.ml
ocaml/xapi/xapi.ml
ocaml/xapi/xapi_local_vdi_state.ml [new file with mode: 0644]
ocaml/xapi/xapi_local_vdi_state.mli [new file with mode: 0644]