OpenVZ Forum


Home » General » Support » OpenVZ problem or not ?
Re: OpenVZ problem or not ? [message #8602 is a reply to message #7489] Tue, 28 November 2006 23:53 Go to previous message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
Running any services on the HN is ill advised. The redhat init scripts aren't expecting many processes to be running, even though they are under VE context, HN can still see them in its /proc. So, if the initscript kills them in a lazy way, (killall), your VEs will suffer.

However, the problem exists for applications which are not "services"-apache, mysql, etc. For example, take crond in redhat/centos:

[root@gallium ~]# /etc/init.d/crond status
crond (pid 17077 8226 16661 22837 603 6829 19314 27367 14965 29437 9188 13289 9025 6810 6413 2284 18725 12985 4776 29353 24821 16585 6167 2093 28784 26881 8950 4117 15282 2945 2389 28970 25190 12507 9026) is running...
[root@gallium ~]#

Those are the cronds of VEs. Stopping cron from /etc/init.d/cron:

stop() {
echo -n $"Stopping $prog: "
if [ ! -e /var/lock/subsys/crond ]; then
echo -n $"cannot stop crond: crond is not running."
failure $"cannot stop crond: crond is not running."
echo
return 1;
fi
killproc crond
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/crond;
return $RETVAL
}


killproc:
pid=
if [ -f /var/run/${base}.pid ]; then
local line p
read line < /var/run/${base}.pid
for p in $line ; do
[ -z "${p//[0-9]/}" -a -d "/proc/$p" ] && pid="$pid $p"
done
fi
if [ -z "$pid" ]; then
pid=`pidof -o $$ -o $PPID -o %PPID -x $1 || \
pidof -o $$ -o $PPID -o %PPID -x $base`
fi


So, if the pid file exists, there shouldn't be a problem. But, if that first [if] can't find the pid file, theres gonna be trouble for all of your VE cronds.

[root@gallium ~]# pidof crond
17077 8226 16661 22837 603 6829 19314 27367 14965 29437 9188 13289 9025 6810 6413 2284 18725 12985 4776 29353 24821 16585 6167 2093 28784 26881 8950 4117 15282 2945 2389 28970 25190 12507 9026
[root@gallium ~]# vzpid 17077
Pid VPSID Name
17077 9889165 crond
[root@gallium ~]# vzpid 8226
Pid VPSID Name
8226 9889429 crond


This is probably the reason all of your httpd's got killed. Hope this helps.

Rick Blundell


-------------
Common Terms I post with: http://wiki.openvz.org/Category:Definitions

UBC. Learn it, love it, live it: http://wiki.openvz.org/Proc/user_beancounters

[Updated on: Tue, 28 November 2006 23:54]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to install OpenVZ on Ubuntu ?
Next Topic: DDOS attack on VPS
Goto Forum:
  


Current Time: Thu Sep 25 20:03:18 GMT 2025

Total time taken to generate the page: 0.07670 seconds