Re: [vserver] chbind -> ncontext: vc_net_create(): Invalid argument - why?

From: Herbert Poetzl <herbert_at_13thfloor.at>
Date: Thu 11 Sep 2014 - 20:39:37 BST
Message-ID: <20140911193937.GD31991@MAIL.13thfloor.at>

On Thu, Sep 11, 2014 at 03:54:27PM +0200, Christian Recktenwald wrote:

Hey Christian!

> I'm running
> chbind --ip 192.168.4.167 ip a l
> on the vserver host system and get
> ncontext: vc_net_create(): Invalid argument

This maps to:

/usr/sbin/ncontext --create --silentexist -- /usr/sbin/nattribute --set -- /usr/sbin/naddress --add --ip 192.168.4.167 ip a l

and

/usr/sbin/ncontext --create --silentexist

is what fails.

> I'm pretty sure this has worked somewhen in the past -
> why does it fail now?

It worked back then when the kernel created dynamic
contexts for unspecified context IDs. This feature
was removed a long time ago, so you basically need
to specify a static context ID to the kernel.

Userspace tools normally work around that by emulating
the dynamic context selection and sending a static
ID to the kernel, but of course, in an explicit
invocation like the chbind, this cannot be done
easily.

Solution: imply specify an unused context ID yourself.

chbind --nid 999 --ip 192.168.4.167 ip a l

will do what you want, if the network context with
the number 999 does not exist before you call it.

HTC,
Herbert

> --
> LiHAS - Adrian Reyer - Hessenwiesenstraße 10 - D-70565 Stuttgart
> Fon: +49 (7 11) 78 28 50 90 - Fax: +49 (7 11) 78 28 50 91
> Mail: lihas_at_lihas.de - Web: http://lihas.de
> Linux, Netzwerke, Consulting & Support - USt-ID: DE 227 816 626 Stuttgart
Received on Thu Sep 11 20:39:46 2014

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Thu 11 Sep 2014 - 20:39:46 BST by hypermail 2.1.8