Skip to content

Commit abdf1fb

Browse files
author
David Scott
committed
stunnel: work around INTERNAL_ERROR: s_poll_wait returned 0, but no descriptor is ready
When performing a storage migration we see a Tar.Header checksum mismatch during the initial remote metadata import. The sequence seems to be: * ubuntu opens remote SSL connection * ubuntu writes HTTP PUT * ubuntu proxies from a local HTTP GET -- this appears successful since the right amount of data is written to the socket as reported by the debug in the log * ubuntu closes the file descriptor to stunnel * stunnel logs an internal error: INTERNAL ERROR: s_poll_wait returned 0, but no descriptor is ready * the receiver only receives the HTTP PUT header, not the payload -- as measured by tcpdump The problem only manifests when stunnel is used. The problem goes away when the timing changes, for example when running xapi under strace. We work around this by sending the metadata plaintext. The problem doesn't manifest using the stunnel version on CentOS. stunnel versions On ubuntu raring: 4.53 On CentOS 6.4: 4.29-2 Signed-off-by: David Scott <[email protected]>
1 parent 7fdb9cd commit abdf1fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ocaml/xapi/importexport.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,8 @@ let remote_metadata_export_import ~__context ~rpc ~session_id ~remote_address wh
257257
(fun (r, ifd) ->
258258
debug "Content-length: %s" (Opt.default "None" (Opt.map Int64.to_string r.Http.Response.content_length));
259259
let put = { put with Http.Request.content_length = r.Http.Response.content_length } in
260-
debug "Connecting to %s:%d" remote_address !Xapi_globs.https_port;
261-
with_transport (SSL (SSL.make (), remote_address, !Xapi_globs.https_port))
260+
debug "Connecting to %s:%d" remote_address Xapi_globs.http_port;
261+
with_transport (TCP (remote_address, Xapi_globs.http_port))
262262
(with_http put
263263
(fun (_, ofd) ->
264264
let (n: int64) = Unixext.copy_file ?limit:r.Http.Response.content_length ifd ofd in

0 commit comments

Comments
 (0)