[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-API] [PATCH] tidy up stunnel-related logging a bit
# HG changeset patch # User David Scott <dave.scott@xxxxxxxxxxxxx> # Date 1268773002 0 # Node ID eca655c1a7c86ac7ce924e2f72ff542669c5be98 # Parent 86257cf86017409b3c7e268f6950a6323bcdece7 CA-38120: tidy up stunnel-related logging a bit by adding the host and port as well as pid. Signed-off-by: David Scott <dave.scott@xxxxxxxxxxxxx> diff -r 86257cf86017 -r eca655c1a7c8 ocaml/idl/ocaml_backend/xmlrpcclient.ml --- a/ocaml/idl/ocaml_backend/xmlrpcclient.ml Tue Mar 16 15:11:05 2010 +0000 +++ b/ocaml/idl/ocaml_backend/xmlrpcclient.ml Tue Mar 16 20:56:42 2010 +0000 @@ -339,6 +339,7 @@ Stunnel.connect ~use_external_fd_wrapper ~write_to_log ~unique_id ~verify_cert ~extended_diagnosis:true host port in let s = st_proc.Stunnel.fd in let s_pid = Stunnel.getpid st_proc.Stunnel.pid in + info "stunnel pid: %d (cached = %b) connected to %s:%d" s_pid use_stunnel_cache host port; begin match task_id with None -> debug "Did not write stunnel pid: no task passed to http_rpc fn" @@ -352,11 +353,11 @@ try let content_length, task_id = http_rpc_fd s headers body in f content_length task_id s - with - | Connection_reset -> - if not use_stunnel_cache then - Stunnel.diagnose_failure st_proc; - raise Connection_reset) + with e -> + warn "stunnel pid: %d caught %s" s_pid (Printexc.to_string e); + if e = Connection_reset && not use_stunnel_cache + then Stunnel.diagnose_failure st_proc; + raise e) (fun () -> if use_stunnel_cache then diff -r 86257cf86017 -r eca655c1a7c8 ocaml/xapi/xapi.ml --- a/ocaml/xapi/xapi.ml Tue Mar 16 15:11:05 2010 +0000 +++ b/ocaml/xapi/xapi.ml Tue Mar 16 20:56:42 2010 +0000 @@ -202,7 +202,6 @@ let set_stunnelpid t s_pid = try Db.Task.set_stunnelpid ~__context:Context.initial ~self:(Ref.of_string t) ~value:(Int64.of_int s_pid); - debug "Set stunnel pid on forwarded call: %d" s_pid; with _ -> debug "Did not write stunnel pid: no task record in db for this action" in 2 files changed, 6 insertions(+), 6 deletions(-) ocaml/idl/ocaml_backend/xmlrpcclient.ml | 11 ++++++----- ocaml/xapi/xapi.ml | 1 - Attachment:
xen-api.hg.patch _______________________________________________ xen-api mailing list xen-api@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/mailman/listinfo/xen-api
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |