About this list Date view Thread view Subject view Author view Attachment view

From: Bjoern Steinbrink (bjoern.steinbrink_at_isp4p.net)
Date: Tue 21 Dec 2004 - 18:25:35 GMT

On 2004.12.21 18:19:26 +0100, Ola Lundqvist wrote:
> Hello
> I forward this bugreport that I have got from
> Helmut Toplitzer <helmut_at_ifit.uni-klu.ac.at> that fix a problem
> with context misunderstanding at start of a vserver.
> It is a quite simple patch and as far as I have tested it works fine.
> It is applied to the debian version of util-vserver.
> For full information see http://bugs.debian.org/280723
> Regards,
> // Ola
> ----- Forwarded message from Helmut Toplitzer <helmut_at_ifit.uni-klu.ac.at> -----
> Envelope-to: ola_at_opal.dhs.org
> Delivery-date: Mon, 15 Nov 2004 16:30:57 +0100
> From: Helmut Toplitzer <helmut_at_ifit.uni-klu.ac.at>
> Organization: University of Klagenfurt
> To: opal_at_debian.org
> Subject: Re: Bug#280723: [util-vserver]: vserver-stat shows wrong server as started one
> Cc: 280723_at_bugs.debian.org
> X-UID: 82
> X-Length: 1861
> X-OriginalArrivalTime: 15 Nov 2004 15:31:56.0343 (UTC) FILETIME=[3D751470:01C4CB28]
> X-Spamcheck-Provider: Checked for spam by OpaL, postmaster_at_opal.dhs.org
> X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on bixbite.opal.dhs.org
> X-Spam-Level:
> X-Spam-Status: No, hits=0.0 required=4.0 tests=none autolearn=no version=2.64
> Some analysis:
> /usr/sbin/vserver script:
> Context of new vserver is set
> - by /etc/vservers/name.conf
> - or by /var/run/vservers/name.ctx
> - or by the chcontext script itself
> "running" is evaluated by:
> - /var/run/vservers/name.ctx lockfile exists?
> - (vps ax | grep context | wc -l) >0 ?
> 1) Checking for running vserver in "start" makes
> no sense because .ctx files are never deleted
> and it's possible that other vserver has same
> context and is already running.
> So the result of "running" is running even
> if other vserver is started in this context.

What's the sense in having two or more vservers sharing the same
context? It may occur with vserver's having a dynamic context id that a
context id gets reused, but you should use static context ids anyway.
And even if there's another vserver running in the same context, do you
really want a second vserver to be started in that context? I doubt it.
So IMHO checking if the vserver is running before starting it is fine in
the way it is done right now.

> 2) Deleting vservers .ctx file makes no sense
> either because it can be missed by a hard reboot,
> kill, etc.

And it's not necessary, if no process is actually running in the context
whose id is stored in the .ctx file, the vserver is considered "not

> 3) Solution: before starting any vserver test
> for ALL vservers if they are running and remove
> remaining .ctx files of not running ones.
> Once booted into the schema everything should work.
> (hopefully *sigh*)

Now where's the difference, apart from the fact that all outdated .ctx
files are removed? Your patch removes exactly those files that would not
lead to the result that a vserver is considered running...

Vserver mailing list

About this list Date view Thread view Subject view Author view Attachment view
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Tue 21 Dec 2004 - 18:25:49 GMT by hypermail 2.1.3