From: Justin M Kuntz (jkuntz_at_prominic.com)
Date: Mon 13 May 2002 - 18:33:48 BST
Hello,
I've used the /usr/lib/vserver/install-rh7.2 script to create my first
vserver. The only problem I noticed with this process is the install-rh7.2
script references install_post.sh when really it should be install-post.sh
Now that I have my verver up and running on 2.4.18-ctx10 with vserver 0.17,
I wanted to understand better the boot process and what is the minimum
process list that should be operating in a vserver environment. The
/usr/lib/vserver/install-post.sh script was very helpful to understand what
vserver is doing after installing the RPMs.
The inittab does a few things I think should be disabled, and I'd like to
hear your thoughts. First, the default sysinit is called:
si::sysinit:/etc/rc.d/rc.sysinit
... and this rc.sysinit script does all sorts of things which could and
probably should be trimmed down for a vserver. Notably, it does file
system checking, starts up pre-syslog logging, etc. I noticed the update
daemon doesn't look like it needs to be running on vservers as well as the
main server, so I commented that out as follows:
# Things to run in every runlevel.
#JMK - I think this should not be running since the main server runs
kupdate
#ud::once:/sbin/update
I assume these lines probably wouldn't mean much in a vserver because the
primary init is not going to know to tell the vserver inits what is
happening in case of powerfailure or ctrl-alt-del by default, without
special configuration... so I left them alone for now:
ca::ctrlaltdel:/sbin/shutdown -t3 -r now
pf::powerfail:/sbin/shutdown -f -h +2 "Power Failure; System Shutting Down"
pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled"
The tty inputs I assume can all be disabled since the vserver has no
control over the main machine's console anyway, and they'll just generate
needless /var/log/messages traffic in the vserver about not having access
to the ttys?
# Run gettys in standard runlevels
#1:2345:respawn:/sbin/mingetty tty1
#2:2345:respawn:/sbin/mingetty tty2
#3:2345:respawn:/sbin/mingetty tty3
#4:2345:respawn:/sbin/mingetty tty4
#5:2345:respawn:/sbin/mingetty tty5
#6:2345:respawn:/sbin/mingetty tty6
This leaves me with my big question being what to do with syslog and
minilogd. I assume that the processes running inside the vserver are going
to try to talk to the standard logging mechanism inside that vserver. Red
Hat has a white paper on this which is a good read:
http://www.redhat.com/support/wpapers/redhat/initscripts/index.html#toc
So this is what I get after running "vserver rh72 start" followed by
"vserver rh72 enter":
[root_at_vserver:rh72 log]ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 May11 ? 00:00:06 init [3]
root 14695 1 0 13:14 ? 00:00:00 minilogd
root 14911 14900 0 13:15 pts/3 00:00:00 /bin/bash -login
root 14965 14911 0 13:15 pts/3 00:00:00 ps -ef
[root_at_vserver:rh72 log]
Now, minilogd is running but I think it is just collecting the messages and
not actually writing them anywhere until we start syslog. But starting
syslog also attempts to start a kernel log daemon, which I don't think we
want since the main server is already going to be running a kernel log
daemon - right?
[root_at_vserver:rh72 init.d]./syslog start
Starting system logger: [ OK ]
Starting kernel logger: [ OK ]
[root_at_vserver:rh72 init.d]ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 May11 ? 00:00:06 init [3]
root 14911 14900 0 13:15 pts/3 00:00:00 /bin/bash -login
root 14979 1 0 13:16 ? 00:00:00 syslogd -m 0
root 14987 14911 0 13:16 pts/3 00:00:00 ps -ef
[root_at_vserver:rh72 init.d]
So somehow by running syslog, it is disabling the minilogd and replacing
that with syslogd, and I'm not sure why the kerneld doesn't startup too.
I'd appreciate any ideas or suggestions to further streamline the startup
process and make sure minimal services and logging are loaded which won't
interfere with the root server.
For now I'm going to re-enable syslog inside the vserver as follows:
[root_at_vserver:rh72 /]chkconfig --level 2345 syslog on
Thanks!
Justin