Skip to content

Commit 6a8ebd7

Browse files
author
Jon Ludlam
committed
Merge pull request #1016 from johnelse/ca-98936
CA-98936: Stop xapi from creating files in /tmp every time it gets an update from xenopsd
2 parents 9b19f9a + 37295a5 commit 6a8ebd7

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

ocaml/xapi/xapi_xenops.ml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -664,8 +664,6 @@ module Xenopsd_metadata = struct
664664
delete_nolock ~__context id
665665
)
666666

667-
let counter = ref 0
668-
669667
let update ~__context ~self =
670668
let id = id_of_vm ~__context ~self in
671669
Mutex.execute metadata_m
@@ -674,15 +672,6 @@ module Xenopsd_metadata = struct
674672
if vm_exists_in_xenopsd dbg id
675673
then
676674
let txt = create_metadata ~__context ~upgrade:false ~self |> Metadata.rpc_of_t |> Jsonrpc.to_string in
677-
begin match Xapi_cache.find_nolock id with
678-
| Some old ->
679-
if old <> txt then begin
680-
Unixext.write_string_to_file (Printf.sprintf "/tmp/metadata.old.%d" !counter) old;
681-
Unixext.write_string_to_file (Printf.sprintf "/tmp/metadata.new.%d" !counter) txt;
682-
incr counter
683-
end
684-
| None -> ()
685-
end;
686675
begin match Xapi_cache.find_nolock id with
687676
| Some old when old = txt -> ()
688677
| _ ->

0 commit comments

Comments
 (0)