Skip to content

Commit d217e5d

Browse files
author
Jon Ludlam
committed
Merge pull request #1011 from johnelse/ca-96893
CA-96893: Remove xenopsd VmExtra metadata from filesystem after suspend and migrate.
2 parents f47b141 + fb9449b commit d217e5d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

ocaml/xapi/xapi_xenops.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,8 @@ let update_vm ~__context id =
829829
error "Suspended VM has no domain-specific metadata"
830830
| Some x ->
831831
Db.VM.set_last_booted_record ~__context ~self ~value:x;
832-
debug "VM %s last_booted_record set to %s" (Ref.string_of self) x
832+
debug "VM %s last_booted_record set to %s" (Ref.string_of self) x;
833+
Xenopsd_metadata.delete ~__context id
833834
end;
834835
if power_state = `Halted
835836
then !trigger_xenapi_reregister ();

ocaml/xenops/xenops_server_xen.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,8 @@ module VM = struct
791791
(fun xc xs ->
792792
safe_rm xs (Printf.sprintf "/vm/%s" vm.Vm.id);
793793
safe_rm xs (Printf.sprintf "/vss/%s" vm.Vm.id);
794-
)
794+
);
795+
DB.remove vm.Vm.id
795796

796797
let log_exn_continue msg f x = try f x with e -> debug "Safely ignoring exception: %s while %s" (Printexc.to_string e) msg
797798

0 commit comments

Comments
 (0)