Re: [PATCH v2] nbd/server: Suppress Broken pipe errors on abrupt disconnection

2021-11-17 Thread Eric Blake
Revisiting an older thread On Mon, Sep 13, 2021 at 04:19:36PM +0100, Richard W.M. Jones wrote: > $ rm -f /tmp/sock /tmp/pid > $ qemu-img create -f qcow2 /tmp/disk.qcow2 1M > $ qemu-nbd -t --format=qcow2 --socket=/tmp/sock --pid-file=/tmp/pid > /tmp/disk.qcow2 & > $ nbdsh -u 'nbd+unix:///?socket=/

Re: [PATCH v2] nbd/server: Suppress Broken pipe errors on abrupt disconnection

2021-09-17 Thread Eric Blake
On Wed, Sep 15, 2021 at 12:11:35PM +0300, Vladimir Sementsov-Ogievskiy wrote: > > > >There are two methods of terminating the transmission phase: > > > >... > > > >"The client or the server drops the TCP session (in which case it > > > >SHOULD shut down the TLS session first). This

Re: [PATCH v2] nbd/server: Suppress Broken pipe errors on abrupt disconnection

2021-09-17 Thread Eric Blake
On Wed, Sep 15, 2021 at 10:00:25AM +0100, Richard W.M. Jones wrote: > > >I would say the spec is at best contradictory, but if you read other > > >parts of the spec, then it's pretty clear that we're allowed to drop > > >the connection whenever we like. This section says as much: > > > > > >https:

Re: [PATCH v2] nbd/server: Suppress Broken pipe errors on abrupt disconnection

2021-09-15 Thread Vladimir Sementsov-Ogievskiy
15.09.2021 12:00, Richard W.M. Jones wrote: On Wed, Sep 15, 2021 at 10:15:20AM +0300, Vladimir Sementsov-Ogievskiy wrote: 14.09.2021 19:32, Richard W.M. Jones wrote: On Tue, Sep 14, 2021 at 06:21:58PM +0300, Vladimir Sementsov-Ogievskiy wrote: 14.09.2021 17:52, Richard W.M. Jones wrote: On th

Re: [PATCH v2] nbd/server: Suppress Broken pipe errors on abrupt disconnection

2021-09-15 Thread Richard W.M. Jones
On Wed, Sep 15, 2021 at 10:15:20AM +0300, Vladimir Sementsov-Ogievskiy wrote: > 14.09.2021 19:32, Richard W.M. Jones wrote: > >On Tue, Sep 14, 2021 at 06:21:58PM +0300, Vladimir Sementsov-Ogievskiy wrote: > >>14.09.2021 17:52, Richard W.M. Jones wrote: > >>>On the > >>>server side when the server r

Re: [PATCH v2] nbd/server: Suppress Broken pipe errors on abrupt disconnection

2021-09-15 Thread Vladimir Sementsov-Ogievskiy
14.09.2021 19:32, Richard W.M. Jones wrote: On Tue, Sep 14, 2021 at 06:21:58PM +0300, Vladimir Sementsov-Ogievskiy wrote: 14.09.2021 17:52, Richard W.M. Jones wrote: On the server side when the server receives NBD_CMD_DISC it must complete any in-flight requests, but there's no requirement for

Re: [PATCH v2] nbd/server: Suppress Broken pipe errors on abrupt disconnection

2021-09-14 Thread Eric Blake
On Tue, Sep 14, 2021 at 05:40:59PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 13.09.2021 18:19, Richard W.M. Jones wrote: > > $ rm -f /tmp/sock /tmp/pid > > $ qemu-img create -f qcow2 /tmp/disk.qcow2 1M > > $ qemu-nbd -t --format=qcow2 --socket=/tmp/sock --pid-file=/tmp/pid > > /tmp/disk.qcow2 &

Re: [PATCH v2] nbd/server: Suppress Broken pipe errors on abrupt disconnection

2021-09-14 Thread Eric Blake
[IOn Tue, Sep 14, 2021 at 03:52:00PM +0100, Richard W.M. Jones wrote: > On Tue, Sep 14, 2021 at 05:40:59PM +0300, Vladimir Sementsov-Ogievskiy wrote: > > 13.09.2021 18:19, Richard W.M. Jones wrote: > > >$ rm -f /tmp/sock /tmp/pid > > >$ qemu-img create -f qcow2 /tmp/disk.qcow2 1M > > >$ qemu-nbd -t

Re: [PATCH v2] nbd/server: Suppress Broken pipe errors on abrupt disconnection

2021-09-14 Thread Richard W.M. Jones
On Tue, Sep 14, 2021 at 06:21:58PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 14.09.2021 17:52, Richard W.M. Jones wrote: > > On the > >server side when the server receives NBD_CMD_DISC it must complete any > >in-flight requests, but there's no requirement for the server to > >commit anything to

Re: [PATCH v2] nbd/server: Suppress Broken pipe errors on abrupt disconnection

2021-09-14 Thread Vladimir Sementsov-Ogievskiy
14.09.2021 17:52, Richard W.M. Jones wrote: On Tue, Sep 14, 2021 at 05:40:59PM +0300, Vladimir Sementsov-Ogievskiy wrote: 13.09.2021 18:19, Richard W.M. Jones wrote: $ rm -f /tmp/sock /tmp/pid $ qemu-img create -f qcow2 /tmp/disk.qcow2 1M $ qemu-nbd -t --format=qcow2 --socket=/tmp/sock --pid-fi

Re: [PATCH v2] nbd/server: Suppress Broken pipe errors on abrupt disconnection

2021-09-14 Thread Richard W.M. Jones
On Tue, Sep 14, 2021 at 05:40:59PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 13.09.2021 18:19, Richard W.M. Jones wrote: > >$ rm -f /tmp/sock /tmp/pid > >$ qemu-img create -f qcow2 /tmp/disk.qcow2 1M > >$ qemu-nbd -t --format=qcow2 --socket=/tmp/sock --pid-file=/tmp/pid > >/tmp/disk.qcow2 & > >

Re: [PATCH v2] nbd/server: Suppress Broken pipe errors on abrupt disconnection

2021-09-14 Thread Vladimir Sementsov-Ogievskiy
13.09.2021 18:19, Richard W.M. Jones wrote: $ rm -f /tmp/sock /tmp/pid $ qemu-img create -f qcow2 /tmp/disk.qcow2 1M $ qemu-nbd -t --format=qcow2 --socket=/tmp/sock --pid-file=/tmp/pid /tmp/disk.qcow2 & $ nbdsh -u 'nbd+unix:///?socket=/tmp/sock' -c 'h.get_size()' qemu-nbd: Disconnect client, due