Re: [Vserver] vservers start very slow after a reboot

From: GarconDuMonde <gdm_at_fifthhorseman.net>
Date: Sun 25 Jun 2006 - 20:28:35 BST
Message-ID: <449EE3E3.7080009@fifthhorseman.net>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

hil

Benedict Verheyen wrote:
> i had problems with vservers not starting (or so i thought) after a system
> reboot on my Debian Sarge.
> Some particulars of my system:
> - debootstrap install of vservers
> - most vservers have at least 1 shared directories with host (apt cache)
> - hashified
> - lastest util-vserver
> - kernel 2.6.16
> - debian sarge
> - 7 vservers
>
> What happened when i rebooted is that i saw these lines:
> ------------------------------------------------------
> Fixing visibility of /proc entries for vservers...done
> Starting vservers of type default...
> ------------------------------------------------------
>
> And then it seemed as if my system hung but i could actually do a 3
> fingered salute. So hanging is not the right wording, rather "not
> responding".

i actually had the same problem... you go onto describe how you (almost) figured
out the problem in this email, it seems that you didn't quite make the final
connection: it's not really a problem with the vservers themselves taking a long
time, it's a problem in the order in which they are starting, with the non-dns
vservers starting first and therefore hanging whilst they wait for network
connections to time out.

> I had what appeared to be some dead links in my /etc/rc2.d:
> vprocunhide rebootmgr vservers-default vservers-legacy
> They don't seem to be used anymore so i removed them. Now only a link to
> /etc/init.d/util-vserver is in there
>
> Anyway, i edited /etc/default/util-vserver and set the following:
> mark=
> auto=false

i did this as well. it temporarily solves the problem to find the answer, as you
say.

> This prevented the vservers to load on boot (which i actually want and
> need but disabled to see what's going on).
> I then rebooted and started a vserver manually and instead of the startup
> lines zipping by it took ages for it to print some lines so now i knew
> "Starting vservers of type default..." was actually not hanging my
> computer but rather just going very very slow.

which lines? i suspect they are the ones about various network connections for
your vserver (trying to resolve hostname, for example).

> I started all my vservers and after about 10 minutes (i had started an uml
> to get DNS going) i decided to shut down the uml that provided dns and
> start the vserver instead that also provides dns.
> Well, to my surprise, that one started quickly again.
> Entering the vservers was also quick again. Very strange.

no - you now have your dns working, hence it doesn't need to wait for network
timeouts.

> Now it all works again but as you can imagine, i wouldn't want to reboot :)
>
> 1. What could be causing the slow startup?
>
> 2. What links are necessary in /etc/rc2.d?
> vprocunhide, rebootmgr, vservers-default & vservers-legacy point nowhere
> only util-vserver seems to be valid

i've got the similar system set up as you (debian sarge 2.6.16 etc). there was
something like:

/etc/init.d/vserver-default

and created

/etc/init.d/vserver-dnsserver
/etc/init.d/vserver-mailserver

etc, so that i could start the vservers in a specific order by linking them into
/etc/rc?.d/* as appropriate.

> 3. I have my DNS inside a vserver, so the DNS vserver should be started
> as early as possible.
> How do i do that if the links above aren't valid?
> Can i move the util-vserver link and then use the mark file to accomplish
> that?

you still use the mark file to specifiy which start-up script starts which vserver:

user@host:~$ cat /etc/vservers/vsdns/apps/init/mark
dnsserver
user@host:~$ cat /etc/vservers/vsmail/apps/init/mark
mailserver
user@host:~$ cat /etc/vservers/vshttp/apps/init/mark
default

so i can get them to start in what ever order i like, depending upon the order
in /etc/rc?.d/ .

> 4. Is there a way to start some vservers early and other less critical
> vservers at the end of the boot sequence?

as above.

> Some more information:
>
>> testme.sh
> Linux-VServer Test [V0.15] Copyright (C) 2003-2006 H.Poetzl
> chcontext is working.
> chbind is working.
> Linux 2.6.16-vs2.0.2-rc15.10apr2006 #1 Tue Apr 11 13:02:54 CEST 2006 i686
> Ea 0.30.210 273/glibc (DSa) <compat,v11,fscompat,v13,net,oldproc,olduts>
> VCI: 0002:0001 273 03000036 (TbLgnP)
> ---
> [000]# succeeded.
> [001]# succeeded.
> [011]# succeeded.
> [031]# succeeded.
> [101]# succeeded.
> [102]# succeeded.
> [201]# succeeded.
> [202]# succeeded.
>
>> vserver-info - SYSINFO
> ==============================================================================
> Versions:
> Kernel: 2.6.16-vs2.0.2-rc15.10apr2006
> VS-API: 0x00020001
> util-vserver: 0.30.210; Apr 19 2006, 16:06:42
>
> Features:
> CC: gcc, gcc (GCC) 3.3.5 (Debian 1:3.3.5-13)
> CXX: g++, g++ (GCC) 3.3.5 (Debian 1:3.3.5-13)
> CPPFLAGS: ''
> CFLAGS: '-Wall -g -O2 -std=c99 -Wall -pedantic -W'
> CXXFLAGS: '-g -O2 -ansi -Wall -pedantic -W
> -fmessage-length=0'
> build/host: i386-pc-linux-gnu/i386-pc-linux-gnu
> Use dietlibc: yes
> Build C++ programs: yes
> Build C99 programs: yes
> Available APIs: compat,v11,fscompat,v13,net,oldproc,olduts
> ext2fs Source: e2fsprogs
> syscall(2) invocation: alternative
> vserver(2) syscall#: 273/glibc
>
> Paths:
> prefix: /usr
> sysconf-Directory: /etc
> cfg-Directory: /etc/vservers
> initrd-Directory: $(sysconfdir)/init.d
> pkgstate-Directory: /var/run/vservers
> vserver-Rootdir: /var/lib/vservers
> ==============================================================================
>
> Thanks,
> Benedict

hope it helps.

- --

love and solidarity,

        --gdm

http://docs.indymedia.org/view/Main/GarconDuMonde

i have a NEW key:
gpg --keyserver pgp.mit.edu --recv-keys 594B97C2
Key fingerprint = 7B70 F22D F275 D111 3A04 F9EE 0E25 4944 594B 97C2

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Darwin)

iD8DBQFEnuPgDiVJRFlLl8IRAr7EAJ9pMBE9c46lANvct8j/P9ua7qoUPgCff3BO
rUxieW6H3QnOMZQ4FOdYO4A=
=e+xS
-----END PGP SIGNATURE-----

_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Mon Jun 26 11:16:38 2006

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Mon 26 Jun 2006 - 11:16:45 BST by hypermail 2.1.8