Subject: Re: [vserver] bash prompt host name
From: Herbert Poetzl <herbert@13thfloor.at>
Date: Wed, 4 Nov 2009 19:48:36 +0100

On Wed, Nov 04, 2009 at 03:46:56PM +0100, Miroslav S(ulc wrote:
> hi herbert,

> thank you for fast answer. i tried to upgrade to
> util-vserver-0.30.216_pre2849 (latest unstable package in gentoo) but i
> got this error when trying to start guest (it displays guest3 but i am
> logged at host):

> guest3 user1 # vserver guest1 start

>    OpenRC 0.4.3 is starting up Gentoo Linux (x86_64) [VSERVER]

> Press I to enter interactive boot mode
> 
> * /proc is already mounted, skipping
> * Setting hostname to
> guest1...                                                                        
                                                                           
[startup zapped]

> [ ok ]
> /usr/sbin/chbind: line 135: 30904 Segmentation fault     
> "${create_cmd[@]}" "${chain_cmd[@]}" -- "$@"

this looks like your util-vserver has been miscompiled
(i.e. problem with your hardened? toolchain and/or
dietlibc) please a) check that 'vserver-info - SYSINFO'
shows you that it is using dietlibc, and that your
toolchain works (i.e. try with a different gcc or
options)

HTH,
Herbert

> An error occured while executing the vserver startup sequence; when
> there are no other messages, it is very likely that the init-script
> (env TERM=xterm /lib/rc/sh/init-vserver.sh default) failed.

> Common causes are:
> * /etc/rc.d/rc on Fedora Core 1 and RH9 fails always; the 'apt-rpm' build
>   method knows how to deal with this, but on existing installations,
>   appending 'true' to this file will help.

> Failed to start vserver 'guest1'
> Segmentation fault

> i don't get this error with util-vserver-0.30.215-r3.

> miroslav
> 
> Herbert Poetzl napsal(a):
> > On Wed, Nov 04, 2009 at 03:22:59PM +0100, Miroslav ?ulc wrote:
> >   
> >> hi all,
> >>
> >> i installed my first vserver this week. i have one machine with main
> >> host and four guests, all running gentoo. everything seems to work fine,
> >> but i have a minor issue with host name in prompt. when i connect using
> >> ssh to host or any of the guests, in bash prompt i can see always the
> >> same name. lets say i use names "host" and "guest1" up to "guest4". then
> >> my bash prompt would look like this for host and all guests:
> >>     
> >
> >   
> >> guest3 user1 #
> >>     
> >
> >   
> >> i guess it is caused by the fact that guest3 sets host name as the last
> >> one so it overrides previous settings as it seems this settings is only
> >> global or i'm setting the host name globally.
> >>     
> >
> >   
> >> my question is: is there any way to have different host names for host
> >> and each guest? this way it's pretty confusing when i log in guest1 and
> >> i can see guest3 prompt. i have kernel 2.6.31.5-vs2.3.0.36.21.
> >>     
> >
> > the answer is simple, you have an older util-vserver and
> > mainline behaviour changed so that your Linux-VServer
> > guests are no longer properly isolated.
> >
> > update util-vserver to a recent snapshot (preferably the
> > latest), restart all the guests and you should be fine
> >
> > HTH,
> > Herbert
> >
> >   
> >> thx for any hints.
> >>
> >> miroslav
> >>