OpenVZ Forum


Home » General » Support » bug in vzctl 3.0.23-1pve3
bug in vzctl 3.0.23-1pve3 [message #38261] Wed, 02 December 2009 17:46 Go to next message
fdef is currently offline  fdef
Messages: 6
Registered: November 2009
Junior Member
hi all ,

I have a issue when i call vzctl with vps.mount/umount scripts.

Indeed, when i call vzctl start CTID, vps.umount is invoked intead of vps.mount...

2009-11-19T23:22:11+0100 vzctl : CT 102 : Starting container ...
2009-11-19T23:22:11+0100 vzctl : CT 102 : Error executing umount script /etc/vz/conf/vps.umount
2009-11-19T23:22:11+0100 vzctl : CT 102 : Setting CPU units: 1000
2009-11-19T23:22:11+0100 vzctl : CT 102 : Setting CPUs: 1
2009-11-19T23:22:11+0100 vzctl : CT 102 : Configure meminfo: 262144
2009-11-19T23:22:11+0100 vzctl : CT 102 : Set hostname: test
2009-11-19T23:22:11+0100 vzctl : CT 102 : File resolv.conf was modified
2009-11-19T23:22:11+0100 vzctl : CT 102 : Setting quota ugidlimit: 0
2009-11-19T23:22:12+0100 vzctl : CT 102 : Configure veth devices: veth102.0 
2009-11-19T23:22:12+0100 vzctl : CT 102 : Container start in progress...



Do you have any patch ?

Thx, fdef


Re: bug in vzctl 3.0.23-1pve3 [message #38263 is a reply to message #38261] Thu, 03 December 2009 05:50 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

(1) if container is appeared to be mounted, it is unmounted first (and during that phase umount script is executed)

(2) the message "error executing umount script" in the absense of other errors means your script exited with non-zero exit value.

(3) no, we don't have a patch; I don't see any bug here (except the return value of your own script which we can't control)


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png

[Updated on: Thu, 03 December 2009 05:52]

Report message to a moderator

Re: bug in vzctl 3.0.23-1pve3 [message #38325 is a reply to message #38263] Mon, 07 December 2009 11:25 Go to previous messageGo to next message
fdef is currently offline  fdef
Messages: 6
Registered: November 2009
Junior Member
Ok thx for your explaination.

But, do you see any errors in my vps scripts?

root@test:/etc/vz/conf# cat vps.*
#!/bin/bash
source /etc/vz/vz.conf
source ${VE_CONFFILE}
mount --bind /home ${VE_ROOT}/home
mount --bind /vz/backups ${VE_ROOT}/backups
#!/bin/bash
source /etc/vz/vz.conf
source ${VE_CONFFILE}
umount ${VE_ROOT}/home
umount ${VE_ROOT}/backups


Cause i don't understand.

Nothings is mounted..
root@test:/etc/vz/conf# mount | grep 102


I start 102 contener, and nothings will be mount even vps.umount script start before vps.mount. And i'm not realy shure, vps.mount script start.
root@test:/etc/vz/conf# vzctl start 102
Starting container ...
umount: /var/lib/vz/root/102/home: not mounted
umount: /var/lib/vz/root/102/backups: not mounted
Error executing umount script /etc/vz/conf/vps.umount
Setting CPU units: 1000
Setting CPUs: 1
Configure meminfo: 262144
Set hostname: test
File resolv.conf was modified
Setting quota ugidlimit: 0
Configure veth devices: veth102.0 
Adding interface veth102.0 to bridge vmbr1 on CT0 for CT102
Container start in progress...

root@test:/etc/vz/conf# mount | grep 102


Do you think, if vps.umount exit with error status, the vps.mount script didn't start ?

root@test:/etc/vz/conf# vzctl stop 102
Stopping container ...
Container was stopped
umount: /home: not mounted
umount: /home: not mounted
umount: /var/lib/vz/backups: not mounted
umount: /var/lib/vz/backups: not mounted
Error executing umount script /etc/vz/conf/vps.umount


Thx fdef
Re: bug in vzctl 3.0.23-1pve3 [message #38327 is a reply to message #38325] Mon, 07 December 2009 13:04 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

The "Error executing umount script /etc/vz/conf/vps.umount" comes out because the last command executed in the vps.umount script exits with non-zero exit code. Therefore the script itself exits with the same code, vzctl detects this and prints the error.

I do not see any errors in your mount/umount scripts. Why don't you add some debugging into them to see what's going on. I suggest adding set +x to the beginning of both scripts, also you can print exit codes from mount/umount (echo $?). Finally, you can run those mount commands manually to check.


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: bug in vzctl 3.0.23-1pve3 [message #38346 is a reply to message #38327] Wed, 09 December 2009 13:16 Go to previous messageGo to next message
fdef is currently offline  fdef
Messages: 6
Registered: November 2009
Junior Member
This directory is not mounted of course.. (-_-)

vzctl start 102
...
+ umount /var/lib/vz/root/102/home
umount: /var/lib/vz/root/102/home: not mounted
+ umount /var/lib/vz/root/102/backups
umount: /var/lib/vz/root/102/backups: not mounted
Error executing umount script /etc/vz/conf/vps.umount
...


Re: bug in vzctl 3.0.23-1pve3 [message #38348 is a reply to message #38346] Wed, 09 December 2009 13:29 Go to previous message
fdef is currently offline  fdef
Messages: 6
Registered: November 2009
Junior Member
Ok i find this issue !

As i told you, if the vps.umount script exit with non-zero status the vps.mount script not invoked.

So, when i put "echo I am the vps.mount script" in the last line of my vps.umount all is ok

take a look :
+ mount --bind /home /var/lib/vz/root/102/home
+ mount --bind /vz/backups /var/lib/vz/root/102/backups
+ echo 'I am the vps.mount script'
I am the vps.mount script
Container is mounted


Without, this echo line, i have the same issue that at the beginning
Previous Topic: modprobe ip_vs
Next Topic: LSB init script for each VPS
Goto Forum:
  


Current Time: Sun Nov 10 22:18:32 GMT 2024

Total time taken to generate the page: 0.05649 seconds