[Libguestfs] [PATCH nbdkit 0/2] Add new retry filter.

Richard W.M. Jones rjones at redhat.com
Thu Sep 19 11:34:15 UTC 2019


This is a retry filter implementation as outlined here:
https://www.redhat.com/archives/libguestfs/2019-September/msg00167.html

It is only lightly tested.  One way to test it is to try an SSH copy
(see the commit message for patch 2/2), and in the middle of the copy
kill the per-connection sshd on the remote machine.  You will see that
the copy recovers after a few seconds.  Add the nbdkit -v option to
see some useful messages from the filter:

  ...
  nbdkit: ssh[1]: debug: ssh: pread count=2097152 offset=216006656
  nbdkit: ssh[1]: error: read failed: Socket error: Connection reset by peer (-1)
  nbdkit: ssh[1]: debug: retry 1: original errno = 5
  nbdkit: ssh[1]: debug: waiting 2 seconds before retrying
  nbdkit: ssh[1]: debug: ssh: reopen
  nbdkit: ssh[1]: debug: close
  nbdkit: ssh[1]: error: cannot close file: Socket error: Connection reset by peer
  nbdkit: ssh[1]: debug: ssh: open readonly=0
  nbdkit: ssh[1]: debug: opened libssh handle
  nbdkit: ssh[1]: debug: ssh: pread count=2097152 offset=216006656
  ...

It really needs an actual test, which is tricky to implement.  My
thinking currently is that a custom (sh) plugin is the way to go, but
it would also be nice to test curl/ssh/vddk with this filter -- if
anyone has any suggestions on how to do that ...

This patch will probably conflict with Eric's series here:
https://www.redhat.com/archives/libguestfs/2019-September/msg00180.html
but that shouldn't be too hard to fix up.

Rich.





More information about the Libguestfs mailing list