From e1f5c5d21c256e64d53c9a66a2e2ec73ea7bc15a Mon Sep 17 00:00:00 2001 From: Mike McClurg Date: Wed, 26 Jan 2011 17:39:05 +0000 Subject: [PATCH] CA-47663 The host blob sync logs 10s of thousands of log lines per iteration The rsync command called by Xapi_sync.sync_host was given the -v (verbose) option, which made it spew tens of thousands of lines into the xensource.log file. I removed the -v option and added --stats in order to keep the file transfer summaries in the output. Signed-off-by: Mike McClurg --- ocaml/xapi/xapi_sync.ml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ocaml/xapi/xapi_sync.ml b/ocaml/xapi/xapi_sync.ml index 2127256e..d3508d4c 100644 --- a/ocaml/xapi/xapi_sync.ml +++ b/ocaml/xapi/xapi_sync.ml @@ -35,9 +35,12 @@ let sync_host ~__context host = and session = Xapi_session.slave_login ~__context ~host:(Helpers.get_localhost ~__context) ~psecret:!Xapi_globs.pool_secret in Unix.putenv "XSH_SESSION" (Ref.string_of session); - let env = Unix.environment () in - let output,log = Forkhelpers.execute_command_get_output ~env "/usr/bin/rsync" ["--delete";"-avz";localpath;remotepath;"-e";"/opt/xensource/bin/xsh"] in - debug "sync output: '%s' log: '%s'" output log; + let output,log = Forkhelpers.execute_command_get_output + ~env:(Unix.environment ()) + "/usr/bin/rsync" + ["--delete";"--stats";"-az";localpath;remotepath;"-e";"/opt/xensource/bin/xsh"] in + debug "sync output: \n%s" output; + debug "log output: '%s'" log; (* Store the last blob sync time in the Host.other_config *) (try Db.Host.remove_from_other_config ~__context ~self:host ~key:Xapi_globs.last_blob_sync_time with _ -> ()); -- 2.39.5