File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -436,6 +436,10 @@ let xapi_clusterd_port = ref 8896
436
436
*)
437
437
let local_yum_repo_port = ref 8000
438
438
439
+ (* The maximum number of start attempts for HA best-effort VMs. Each attempt is
440
+ spaced 20 seconds apart. *)
441
+ let ha_best_effort_max_retries = ref 2
442
+
439
443
(* When a host is known to be shutting down or rebooting, we add it's reference in here.
440
444
This can be used to force the Host_metrics.live flag to false. *)
441
445
let hosts_which_are_shutting_down : API.ref_host list ref = ref []
@@ -1238,6 +1242,7 @@ let xapi_globs_spec =
1238
1242
; (" max_observer_file_size" , Int max_observer_file_size)
1239
1243
; (" test-open" , Int test_open) (* for consistency with xenopsd *)
1240
1244
; (" local_yum_repo_port" , Int local_yum_repo_port)
1245
+ ; (" ha_best_effort_max_retries" , Int ha_best_effort_max_retries)
1241
1246
]
1242
1247
1243
1248
let xapi_globs_spec_with_descriptions =
Original file line number Diff line number Diff line change @@ -1654,7 +1654,10 @@ let restart_auto_run_vms ~__context ~last_live_set ~live_set n =
1654
1654
tried_best_eff_vms :=
1655
1655
VMMap. update vm
1656
1656
(Option. fold ~none: (Some 1 ) ~some: (fun n ->
1657
- if n < 2 then Some (n + 1 ) else None
1657
+ if n < ! Xapi_globs. ha_best_effort_max_retries then
1658
+ Some (n + 1 )
1659
+ else
1660
+ None
1658
1661
)
1659
1662
)
1660
1663
! tried_best_eff_vms ;
You can’t perform that action at this time.
0 commit comments