[Vserver] bug when starting without daemons

From: Boris Kolar <boris.kolar_at_globera.com>
Date: Wed 29 Mar 2006 - 10:39:49 BST
Message-ID: <442A55E5.9090509@globera.com>

I tried Fedora Core 5 as VServer host and guest. There's a bug: a guest
can't be started unless it starts at least one daemon.

My environment:
- Fedora Core 5 (x86)
- kernel-2.6.16-1.2070_FC5.vs2.0.2.0.rc14.1.i686.rpm
- util-vserver-0.30.210-9.fc5.i386.rpm
- util-vserver-core-0.30.210-9.fc5.i386.rpm
- util-vserver-lib-0.30.210-9.fc5.i386.rpm
- util-vserver-sysv-0.30.210-9.fc5.i386.rpm
- repository http://rpm.hozac.com/dhozac/fedora/5/vserver/i386/
- VMWare Player 1.0.1

Summary:
If you disable ALL daemons in guest, then vserver <guest> start will
fail (error "vshelper.init: can not determine xid of vserver...").

Detailed description:
I created virtual server manually, by copying files from my host (host
had minimal FC5 installation, with only "Base" group selected in
Anaconda). Added dhozac repository, yum installed kernel and
util-vserver, checked barrier on /vservers. Then I copied files from
host, chrooted to my guest and disabled ALL services. Exited chroot, set
up /etc/vservers/<guest> manually and started:
# vserver <guest> start
... which gave me the following error:
vshelper.init: can not determine xid of vserver '<guest>'; returned
value vas ''
... however, if I chroot to guest again and enable one daemon (for
example gpm), vserver <guest> start will work correctly

Before you ask "why on earth would you want to run vserver without
daemons": I wanted to provide others a full working environment
(allowing them to enter via scripts stated in /etc/sudoers), but
seperate from my server.

(I attached description of steps to reproduce this bug)

---
Boris Kolar

# Install Fedora Core 5 host with only "Base" packages
wget http://rpm.hozac.com/dhozac/fedora/4/vserver/dhozac-vserver.repo
nano dhozac-vserver.repo
# enabled=1
mv dhozac-vserver.repo /etc/yum.repos.d/
nano /etc/yum.repos.d/fedora-updates.repo
# exclude=kernel kernel-smp
yum install kernel
ntsysv --level 0123456
# remove everything except network
nano /etc/selinux/config
# SELINUX=disabled
nano /etc/grub.conf
# default=0
# timeout=3
# #splashimage=(hd0,0)/boot/grub/splash.xpm.gz
passwd -d root
reboot
# login as root
yum install util-vserver
setattr --barrier /vservers/
mkdir /vservers/desktop
cd /vservers/desktop/
cp -ax /bin/ .
mkdir boot
cp -ax /dev/ .
cp -ax /etc/ .
mkdir home
cp -ax /lib/ .
mkdir -m 700 lost+found
mkdir media
mkdir misc
mkdir mnt
mkdir net
mkdir opt
mkdir -m 555 proc
cp -ax /root/ .
rm -f root/.bash_history
cp -ax /sbin/ .
mkdir selinux
mkdir srv
mkdir sys
mkdir -m 1777 tmp
cp -ax /usr/ .
cp -ax /var/ .
mkdir -m 0 vservers
mkdir /etc/vservers/desktop
cd /etc/vservers/desktop/
ln -s /vservers/desktop/ vdir
ln -s /var/run/vservers/desktop run
chroot /vservers/desktop/
ntsysv --level 0123456
# remove ALL services

_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Wed Mar 29 13:57:08 2006

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Wed 29 Mar 2006 - 13:57:18 BST by hypermail 2.1.8