Skip to content

Commit

Permalink
Merge pull request xapi-project#36 from akshayramani/CA-113570
Browse files Browse the repository at this point in the history
CA-113570: Handle exceptions thrown by xenguest
  • Loading branch information
robhoes committed Nov 7, 2013
2 parents 47073ac + 63b81aa commit 24b2de4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions xc/xenops_server_xen.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1287,8 +1287,10 @@ module VM = struct
error "VM %s: restore failed: %s" vm.Vm.id (Printexc.to_string e);
(* As of xen-unstable.hg 779c0ef9682 libxenguest will destroy the domain on failure *)
if try ignore(Xenctrl.domain_getinfo xc di.Xenctrl.domid); false with _ -> true then begin
debug "VM %s: libxenguest has destroyed domid %d; cleaning up xenstore for consistency" vm.Vm.id di.Xenctrl.domid;
Domain.destroy task ~xc ~xs ~qemu_domid di.Xenctrl.domid;
try
debug "VM %s: libxenguest has destroyed domid %d; cleaning up xenstore for consistency" vm.Vm.id di.Xenctrl.domid;
Domain.destroy task ~xc ~xs ~qemu_domid di.Xenctrl.domid;
with e -> debug "Domain.destroy failed. Re-raising original error."
end;
raise e
end;
Expand Down

0 comments on commit 24b2de4

Please sign in to comment.