Subject: Re: [vserver] bash prompt host name
From:Miroslav S(ulc <miroslav.sulc@startnet.cz>
Date: Wed, 04 Nov 2009 15:46:56 +0100

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...                                                                          
                                                                         
[ ok ]
* Creating user login
records...                                                                         
                                                                       
[ ok ]
* Cleaning
/var/run...                                                                        
                                                                                  
[ ok ]
* Wiping /tmp
directory...                                                                       
                                                                               
[ ok ]
* Updating
/etc/mtab...                                                                       
                                                                                  
[ ok ]
* Initializing random number
generator...                                                                       
                                                                
[ ok ]
* Starting
sshd...                                                                            
                                                                                  
[ ok ]
* Starting
vixie-cron...                                                                      
                                                                                  
[ ok ]
* Starting
local...                                                                           
                                                                                  
[ ok ]
/usr/sbin/chbind: line 135: 30904 Segmentation fault     
"${create_cmd[@]}" "${chain_cmd[@]}" -- "$@"

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
>>