CA-77555: add exception handlers around each xenopsd VM event stanza, so one failure does not block the rest
CA-77555: add exception handlers around each xenopsd VM event stanza, so one failure does not block the rest

It's important that the event resync logic doesn't fail, otherwise the VM state in xapi will be out-of-sync.

In the event that something does fail, log the error and resynchronise as much as possible.

In future we may wish to consider artificially injecting events periodically in the event of failure, in the hope that the state will change enough in future to avoid the problem.

Signed-off-by: David Scott <63c9eb0ea83039690fefa11afe17873ba8278a56@eu.citrix.com>

srowe/xen-api,agimofcarmen/xen-api,euanh/xen-api,agimofcarmen/xen-api,thomassa/xen-api,anoobs/xen-api,euanh/xen-api,koushikcgit/xen-api,Frezzle/xen-api,djs55/xen-api,thomassa/xen-api,jjd27/xen-api,thomassa/xen-api,rafalmiel/xen-api,salvocambria/xen-api,Frezzle/xen-api,cheng-z/xen-api,cheng-z/xen-api,salvocambria/xen-api,koushikcgit/xen-api,rafalmiel/xen-api,jjd27/xen-api,guard163/xen-api,rafalmiel/xen-api,simonjbeaumont/xen-api,ravippandey/xen-api,agimofcarmen/xen-api,robertbreker/xen-api,salvocambria/xen-api,guard163/xen-api,ravippandey/xen-api,anoobs/xen-api,agimofcarmen/xen-api,Frezzle/xen-api,simonjbeaumont/xen-api,anoobs/xen-api,huizh/xen-api,rafalmiel/xen-api,guard163/xen-api,vasilenkomike/xen-api,thomassa/xen-api,simonjbeaumont/xen-api,cheng-z/xen-api,srowe/xen-api,robertbreker/xen-api,robertbreker/xen-api,robertbreker/xen-api,vasilenkomike/xen-api,simonjbeaumont/xen-api,vasilenkomike/xen-api,Frezzle/xen-api,agimofcarmen/xen-api,koushikcgit/xen-api,anoobs/xen-api,cheng--zhang/xen-api,salvocambria/xen-api,simonjbeaumont/xen-api,jjd27/xen-api,cheng-z/xen-api,koushikcgit/xen-api,djs55/xen-api,jjd27/xen-api,huizh/xen-api,ravippandey/xen-api,cheng--zhang/xen-api,vasilenkomike/xen-api,srowe/xen-api,rafalmiel/xen-api,jjd27/xen-api,djs55/xen-api,euanh/xen-api,salvocambria/xen-api,djs55/xen-api,guard163/xen-api,thomassa/xen-api,cheng-z/xen-api,ravippandey/xen-api,huizh/xen-api,ravippandey/xen-api,djs55/xen-api,thomassa/xen-api,anoobs/xen-api,vasilenkomike/xen-api,anoobs/xen-api,guard163/xen-api,euanh/xen-api,cheng-z/xen-api,vasilenkomike/xen-api,robertbreker/xen-api,robertbreker/xen-api,srowe/xen-api,huizh/xen-api,huizh/xen-api,koushikcgit/xen-api,salvocambria/xen-api,cheng--zhang/xen-api,koushikcgit/xen-api,cheng--zhang/xen-api,jjd27/xen-api,huizh/xen-api,Frezzle/xen-api,agimofcarmen/xen-api,djs55/xen-api,guard163/xen-api,rafalmiel/xen-api,euanh/xen-api,cheng-z/xen-api,cheng--zhang/xen-api,cheng--zhang/xen-api,simonjbeaumont/xen-api,cheng--zhang/xen-api,euanh/xen-api,srowe/xen-api,ravippandey/xen-api