Skip to content

Commit 3bb0e51

Browse files
committed
xapi_ha_vm_failover: remove superfluous debug message
It didn't add any useful information to the error. Also cleaned up the formatting of some comments found during the patch series. Signed-off-by: Pau Ruiz Safont <[email protected]>
1 parent 81bbeef commit 3bb0e51

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

ocaml/xapi/xapi_ha_vm_failover.ml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,9 +1223,6 @@ let assert_configuration_change_preserves_ha_plan ~__context c =
12231223
"assert_configuration_change_preserves_ha_plan: plan exists after \
12241224
change"
12251225
| Plan_exists_excluding_non_agile_VMs | No_plan_exists ->
1226-
debug
1227-
"assert_configuration_change_preserves_ha_plan: proposed change \
1228-
breaks plan" ;
12291226
raise
12301227
(Api_errors.Server_error
12311228
(Api_errors.ha_operation_would_break_failover_plan, [])
@@ -1413,8 +1410,9 @@ let restart_auto_run_vms ~__context ~last_live_set ~live_set n =
14131410
let open TaskChains.Infix in
14141411
(* execute the plan *)
14151412
Helpers.call_api_functions ~__context (fun rpc session_id ->
1416-
(* Helper function to start a VM somewhere. If the HA overcommit protection stops us then disable it and try once more.
1417-
Returns true if the VM was restarted and false otherwise. *)
1413+
(* Helper function to start a VM somewhere. If the HA overcommit
1414+
protection stops us then disable it and try once more. Returns true if
1415+
the VM was restarted and false otherwise. *)
14181416
let restart_vm vm ?host () =
14191417
let go () =
14201418
( if Xapi_fist.simulate_restart_failure () then
@@ -1579,10 +1577,11 @@ let restart_auto_run_vms ~__context ~last_live_set ~live_set n =
15791577
in
15801578
gc_table last_start_attempt ;
15811579
gc_table restart_failed ;
1582-
(* Consider restarting the best-effort VMs we *think* have failed (but we might get this wrong --
1583-
ok since this is 'best-effort'). NOTE we do not use the restart_vm function above as this will mark the
1584-
pool as overcommitted if an HA_OPERATION_WOULD_BREAK_FAILOVER_PLAN is received (although this should never
1585-
happen it's better safe than sorry) *)
1580+
(* Consider restarting the best-effort VMs we *think* have failed (but we
1581+
might get this wrong -- ok since this is 'best-effort'). NOTE we do
1582+
not use the restart_vm function above as this will mark the pool as
1583+
overcommitted if an HA_OPERATION_WOULD_BREAK_FAILOVER_PLAN is received
1584+
(although this should never happen it's better safe than sorry) *)
15861585
let is_best_effort r =
15871586
r.API.vM_ha_restart_priority = Constants.ha_restart_best_effort
15881587
&& r.API.vM_power_state = `Halted

ocaml/xapi/xapi_vif_helpers.ml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,7 @@ let create ~__context ~device ~network ~vM ~mAC ~mTU ~other_config
290290
in
291291
let new_device = int_of_string device in
292292
if List.exists (fun (_, d) -> d = new_device) all_vifs_with_devices then
293-
raise
294-
(Api_errors.Server_error (Api_errors.device_already_exists, [device])) ;
293+
raise Api_errors.(Server_error (device_already_exists, [device])) ;
295294

296295
(* If the VM uses a PVS_proxy, then the proxy _must_ be associated with
297296
the VIF that has the lowest device number. Check that the new VIF

0 commit comments

Comments
 (0)