From: Herbert Poetzl (herbert_at_13thfloor.at)
Date: Sat 25 Jun 2005 - 22:39:34 BST
On Sat, Jun 25, 2005 at 09:52:36PM +0200, Frédéric Jolliton wrote:
> While testing vcontext to remove dependencies on deprecated chcontext
> (chcontext-compat) in my own Python scripts to handle vservers, I was
> wondering why vcontext either create new context ID (--create) *or*
> switch to an existing ID (--migrate), but doesn't allow to specify an
> ID, and create if it don't already exist and otherwise just join it,
> just like chcontext do actually (sort of --create-or-migrate). I mean,
> creating context ID on the fly if we try to join it.
> What's the rationale behind that ?
that a context usually want's some setup (i.e. flags,
ccaps, bcaps, whatever) when created but before the
first process (init comes to mind) joins ... but
you can 'emulate' this by doing the create and if
it fails the migrate ...
> I can just change the kernel patch to support that.. but I guess there
> is a particular reason for this behavior. I could also try first to
> --migrate then try --create if that fail, but it's not atomic.
it was never atomic, and it will never be atomic :)
> Maybe I'm missing something (but I found nothing in Wiki about that.)
> Frédéric Jolliton
> Vserver mailing list
Vserver mailing list