[Pkg-ltsp-devel] Bug#422962: ltsp-server: Using nbdswapd script leaves unused processes and swap files on server

vagrant at freegeek.org vagrant at freegeek.org
Wed May 16 16:04:56 UTC 2007


tags 422962 confirm
thanks

On Tue, May 08, 2007 at 10:35:43PM -0600, Bryan Sutula wrote:
> I am trying to use NBD swap to compensate for a client with little memory.
> 
> Following the brief instructions in the /usr/share/doc/ltsp-server/swap
> file, I find that when the client crashes, the two swap processes on the
> server:
> 
> nobody   15730  4777  0 17:20 ?        00:00:00 /bin/sh /usr/sbin/nbdswapd
> nobody   15739 15730  0 17:20 ?        00:00:00 /bin/nbd-server

> as well as the swap file itself are left lying around.  If the client is
> rebooted, new processes and a new swap file are used.  If this process
> repeats, there gets to be a lot of these dead processes and swap files.

indeed. we're aware of this issue and looking at how to make it work
better.

> I explored adding options to /etc/ltsp/nbdswapd.conf:
> 
> NBD_SERVER_OPTS="-a 300"
> 
> Of course, a longer time can be used.  This does kill the nbd-server and
> shell script process, as well as delete the swap file.
...snip...
> Also, no matter how long it's set for, it seems that Linux won't
> necessarily use swap unless it needs it, and since the goal is that
> it's almost never needed for an LTSP application, a timeout is not a
> good solution.

yes, this is not a very good option for that very reason. if a
thin-client's swap space disappears, bad things happen.

we need to get some sort SO_KEEPALIVE or timeout pinging behavior
working for it to work properly.
 
> I will experiment with the latter half of the "swap" instruction file,
> where the swap daemon is tied to an IP address.  This seems more likely
> to work.  But why couldn't the shell script use a similar technique
> (based on IP address or something like that).  It seems that the first-
> suggested approach is problematic and shouldn't be recommended, or the
> script should work differently.

if the file has a predictable name, it's much easier to spy on the
contents of the swap space for a particular logged in user. though
really, folks should explore the encryption options :)

we also have the possibility of a single client using multiple nbd
instances- a feature i'd like to keep.

you're free to implement whatever scheme for the filename you like by
putting it in the configuration file /etc/ltsp/nbdswapd.conf:

IP=$(magic_command_to_get_ip)
SWAP=/path/to/your/preferred/swap/file/$IP

> Sorry for tacking other issues onto this, 

:P

> but also noticed along the way is that the package puts it's main
> ltsp.conf configuration file in /etc (no subdirectory) which is legal,
> but when the user wants to configure nbdswapd, they must create an
> /etc/ltsp directory and add a new config file there.  I suggest having
> the ltsp-server package create /etc/ltsp from the start and drop it's
> ltsp.conf file there.

that's a compatibility issue with ltsp 4.2 ... i would prefer it to be
in /etc/ltsp as well, but there's some resistance to that idea. feel
free to file a separate bug report if you would like to push the issue
:)

live well,
  vagrant




More information about the Pkg-ltsp-devel mailing list