Signed-off-by: Jon Ludlam <[email protected]>

 ocaml/xapi/xapi_sync.ml |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)


# HG changeset patch
# User Jonathan Ludlam <[email protected]>
# Date 1268740880 0
# Node ID 082b2db9f2f70d419717dcec5daac88e53908c08
# Parent  d455f3c74966447903add709174b57c8c50cc511
CA-36696: The fork-and-exec daemon patch broke syncing of data between hosts by failing to pass the environment, in which the session to use lives. This patch fixes it.

Signed-off-by: Jon Ludlam <[email protected]>

diff -r d455f3c74966 -r 082b2db9f2f7 ocaml/xapi/xapi_sync.ml
--- a/ocaml/xapi/xapi_sync.ml	Fri Mar 12 15:19:41 2010 +0000
+++ b/ocaml/xapi/xapi_sync.ml	Tue Mar 16 12:01:20 2010 +0000
@@ -41,7 +41,8 @@
 	let remotepath = Printf.sprintf "%s:%s" address Xapi_globs.xapi_blob_location in
 	let 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 output,log = Forkhelpers.execute_command_get_output "/usr/bin/rsync" ["--delete";"-avz";localpath;remotepath;"-e";"/opt/xensource/bin/xsh"] in
+	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;
 	post_sync_hook __context host
       end else begin
_______________________________________________
xen-api mailing list
[email protected]
http://lists.xensource.com/mailman/listinfo/xen-api

Reply via email to