OpenVZ Forum


Home » General » Support » *SOLVED* network problem if I set onboot=yes
*SOLVED* network problem if I set onboot=yes [message #12275] Mon, 23 April 2007 21:03 Go to next message
heber is currently offline  heber
Messages: 10
Registered: April 2007
Junior Member
Hi all,

I'm getting an weird problem with a VE which I would like to be started automatically on HN boot.

If I start a VE manually I can ping from another machine and I get the following arp command output(10.77.0.111 is the VE's IP):

root@TestOpenVZ:~# arp -a
? (10.77.0.1) at 00:15:C5:33:29:0D [ether] on eth0
notfr77d91.campinas.dba.com.br (10.77.0.161) at 00:14:22:CB:94:41 [ether] on eth0
? (10.77.0.111) at <from_interface> PERM PUB on eth0

But If I use the parameter onboot="yes" I have network problems. The VE works, but I cannot ping from outside. I'd sniffed the network and I realize that the machine from which I'm sending the ping request cannot find out what is the VE's MAC address. And I get in HN:

root@TestOpenVZ:~# arp -a
? (10.77.0.254) at 00:17:9A:6C:C4:AD [ether] on eth0
notfr77d91.campinas.dba.com.br (10.77.0.161) at 00:14:22:CB:94:41 [ether] on eth0
? (10.77.0.1) at 00:15:C5:33:29:0D [ether] on eth0

You can see that there is no entry concerning my VE.

If I restart the VE, the network start working again and I can ping.

I'm using kernel-2.6.15 with patches and vzctl 3.0.16-1dso2~sarge0. I got this using both Fedora and Ubuntu templates.

Any idea?

Thanks a lot and sorry my english

Heber

[Updated on: Wed, 16 May 2007 06:30] by Moderator

Report message to a moderator

Re: network problem if I set onboot=yes [message #12282 is a reply to message #12275] Tue, 24 April 2007 08:02 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Hello,

seems that the problem is in init scripts. Can you try to switch off vz init script on start up, then boot the node and start vz script manually. VEs with ONBOOT="yes" will be started. Then check does network work.

Thank you,
Vasily.
Re: network problem if I set onboot=yes [message #12300 is a reply to message #12282] Tue, 24 April 2007 14:33 Go to previous messageGo to next message
heber is currently offline  heber
Messages: 10
Registered: April 2007
Junior Member
Vasily, you're right.

More specifically, the problem was in the order that vz script was started on Ubuntu.

I had:

root@TestOpenVZ:/etc/rc2.d# ls /etc/rc2.d/S2*
/etc/rc2.d/S20dbus /etc/rc2.d/S20sysstat
/etc/rc2.d/S20makedev /etc/rc2.d/S20vz
/etc/rc2.d/S20nfs-kernel-server
/etc/rc2.d/S20ssh

I changed to:

root@TestOpenVZ:/etc/rc2.d# ls /etc/rc2.d/S2*
/etc/rc2.d/S20dbus /etc/rc2.d/S20sysstat
/etc/rc2.d/S20makedev /etc/rc2.d/S21vz
/etc/rc2.d/S20nfs-kernel-server
/etc/rc2.d/S20ssh

and right now VEs networking starts at HN boot. I get just after the boot:

root@TestOpenVZ:/etc/rc2.d# arp -a
notfr77d91 (10.77.0.161) at 00:14:22:CB:94:41 [ether] on eth0
? (10.77.0.111) at <from_interface> PERM PUB on eth0

And I can ping from outside.

Can you explain to me what is the problem? Is there any conflict betwen vz init script and one of the others S20*?

Is this a .deb bug? I got them from "http://debian.systs.org"

Thanks a lot
Re: network problem if I set onboot=yes [message #12301 is a reply to message #12300] Tue, 24 April 2007 14:53 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
I can't tell you the exact problem: need to look at initscripts more narrowly, probabaly add some debug messages to them... However it seems to be a bug, so, please, fill the it in bugzilla with the link to your initial post on forum and we'll check what's happening.

Vasily.
Re: network problem if I set onboot=yes [message #12307 is a reply to message #12301] Tue, 24 April 2007 17:12 Go to previous messageGo to next message
heber is currently offline  heber
Messages: 10
Registered: April 2007
Junior Member
Vasily,

The solution I've posted is not working, maybe I made a mistake.

If a disable vz script to initialize on boot and manually do "/etc/init.d/vz start" network works fine.

Any idea? Or should I just open a new bug?

Thanks
Re: network problem if I set onboot=yes [message #12325 is a reply to message #12307] Wed, 25 April 2007 08:30 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Try to make vz initscript the last one on the given runlevel. The bug should be filled though Smile

Vasily.
Re: network problem if I set onboot=yes [message #12355 is a reply to message #12325] Wed, 25 April 2007 16:03 Go to previous messageGo to next message
heber is currently offline  heber
Messages: 10
Registered: April 2007
Junior Member
I finally find out the real problem.

The vz init script was already the last one and it wasn't working.

Just to test I put a "sleep 20" before script execution and It worked !

Debuging I put "ps -ef >>/root/ps.txt" before and after "sleep 20" and I realized that the difference was that nic wasn't up at vz script execution time, and this was the problem.

I saw the following before the line with "sleep" :

root 2723 1 0 11:56 ? 00:00:00 /sbin/ifup --allow auto eth0

That's why I had that weird behaviour with arp output.

Isn't this a bug, right? Or should vz script check if ethx is up before running?

Thanks a lot
Re: network problem if I set onboot=yes [message #12359 is a reply to message #12355] Wed, 25 April 2007 16:29 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Thank you very much for investigating the problem. For me - it is a bug anyway. The question is how to fix it, because sleeping 20 seconds is rather rude solution. But we can, for example, wait till interface get up...
Can you, please, fill the bug and post there all information you discovered. We'll think out some solution. Smile

Thank you again,
Vasily.
Re: network problem if I set onboot=yes [message #12880 is a reply to message #12355] Mon, 14 May 2007 09:25 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

It sounds like it's your networking init script to blame, not vz init script.

OR it might be that something like «parallel startup» option is set, which affects the way it all works.

Which ubuntu version it is?


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: network problem if I set onboot=yes [message #12956 is a reply to message #12880] Tue, 15 May 2007 20:12 Go to previous messageGo to next message
heber is currently offline  heber
Messages: 10
Registered: April 2007
Junior Member
Yes, you are right.

I was facing with network problems at that time, HN was spending so much time to get the IP address from DHCP Server.

Shouldn't vz init script check if HN already has an IP address?

Ubuntu 6.06

Thanks
Re: network problem if I set onboot=yes [message #13148 is a reply to message #12956] Mon, 21 May 2007 15:19 Go to previous message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

There are a lot of other services which depend on networking being up -- like ssh, apache etc. I have checked (ubuntu feisty fawn) and found none of those explicitly check for networking being up and running. If they do not check it -- why should we?



Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Previous Topic: *SOLVED* home dir of vps on an other partition or networkdevice
Next Topic: Sparc, Debian and OpenVZ
Goto Forum:
  


Current Time: Mon Jul 15 23:56:27 GMT 2024

Total time taken to generate the page: 0.02509 seconds