1nbdkit-retry-filter(1)              NBDKIT              nbdkit-retry-filter(1)
2
3
4

NAME

6       nbdkit-retry-filter - reopen connection on error
7

SYNOPSIS

9        nbdkit --filter=retry PLUGIN [retries=N] [retry-delay=N]
10                                     [retry-exponential=yes|no]
11                                     [retry-readonly=yes|no]
12

DESCRIPTION

14       "nbdkit-retry-filter" is a filter that transparently reopens the plugin
15       connection when an error is encountered.  It can be used to make long-
16       running copy operations reliable in the presence of temporary network
17       failures, without requiring any changes to the plugin or the NBD
18       client.
19
20       Several optional parameters are available to control:
21
22       ·   how many times we retry,
23
24       ·   the delay between retries, and whether we wait longer each time
25           (known as “exponential back-off”),
26
27       ·   if we reopen the plugin in read-only mode after the first failure.
28
29       The default (with no parameters) is designed to offer a happy medium
30       between recovering from short temporary failures but not doing anything
31       too bad when permanent or unrecoverable failures happen.  The default
32       behaviour is: we retry 5 times with exponential back-off, waiting in
33       total about 1 minute before we give up.
34

EXAMPLE

36       In this example we copy and convert a large file using
37       nbdkit-ssh-plugin(1), qemu-img(1) and nbdkit-captive(1).
38
39        nbdkit -U - \
40          ssh host=remote.example.com /var/tmp/test.iso \
41          --filter=retry \
42          --run 'qemu-img convert -p -f raw $nbd -O qcow2 test.qcow2'
43
44       Without --filter=retry a temporary failure would cause the copy to fail
45       (for example, the remote host’s firewall is restarted causing the SSH
46       connection to be dropped).  Adding this filter means that it may be
47       possible to transparently recover.
48

PARAMETERS

50       retries=N
51           The number of times any single operation will be retried before we
52           give up and fail the operation.  The default is 5.
53
54       retry-delay=N
55           The number of seconds to wait before retrying.  The default is 2
56           seconds.
57
58       retry-exponential=yes
59           Use exponential back-off.  The retry delay is doubled between each
60           retry.  This is the default.
61
62       retry-exponential=no
63           Do not use exponential back-off.  The retry delay is the same
64           between each retry.
65
66       retry-readonly=yes
67           As soon as a failure occurs, switch the underlying plugin to read-
68           only mode for the rest of this connection.  (A new NBD client
69           connection will still open the plugin in the original mode.)
70
71       retry-readonly=no
72           Do not change the read-write/read-only mode of the plugin when
73           retrying.  This is the default.
74

FILES

76       $filterdir/nbdkit-retry-filter.so
77           The filter.
78
79           Use "nbdkit --dump-config" to find the location of $filterdir.
80

VERSION

82       "nbdkit-retry-filter" first appeared in nbdkit 1.16.
83

SEE ALSO

85       nbdkit(1), nbdkit-filter(3), nbdkit-readahead-filter(1).
86

AUTHORS

88       Richard W.M. Jones
89
91       Copyright (C) 2019 Red Hat Inc.
92

LICENSE

94       Redistribution and use in source and binary forms, with or without
95       modification, are permitted provided that the following conditions are
96       met:
97
98       ·   Redistributions of source code must retain the above copyright
99           notice, this list of conditions and the following disclaimer.
100
101       ·   Redistributions in binary form must reproduce the above copyright
102           notice, this list of conditions and the following disclaimer in the
103           documentation and/or other materials provided with the
104           distribution.
105
106       ·   Neither the name of Red Hat nor the names of its contributors may
107           be used to endorse or promote products derived from this software
108           without specific prior written permission.
109
110       THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND ANY
111       EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
112       IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
113       PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR CONTRIBUTORS BE
114       LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
115       CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
116       SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
117       BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
118       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
119       OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
120       ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
121
122
123
124nbdkit-1.18.4                     2020-04-16            nbdkit-retry-filter(1)
Impressum