(* Open the data channel *)
let s = listen_on sock in
let data_client = accept_conn s target_response_time in
- R.debug "Accepted connection on data socket";
+ R.info "Accepted connection on data socket";
ignore_exn (fun () -> Unix.close s);
(* Read all the data from the data channel, writing it straight into the block device, keeping track of accumulated length *)
)
(fun () ->
(* Close the connection *)
+ R.info "Closing connection on data socket";
ignore_exn (fun () -> Unix.close data_client)
) in
R.debug "Finished reading from data socket";
(* Terminate the child process *)
let ipid = Forkhelpers.getpid p in
- R.debug "Killing I/O process with pid %d" ipid;
+ R.info "Killing I/O process with pid %d" ipid;
Unix.kill ipid Sys.sigkill;
(* Wait for the process to die. This is done in a separate thread in case it does not respond to the signal immediately. *)
ignore (Thread.create (fun () ->
(* Start the I/O process *)
let [ctrlsockpath; datasockpath] = List.map (fun suffix -> Filename.temp_file Xapi_globs.redo_log_comms_socket_stem suffix) ["ctrl"; "data"] in
- R.debug "Starting I/O process with block device [%s], control socket [%s] and data socket [%s]" block_dev ctrlsockpath datasockpath;
+ R.info "Starting I/O process with block device [%s], control socket [%s] and data socket [%s]" block_dev ctrlsockpath datasockpath;
let p = start_io_process block_dev ctrlsockpath datasockpath in
pid := Some (p, ctrlsockpath, datasockpath);
- R.debug "Block device I/O process has PID [%d]" (Forkhelpers.getpid p)
+ R.info "Block device I/O process has PID [%d]" (Forkhelpers.getpid p)
end
end
end;
match !pid with
| None -> ()
| Some (_, _, datasockpath) ->
+ R.debug "About to perform action %s" desc;
f sock datasockpath;
+ R.debug "Action '%s' completed successfully" desc;
healthy () (* no exceptions: we can be confident that the redo log is working healthily *)
with
| Unixext.Timeout ->