Skip to content

Commit e1f7646

Browse files
committed
CA-88864: Make sure that dom0 is marked as running when resynchronising HA state.
Signed-off-by: John Else <[email protected]>
1 parent ac82f8b commit e1f7646

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ocaml/xapi/xapi.ml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,12 @@ let resynchronise_ha_state () =
469469
try
470470
Server_helpers.exec_with_new_task "resynchronise_ha_state"
471471
(fun __context ->
472+
(* Make sure the control domain is marked as "running" - in the case of *)
473+
(* HA failover it will have been marked as "halted". *)
474+
let control_domain_uuid = Util_inventory.lookup Util_inventory._control_domain_uuid in
475+
let control_domain = Db.VM.get_by_uuid ~__context ~uuid:control_domain_uuid in
476+
Db.VM.set_power_state ~__context ~self:control_domain ~value:`Running;
477+
472478
let pool = Helpers.get_pool ~__context in
473479
let pool_ha_enabled = Db.Pool.get_ha_enabled ~__context ~self:pool in
474480
let local_ha_enabled = bool_of_string (Localdb.get Constants.ha_armed) in

0 commit comments

Comments
 (0)