Skip to content

Commit cc7f2b3

Browse files
committed
CA-419227 Add logs for debug
Signed-off-by: Changlei Li <changlei.li@cloud.com>
1 parent 5c46300 commit cc7f2b3

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 "VM power state changed from %s to %s"
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
@@ -1095,6 +1095,7 @@ let vdi_copy_fun __context dbg vdi_map remote is_intra_pool remote_vdis so_far
10951095
) ;
10961096
result
10971097
with e ->
1098+
error "Catch error in post_mirror: %s" (Printexc.to_string e) ;
10981099
let mirror_failed =
10991100
match mirror_id with
11001101
| Some mid ->

0 commit comments

Comments
 (0)