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       An alternative and more fine-grained filter is
21       nbdkit-retry-request-filter(1) which will retry only single requests
22       that fail.
23
24       Several optional parameters are available to control:
25
26       •   how many times we retry,
27
28       •   the delay between retries, and whether we wait longer each time
29           (known as “exponential back-off”),
30
31       •   if we reopen the plugin in read-only mode after the first failure.
32
33       The default (with no parameters) is designed to offer a happy medium
34       between recovering from short temporary failures but not doing anything
35       too bad when permanent or unrecoverable failures happen.  The default
36       behaviour is: we retry 5 times with exponential back-off, waiting in
37       total about 1 minute before we give up.
38

EXAMPLE

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

PARAMETERS

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

FILES

80       $filterdir/nbdkit-retry-filter.so
81           The filter.
82
83           Use "nbdkit --dump-config" to find the location of $filterdir.
84

VERSION

86       "nbdkit-retry-filter" first appeared in nbdkit 1.16.
87

SEE ALSO

89       nbdkit(1), nbdkit-filter(3), nbdkit-readahead-filter(1),
90       nbdkit-retry-request-filter(1).
91

AUTHORS

93       Richard W.M. Jones
94
96       Copyright (C) 2019 Red Hat Inc.
97

LICENSE

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