CA-32920: unbreak the operation of 'xe host-emergency-ha-disable'
CA-32920: unbreak the operation of 'xe host-emergency-ha-disable'

When the HA statefile cannot be accessed a slave must wait forever for the statefile to return *or* for the user to use the command:

 xe host-emergency-ha-disable --force

In order for this command to work we must not attempt to use the database before this HA startup code because any database access attempt will block.

So:
Modify the 'Hi-level database upgrade' to only run on a master since (a) only the master has to perform database upgrades anyway; and (b) it attempts to use the database before HA is running

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

huizh/xen-api,cheng-z/xen-api,cheng--zhang/xen-api,srowe/xen-api,srowe/xen-api,anoobs/xen-api,cheng-z/xen-api,huizh/xen-api,robertbreker/xen-api,salvocambria/xen-api,simonjbeaumont/xen-api,simonjbeaumont/xen-api,djs55/xen-api,jjd27/xen-api,koushikcgit/xcp-networkd,Frezzle/xen-api,euanh/xen-api,guard163/xen-api,vasilenkomike/xen-api,rafalmiel/xen-api,guard163/xen-api,jjd27/xen-api,jjd27/xen-api,koushikcgit/xen-api,huizh/xen-api,euanh/xen-api,thomassa/xen-api,salvocambria/xen-api,thomassa/xen-api,guard163/xen-api,Frezzle/xen-api,djs55/xcp-rrdd,jjd27/xen-api,djs55/squeezed,robertbreker/xen-api,Frezzle/xen-api,huizh/xen-api,sharady/xcp-networkd,cheng-z/xen-api,johnelse/xcp-rrdd,djs55/xcp-networkd,djs55/xcp-rrdd,ravippandey/xen-api,thomassa/xen-api,euanh/xen-api,guard163/xen-api,simonjbeaumont/xcp-rrdd,ravippandey/xen-api,vasilenkomike/xen-api,ravippandey/xen-api,simonjbeaumont/xcp-rrdd,srowe/xen-api,anoobs/xen-api,cheng-z/xen-api,cheng--zhang/xen-api,anoobs/xen-api,srowe/xen-api,Frezzle/xen-api,thomassa/xen-api,robertbreker/xen-api,jjd27/xen-api,vasilenkomike/xen-api,ravippandey/xen-api,cheng--zhang/xen-api,koushikcgit/xen-api,cheng--zhang/xen-api,salvocambria/xen-api,Frezzle/xen-api,salvocambria/xen-api,cheng-z/xen-api,anoobs/xen-api,koushikcgit/xcp-networkd,robertbreker/xen-api,djs55/xen-api,koushikcgit/xcp-rrdd,vasilenkomike/xen-api,koushikcgit/xen-api,djs55/xcp-networkd,vasilenkomike/xen-api,cheng--zhang/xen-api,djs55/xen-api,djs55/xen-api,rafalmiel/xen-api,koushikcgit/xcp-rrdd,salvocambria/xen-api,rafalmiel/xen-api,rafalmiel/xen-api,agimofcarmen/xen-api,cheng-z/xen-api,koushikcgit/xen-api,robertbreker/xen-api,johnelse/xcp-rrdd,thomassa/xen-api,cheng--zhang/xen-api,rafalmiel/xen-api,cheng--zhang/xen-api,koushikcgit/xen-api,agimofcarmen/xen-api,simonjbeaumont/xen-api,anoobs/xen-api,robhoes/squeezed,robertbreker/xen-api,simonjbeaumont/xen-api,euanh/xen-api,thomassa/xen-api,agimofcarmen/xen-api,koushikcgit/xcp-rrdd,ravippandey/xen-api,huizh/xen-api,djs55/xen-api,simonjbeaumont/xen-api,agimofcarmen/xen-api,anoobs/xen-api,rafalmiel/xen-api,euanh/xen-api,guard163/xen-api,vasilenkomike/xen-api,sharady/xcp-networkd,guard163/xen-api,djs55/xen-api,ravippandey/xen-api,cheng-z/xen-api,euanh/xen-api,jjd27/xen-api,salvocambria/xen-api,huizh/xen-api,agimofcarmen/xen-api,koushikcgit/xen-api,agimofcarmen/xen-api,simonjbeaumont/xen-api,srowe/xen-api