]> xenbits.xensource.com Git - xcp/xen-api.git/commitdiff
CA-46656: A ha-restart-priority of any valid value means ha-always-run should be...
authorThomas Sanders <thomas.sanders@citrix.com>
Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)
committerThomas Sanders <thomas.sanders@citrix.com>
Wed, 26 Jan 2011 17:39:04 +0000 (17:39 +0000)
Signed-off-by: Thomas Sanders <thomas.sanders@citrix.com>
Acked-by: Jonathan Knowles <jonathan.knowles@eu.citrix.com>
ocaml/xapi/xapi_vm.ml

index 5c9839b3772ca7f0c78b15edb46c2f50af55681b..12cd4feabd70f13b5a81a414aafb41fb6804756b 100644 (file)
@@ -1,5 +1,5 @@
 (*
- * Copyright (C) 2006-2009 Citrix Systems Inc.
+ * Copyright (C) 2006-2010 Citrix Systems Inc.
  *
  * This program is free software; you can redistribute it and/or modify
  * 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 =
 (* GUI not calling this anymore, now used internally in vm.start and vm.resume *)
 let assert_ha_always_run_is_true ~__context ~vm =
        let rp = Db.VM.get_ha_restart_priority ~__context ~self:vm in
-       if (rp = "1" or rp = Constants.ha_restart_best_effort)
+       if (List.mem rp (Constants.ha_valid_restart_priorities))
        then set_ha_always_run ~__context ~self:vm ~value:true
 (* GUI not calling this anymore, now used internally in vm.shutdown and vm.suspend *)
 let assert_ha_always_run_is_false ~__context ~vm =