[Users] VE fails to stop

Kir Kolyshkin kir at openvz.org
Thu Dec 13 11:02:27 EST 2007


OK, here's what I found concerning ubuntu-7.10 VE vs. OpenVZ.

0. (just repeating) Ubuntu-7.10 template with upstart instead of init 
requires vzctl > 3.0.18. An updated vzctl (apparently it will have 
version of 3.0.21) is not yet released.

1. There was an obscure bug in not-yet-released vzctl, which fires when 
a Debian/Ubuntu based VE has more than one IP address. The bug is now 
fixed in GIT (see http://tinyurl.com/2w68ch) and will be included into 
next vzctl release. Note that released vzctl version (i.e. 3.0.18) is 
not affected.

2. Ubuntu 7.10 initscripts (including netscripts) relied on the fact 
that /var/run is resides on a tmpfs partition, so it would be empty 
after reboot. Because of that they don't care about stopping some 
services, cleaning state files etc. It only became a problem when I 
optimized Ubuntu template to not use tmpfs (because tmpfs eats some 
physical memory, which might not be desired then there are a lot of VEs 
on a system). Networking was not up on VE restart just because of that 
-- ifup script saved interface state in /var/run/network/ifstate, while 
ifdown was never called on VE stop, so next ifup (after VE reboot) was 
not taking care of interfaces which according to ifstate were already up.

This was fixed in an updated ubuntu templates that I just uploaded to 
http://download.openvz.org/template/precreated/. These templates are now 
back to using tmpfs for some directories. Other changes I made are: 
removal of a few more packages (ntpdate eject libasound2 pciutils 
tasksel tasksel-data laptop-detect), log files cleanup.

Also, while at it, I have modified Ubuntu Gutsy template creation 
document in wiki.
Latest version: http://wiki.openvz.org/Ubuntu_Gutsy_template_creation
My changes: http://tinyurl.com/2u2oxj

Hope that helps.

PS I appreciate if somebody can help with testing a new vzctl from git.
**
Kir Kolyshkin wrote:
> Cliff Wells wrote:
>> On Tue, 2007-12-11 at 19:35 +0300, Kir Kolyshkin wrote:
>>  
>>> This is probably a problem with VE start, not stop. VE started badly 
>>> and can not stop.
>>>
>>> This is known issue (a bad interaction of Ubuntu's upstart (init 
>>> replacement) and vzctl) which is fixed in upcoming vzctl release, 
>>> see http://bugzilla.openvz.org/662
>>>
>>> Now you have three options:
>>> 1. Wait for next vzctl release (should happen real soon now).
>>> 2. Replace upstart with init (sysvinit) inside a VE
>>> 3. Rebuild vzctl either from GIT or just adding the patch from git 
>>> linked from bug #622.
>>>     
>>
>> I installed vzctl from git.  This seems to solve the problem with the VE
>> starting and stopping.  However, after the VE is run once, the network
>> refuses to come up unless I delete the VE's IP address and add it again:
>>
>>
>> vps1 ~ # vzctl start 106
>> Starting VE ...
>> VE is mounted
>> Adding IP address(es): 10.10.10.106
>> Setting CPU units: 1584
>> Configure meminfo: 72498
>> Set hostname: vz106
>> File resolv.conf was modified
>> VE start in progress...
>> vps1 ~ # vzctl enter 106
>> entered into VE 106
>> id: cannot find name for group ID 11
>> root at vz106:/# ip addr
>> 1: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue     link/loopback 
>> 00:00:00:00:00:00 brd 00:00:00:00:00:00
>>     inet 127.0.0.1/8 scope host lo
>>     inet6 ::1/128 scope host        valid_lft forever preferred_lft 
>> forever
>> 3: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,10000> mtu 1500 qdisc
>> noqueue     link/void     inet 127.0.0.1/32 scope host venet0
>>     inet 10.10.10.106/32 scope global venet0:0
>> root at vz106:/# ping google.com
>> PING google.com (72.14.207.99) 56(84) bytes of data.
>> 64 bytes from eh-in-f99.google.com (72.14.207.99): icmp_seq=1 ttl=238
>> time=98.8 ms
>> 64 bytes from eh-in-f99.google.com (72.14.207.99): icmp_seq=2 ttl=238
>> time=99.1 ms
>> 64 bytes from eh-in-f99.google.com (72.14.207.99): icmp_seq=3 ttl=238
>> time=98.1 ms
>>
>> --- google.com ping statistics ---
>> 3 packets transmitted, 3 received, 0% packet loss, time 2000ms
>> rtt min/avg/max/mdev = 98.106/98.696/99.138/0.504 ms
>> root at vz106:/# logout
>> exited from VE 106
>> vps1 ~ # vzctl stop 106
>> Stopping VE ...
>> VE was stopped
>> VE is unmounted
>> vps1 ~ # vzctl start 106
>> Starting VE ...
>> VE is mounted
>> Adding IP address(es): 10.10.10.106
>> Setting CPU units: 1584
>> Configure meminfo: 72498
>> Set hostname: vz106
>> File resolv.conf was modified
>> VE start in progress...
>> vps1 ~ # vzctl enter 106
>> entered into VE 106
>> id: cannot find name for group ID 11
>> root at vz106:/# ping google.com
>> ping: unknown host google.com
>> root at vz106:/# ip addr
>> 1: lo: <LOOPBACK> mtu 16436 qdisc noop     link/loopback 
>> 00:00:00:00:00:00 brd 00:00:00:00:00:00
>> 3: venet0: <BROADCAST,POINTOPOINT,NOARP> mtu 1500 qdisc noop     
>> link/void root at vz106:/#
>> If I exit the VE and delete/re-add the IP address it starts working
>> again:
>>
>> vps1 ~ # vzctl set 106 --ipdel all --save
>> Deleting IP address(es): Adding IP address(es): Saved parameters for 
>> VE 106
>> vps1 ~ # vzctl set 106 --ipadd 10.10.10.106 --save
>> Adding IP address(es): 10.10.10.106
>> Saved parameters for VE 106
>> vps1 ~ # vzctl enter 106
>> entered into VE 106
>> id: cannot find name for group ID 11
>> root at vz106:/# ping google.com
>> PING google.com (64.233.187.99) 56(84) bytes of data.
>> 64 bytes from jc-in-f99.google.com (64.233.187.99): icmp_seq=1 ttl=237
>> time=76.8 ms
>>
>>
>>
>> Could this be another problem with upstart?
>>   
>
> I am investigating the problem right now, will keep you updated.



More information about the Users mailing list