Skip to content

Commit 39b4835

Browse files
thomassamatthiasgoergens
authored andcommitted
CA-46656: A ha-restart-priority of any valid value means ha-always-run should be set to true when the VM starts.
Signed-off-by: Thomas Sanders <[email protected]> Acked-by: Jonathan Knowles <[email protected]>
1 parent 8a76328 commit 39b4835

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ocaml/xapi/xapi_vm.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(*
2-
* Copyright (C) 2006-2009 Citrix Systems Inc.
2+
* Copyright (C) 2006-2010 Citrix Systems Inc.
33
*
44
* This program is free software; you can redistribute it and/or modify
55
* it under the terms of the GNU Lesser General Public License as published
@@ -99,7 +99,7 @@ let set_ha_always_run ~__context ~self ~value =
9999
(* GUI not calling this anymore, now used internally in vm.start and vm.resume *)
100100
let assert_ha_always_run_is_true ~__context ~vm =
101101
let rp = Db.VM.get_ha_restart_priority ~__context ~self:vm in
102-
if (rp = "1" or rp = Constants.ha_restart_best_effort)
102+
if (List.mem rp (Constants.ha_valid_restart_priorities))
103103
then set_ha_always_run ~__context ~self:vm ~value:true
104104
(* GUI not calling this anymore, now used internally in vm.shutdown and vm.suspend *)
105105
let assert_ha_always_run_is_false ~__context ~vm =

0 commit comments

Comments
 (0)