Skip to content

Commit d4c99a8

Browse files
committed
CA-419227 Add logs for debug
Signed-off-by: Changlei Li <[email protected]>
1 parent a3cbb5d commit d4c99a8

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

ocaml/xapi/xapi_vm_lifecycle.ml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,9 @@ let force_state_reset_keep_current_operations ~__context ~self ~value:state =
862862
(* First update the power_state. Some operations below indirectly rely on this. *)
863863
let old_state = Db.VM.get_power_state ~__context ~self in
864864
Db.VM.set_power_state ~__context ~self ~value:state ;
865+
debug "%s: VM power state changed from %s to %s" __FUNCTION__
866+
(Record_util.vm_power_state_to_string old_state)
867+
(Record_util.vm_power_state_to_string state) ;
865868
if state = `Suspended then
866869
remove_pending_guidance ~__context ~self ~value:`restart_device_model ;
867870
if state = `Halted then (

ocaml/xapi/xapi_vm_migrate.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,6 +1100,7 @@ let vdi_copy_fun __context dbg vdi_map remote is_intra_pool remote_vdis so_far
11001100
) ;
11011101
result
11021102
with e ->
1103+
error "Catch error in post_mirror: %s" (Printexc.to_string e) ;
11031104
let mirror_failed =
11041105
match mirror_id with
11051106
| Some mid ->

0 commit comments

Comments
 (0)