OpenVZ Forum


Home » General » Support » start/stop hooks broken or I do smth wrong?
icon5.gif  start/stop hooks broken or I do smth wrong? [message #42850] Wed, 08 June 2011 04:26 Go to next message
porutchik is currently offline  porutchik
Messages: 6
Registered: July 2010
Junior Member
I created 4 same bash scripts in /etc/vz/conf/: 110.start 110.stop 110.mount 110.umount that just touch file in /tmp according to its names.

# vzctl start 110
then
# vzctl stop 110

mount and umount hooks work great. But start and stop do nothing.
Where is the mistake?
Re: start/stop hooks broken or I do smth wrong? [message #42879 is a reply to message #42850] Tue, 14 June 2011 06:41 Go to previous messageGo to next message
curx
Messages: 739
Registered: February 2006
Location: Nürnberg, Germany
Senior Member

Hi,

plz start / stop ct with verbose, like

# vzctl --verbose ...

the action script perm are set to executable?

bye,
Thorsten
Re: start/stop hooks broken or I do smth wrong? [message #42886 is a reply to message #42850] Tue, 14 June 2011 10:58 Go to previous message
porutchik is currently offline  porutchik
Messages: 6
Registered: July 2010
Junior Member
# ll /etc/vz/conf/110.*
-rw-r--r-- 1 root root 1506 Jun  7 21:42 /etc/vz/conf/110.conf
-rwxr-xr-x 1 root root   32 Jun 14 14:54 /etc/vz/conf/110.mount
-rwxr-xr-x 1 root root   31 Jun 14 14:51 /etc/vz/conf/110.start
-rwxr-xr-x 1 root root   31 Jun 14 14:51 /etc/vz/conf/110.stop


# cat /etc/vz/conf/110.start
#!/bin/sh

touch /tmp/110.start


# cat /etc/vz/conf/110.stop
#!/bin/sh

touch /tmp/110.stop


# cat /etc/vz/conf/110.mount
#!/bin/sh

touch /tmp/110.mount


# vzctl --verbose stop 110
Running container script: /etc/vz/conf/110.stop
Stopping container ...
Container was stopped
Container is unmounted


# vzctl --verbose start 110
Starting container ...
Container is mounted
Adding IP address(es): xxxxxxxxxxxx
Running container script: /etc/vz/dists/scripts/redhat-add_ip.sh
Setting CPU units: 133345
Setting devices
Configuring meminfo: 2460736
Set hostname: mail.rover.pp.ru
Running container script: /etc/vz/dists/scripts/redhat-set_hostname.sh
Running container script: /etc/vz/dists/scripts/set_dns.sh
File resolv.conf was modified
Running container script: /etc/vz/conf/110.start
Container start in progress...


# ll /tmp/110.*
-rw-r--r-- 1 root root 0 Jun 14 14:56 /tmp/110.mount


If I manually run scripts I get:
# /etc/vz/conf/110.stop
# /etc/vz/conf/110.start
# ll /tmp/110.*
-rw-r--r-- 1 root root 0 Jun 14 14:56 /tmp/110.mount
-rw-r--r-- 1 root root 0 Jun 14 14:57 /tmp/110.start
-rw-r--r-- 1 root root 0 Jun 14 14:57 /tmp/110.stop

Previous Topic: mini howto: compiling nscd on VE
Next Topic: How many containers can I create ?
Goto Forum:
  


Current Time: Wed Jun 25 17:13:58 GMT 2025

Total time taken to generate the page: 0.06077 seconds