[Debian] Re: Bug#495667: VEs started during the boot can't use network sometimes

Frank Bauer frank.c.bauer at gmail.com
Fri Aug 29 12:21:31 EDT 2008


On Tue, Aug 19, 2008 at 7:20 PM, Ola Lundqvist <opal at debian.org> wrote:
> On Tue, Aug 19, 2008 at 04:58:43PM +0200, Frank Bauer wrote:
>>
>> Sometimes they can't use the network, as if ip_forwarding is not active,
>> Which is not the case, I have the following in /etc/sysctl.conf:
>>     net.ipv4.ip_forward=1
>
> Can you check if this is active as well after the restart?

Yes, it is active. But I found out it has nothing to do with my problem.

>> I can "fix" this by restarting the VEs - after that the networking works ok.
>> I believe this might be a race condition like starting OpenVZ before
>> the ip_forwarding
>> feature is set, because it only happens with VEs stared during the boot:
>
> I do not think so, as it should affect others as well, but it could
> of course be the case.
> If it is a race condition then it is likely to be a problem in the network
> script. The reason is that there is a pre-condition for vzctl start.
>
> # required-start: $network $remote_fs $local_fs sshd
> # required-stop:

I've been gathering tangible data during the past week (hence the delay)
and the result seems clear:

    OpenVZ guests have problem with networking if they are started
    before the host gets IP address via DHCP.

In most cases, the address is assigned before VEs start, so the networking
in VEs work:

kernel: [   19.394677] skge eth0: enabling interface
dhclient: Listening on LPF/eth0/00:14:85:39:ec:b8
dhclient: Sending on   LPF/eth0/00:14:85:39:ec:b8
dhclient: Sending on   Socket/fallback
kernel: [   21.080002] skge eth0: Link is up at 100 Mbps, full duplex,
flow control both
kernel: [   22.153482] NET: Registered protocol family 10
kernel: [   22.457495] ip_tables: (C) 2000-2006 Netfilter Core Team
dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
dhclient: DHCPOFFER from 192.168.3.1
dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67
dhclient: DHCPACK from 192.168.3.1
dhclient: bound to 192.168.3.75 -- renewal in 42254 seconds.
kernel: [   23.828058] warning: `vzctl' uses 32-bit capabilities
(legacy support in use)
kernel: [   23.851517] CT: 100: started
avahi-daemon[2570]: Found user 'avahi' (UID 104) and group 'avahi' (GID 111).

Sometimes the DHCP client / server is a bit slower and VEs start
before the host is
assigned the IP address - networking in VEs does not work:

kernel: [   18.154081] skge eth0: enabling interface
dhclient: Listening on LPF/eth0/00:14:85:39:ec:b8
dhclient: Sending on   LPF/eth0/00:14:85:39:ec:b8
dhclient: Sending on   Socket/fallback
kernel: [   19.847303] skge eth0: Link is up at 100 Mbps, full duplex,
flow control both
kernel: [   21.395844] NET: Registered protocol family 10
kernel: [   21.708122] ip_tables: (C) 2000-2006 Netfilter Core Team
kernel: [   23.008013] warning: `vzctl' uses 32-bit capabilities
(legacy support in use)
kernel: [   23.069600] CT: 100: started
dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
dhclient: DHCPOFFER from 192.168.3.1
dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67
dhclient: DHCPACK from 192.168.3.1
dhclient: bound to 192.168.3.75 -- renewal in 32585 seconds.
avahi-daemon[2858]: Found user 'avahi' (UID 104) and group 'avahi' (GID 111).

Kind Regards,
Frank


More information about the Debian mailing list