Add new retry filter.
commitf0f0ec497d36ba7753fdfd0bd322507613d1e276
authorRichard W.M. Jones <rjones@redhat.com>
Thu, 19 Sep 2019 09:36:54 +0000 (19 10:36 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Fri, 20 Sep 2019 12:46:49 +0000 (20 13:46 +0100)
tree417eb801b639dc20d98ec774247b635fea3a3b34
parentfb72fcd1d8dff02a02e4c473ff09c813bef09b65
Add new retry filter.

This filter can be used to transparently reopen/retry when a plugin
fails.  The connection is closed and reopened which for most plugins
causes them to attempt to reconnect to their source.

For example if doing a long or slow SSH copy:

  nbdkit -U - ssh host=remote /var/tmp/test.iso \
    --run 'qemu-img convert -p -f raw $nbd -O qcow2 test.qcow2'

if the SSH connection or network goes down in the middle then the
whole operation will fail.

By adding the retry filter:

  nbdkit -U - ssh --filter=retry host=remote /var/tmp/test.iso \
    --run 'qemu-img convert -p -f raw $nbd -O qcow2 test.qcow2'

this operation can recover from temporary failures in at least some
circumstances.  The NBD connection (a local Unix domain socket in the
example above) is not interrupted during retries, so NBD clients don't
need to be taught how to retry - everything is handled internally by
nbdkit.
TODO
configure.ac
docs/nbdkit-captive.pod
filters/readahead/nbdkit-readahead-filter.pod
filters/retry/Makefile.am [new file with mode: 0644]
filters/retry/nbdkit-retry-filter.pod [new file with mode: 0644]
filters/retry/retry.c [new file with mode: 0644]
plugins/curl/nbdkit-curl-plugin.pod
plugins/ssh/nbdkit-ssh-plugin.pod
plugins/vddk/nbdkit-vddk-plugin.pod