Debian Bug report logs - #409531
nbd-server: timeout option not very useful

version graph

Package: nbd-server; Maintainer for nbd-server is Wouter Verhelst <wouter@debian.org>; Source for nbd-server is src:nbd (PTS, buildd, popcon).

Reported by: Vagrant Cascadian <vagrant+bugs@freegeek.org>

Date: Sat, 3 Feb 2007 20:03:11 UTC

Severity: normal

Tags: fixed-upstream, upstream

Found in version nbd/1:2.8.7-3

Fixed in version 1:2.9.13-1

Done: Wouter Verhelst <w@uter.be>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Wouter Verhelst <wouter@debian.org>:
Bug#409531; Package nbd-server. (full text, mbox, link).


Acknowledgement sent to Vagrant Cascadian <vagrant+bugs@freegeek.org>:
New Bug report received and forwarded. Copy sent to Wouter Verhelst <wouter@debian.org>. (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Vagrant Cascadian <vagrant+bugs@freegeek.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: nbd-server: timeout option not very useful
Date: Sat, 3 Feb 2007 11:54:49 -0800
Package: nbd-server
Version: 1:2.8.7-3
Severity: normal

when using nbd-server with the "-a timeout" option, it will often
disconnect running nbd-client instances that have merely been inactive
for a while. it would be much, much more useful if it implemented some
sort of "ping" to determine if the nbd-client instance is still there,
just not very active.

the workaround is just to have the machine running an nbd-client make
nbd accesses periodically just to keep the connection alive... but
that's kind of ugly.

live well,
  vagrant

-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-vserver-686
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages nbd-server depends on:
ii  debconf [debconf-2.0]       1.5.11       Debian configuration management sy
ii  libc6                       2.3.6.ds1-10 GNU C Library: Shared libraries
ii  libglib2.0-0                2.12.4-2     The GLib library of C routines

nbd-server recommends no packages.

-- debconf information excluded



Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#409531; Package nbd-server. (full text, mbox, link).


Acknowledgement sent to Wouter Verhelst <wouter@debian.org>:
Extra info received and forwarded to list. (full text, mbox, link).


Message #10 received at submit@bugs.debian.org (full text, mbox, reply):

From: Wouter Verhelst <wouter@debian.org>
To: Vagrant Cascadian <vagrant+bugs@freegeek.org>, 409531@bugs.debian.org
Cc: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: Re: Bug#409531: nbd-server: timeout option not very useful
Date: Sun, 4 Feb 2007 20:45:15 +0100
On Sat, Feb 03, 2007 at 11:54:49AM -0800, Vagrant Cascadian wrote:
> Package: nbd-server
> Version: 1:2.8.7-3
> Severity: normal
> 
> when using nbd-server with the "-a timeout" option, it will often
> disconnect running nbd-client instances that have merely been inactive
> for a while. it would be much, much more useful if it implemented some
> sort of "ping" to determine if the nbd-client instance is still there,
> just not very active.
> 
> the workaround is just to have the machine running an nbd-client make
> nbd accesses periodically just to keep the connection alive... but
> that's kind of ugly.

Or just do not use it at all. nbd-server does set the SO_KEEPALIVE
socket option, which will do such keepalive requests every once in a
while.  However, for that to kick in, it takes two hours (by default),
and then you still need a number of probes before it is actually
disconnected and the server killed.

Anyhow, if you want to write a patch that makes the -a option more
useful, feel free... but that would probably also require a kernel
patch, which I don't maintain.

-- 
<Lo-lan-do> Home is where you have to wash the dishes.
  -- #debian-devel, Freenode, 2004-09-22



Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#409531; Package nbd-server. (full text, mbox, link).


Acknowledgement sent to Wouter Verhelst <wouter@debian.org>:
Extra info received and forwarded to list. (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Wouter Verhelst <wouter@debian.org>:
Bug#409531; Package nbd-server. (full text, mbox, link).


Acknowledgement sent to Vagrant Cascadian <vagrant+bugs@freegeek.org>:
Extra info received and forwarded to list. Copy sent to Wouter Verhelst <wouter@debian.org>. (full text, mbox, link).


Message #20 received at 409531@bugs.debian.org (full text, mbox, reply):

From: Vagrant Cascadian <vagrant+bugs@freegeek.org>
To: Wouter Verhelst <wouter@debian.org>
Cc: 409531@bugs.debian.org
Subject: Re: Bug#409531: nbd-server: timeout option not very useful
Date: Sun, 4 Feb 2007 13:46:32 -0800
On Sun, Feb 04, 2007 at 08:45:15PM +0100, Wouter Verhelst wrote:
> On Sat, Feb 03, 2007 at 11:54:49AM -0800, Vagrant Cascadian wrote:
> > when using nbd-server with the "-a timeout" option, it will often
> > disconnect running nbd-client instances that have merely been inactive
> > for a while. it would be much, much more useful if it implemented some
> > sort of "ping" to determine if the nbd-client instance is still there,
> > just not very active.
> > 
> > the workaround is just to have the machine running an nbd-client make
> > nbd accesses periodically just to keep the connection alive... but
> > that's kind of ugly.
> 
> Or just do not use it at all. nbd-server does set the SO_KEEPALIVE
> socket option, which will do such keepalive requests every once in a
> while.  However, for that to kick in, it takes two hours (by default),
> and then you still need a number of probes before it is actually
> disconnected and the server killed.

hmmm... i'm not sure i understand you here.

are you saying that nbd-server instances disconnect if there is no
nbd-client process connecting to it after some period of time? i've seen
nbd-server instances run for days without an nbd-client connected to
them.

i would like for some sort of idle timeout mechanism, so that an
nbd-server instance doesn't indefinitely consume resources to no
purpose. if there's a way to get behavior like that without using the
"-a timeout", please let me know.
 
> Anyhow, if you want to write a patch that makes the -a option more
> useful, feel free... but that would probably also require a kernel
> patch, which I don't maintain.

and well over my head...

thanks for your work and time.

live well,
  vagrant



Information forwarded to debian-bugs-dist@lists.debian.org, Wouter Verhelst <wouter@debian.org>:
Bug#409531; Package nbd-server. (full text, mbox, link).


Acknowledgement sent to Ronny Aasen <ronny@aasen.cx>:
Extra info received and forwarded to list. Copy sent to Wouter Verhelst <wouter@debian.org>. (full text, mbox, link).


Message #25 received at 409531@bugs.debian.org (full text, mbox, reply):

From: Ronny Aasen <ronny@aasen.cx>
To: 409531@bugs.debian.org
Subject: Re: Bug#409531: nbd-server: timeout option not very useful
Date: Sun, 27 May 2007 23:24:25 +0200
> the workaround is just to have the machine running an nbd-client make
> nbd accesses periodically just to keep the connection alive... but
> that's kind of ugly.

I have tried this. 
basicaly i ran nbd-server using  -a 600  so it would timeout after 10 minutes
The nbd-client connects and working, sitting idle. 

then i had a script running on the client that did a   dd if=/dev/nbd0 of=/dev/null every 30 second.
so it read the whole device once every 30 secs.

it still did timeout after 600 sec.

must the device be written to for the timeout to reset ? 

Regards
Ronny Aasen







Information forwarded to debian-bugs-dist@lists.debian.org, Wouter Verhelst <wouter@debian.org>:
Bug#409531; Package nbd-server. (full text, mbox, link).


Acknowledgement sent to Petter Reinholdtsen <pere@hungry.com>:
Extra info received and forwarded to list. Copy sent to Wouter Verhelst <wouter@debian.org>. (full text, mbox, link).


Message #30 received at 409531@bugs.debian.org (full text, mbox, reply):

From: Petter Reinholdtsen <pere@hungry.com>
To: 409531@bugs.debian.org
Subject: Re: nbd-server: timeout option not very useful
Date: Mon, 28 May 2007 11:02:22 +0200
According to
<URL: https://sourceforge.net/tracker/index.php?func=detail&aid=819235&group_id=13229&atid=113229 >
and the tcp(7) manual page, the nbd server should disconnect the
connection after 2 hours 11 minutes if the client fail to respond to
tcp keepalive requests.  The keepalive feature was implemented in
2003, and is present in the Debian package.

Is the keepalive feature not working as it should?  I guess the
timeout should be removed if it isn't working, and we should get the
keepalive feature working instead.

Happy hacking,
-- 
Petter Reinholdtsen



Information forwarded to debian-bugs-dist@lists.debian.org, Wouter Verhelst <wouter@debian.org>:
Bug#409531; Package nbd-server. (full text, mbox, link).


Acknowledgement sent to vagrant@freegeek.org:
Extra info received and forwarded to list. Copy sent to Wouter Verhelst <wouter@debian.org>. (full text, mbox, link).


Message #35 received at 409531@bugs.debian.org (full text, mbox, reply):

From: vagrant@freegeek.org
To: 409531@bugs.debian.org
Subject: nbd and keepalive
Date: Thu, 6 Sep 2007 12:24:41 -0700
so, in ltsp we use a script called nbdswapd which is run from
openbsd-inetd, with an /etc/inetd.conf entry like so:

 9572 stream  tcp     nowait  nobody /usr/sbin/tcpd /usr/sbin/nbdswapd

nbdswapd is a simple script that dynamically creates a file and removes
it after the script finishes, but calls nbd-server like so:

 /bin/nbd-server 0 $FILE

keepalive doesn't happen unless i also add to /etc/hosts.allow:

 nbdswapd: ALL: keepalive

not sure if you run the nbd-server as a standalone daemon if the
keepalive would kick in on it's own...

live well,
  vagrant



Information forwarded to debian-bugs-dist@lists.debian.org, Wouter Verhelst <wouter@debian.org>:
Bug#409531; Package nbd-server. (Fri, 10 Oct 2008 21:36:03 GMT) (full text, mbox, link).


Acknowledgement sent to Vagrant Cascadian <vagrant@freegeek.org>:
Extra info received and forwarded to list. Copy sent to Wouter Verhelst <wouter@debian.org>. (Fri, 10 Oct 2008 21:36:09 GMT) (full text, mbox, link).


Message #40 received at 409531@bugs.debian.org (full text, mbox, reply):

From: Vagrant Cascadian <vagrant@freegeek.org>
To: 409531@bugs.debian.org
Subject: nbd-server: timeout option not very useful
Date: Fri, 10 Oct 2008 14:33:41 -0700
over the last year on several occasions, i've seen folks spend a couple
of hours debugging this option and coming to the same results ... it
times out weather it's being used or not.

the -a timeout option is just plain broken.

would it be possible to either disable this option entirely, or at the
very least, document that it's broken and recommend using keepalive
timeouts instead in the man page?

thanks for maintaining nbd!

live well,
  vagrant




Tags added: upstream, fixed-upstream Request was from Wouter Verhelst <wouter@debian.org> to control@bugs.debian.org. (Sat, 23 May 2009 09:48:23 GMT) (full text, mbox, link).


Reply sent to Wouter Verhelst <w@uter.be>:
You have taken responsibility. (Sun, 12 Jul 2009 10:09:04 GMT) (full text, mbox, link).


Notification sent to Vagrant Cascadian <vagrant+bugs@freegeek.org>:
Bug acknowledged by developer. (Sun, 12 Jul 2009 10:09:04 GMT) (full text, mbox, link).


Message #47 received at 409531-done@bugs.debian.org (full text, mbox, reply):

From: Wouter Verhelst <w@uter.be>
To: 409531-done@bugs.debian.org
Subject: Fixed
Date: Sun, 12 Jul 2009 11:11:13 +0200
Version: 1:2.9.13-1

Forgot to mention this in the changelog, but the latest upload of nbd
removes support for the timeout option, thereby fixing this issue.

-- 
The biometric identification system at the gates of the CIA headquarters
works because there's a guard with a large gun making sure no one is
trying to fool the system.
  http://www.schneier.com/blog/archives/2009/01/biometrics.html




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Wed, 07 Sep 2011 07:35:44 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Jan 5 16:32:44 2018; Machine Name: beach

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.