]> xenbits.xensource.com Git - xcp/xen-api.git/commitdiff
CA-47663 The host blob sync logs 10s of thousands of log lines per iteration
authorMike McClurg <mike.mcclurg@citrix.com>
Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)
committerMike McClurg <mike.mcclurg@citrix.com>
Wed, 26 Jan 2011 17:39:05 +0000 (17:39 +0000)
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 <mike.mcclurg@citrix.com>
ocaml/xapi/xapi_sync.ml

index 2127256eedb4873d58851dec8963c178c791728e..d3508d4cf19145bfb25b5383ea1ce18ec116b964 100644 (file)
@@ -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 _ -> ());