LXC problem with network | Proxmox v4 Beta4 | DEV look here! (VIDEO)

Egner

Renowned Member
Aug 2, 2015
96
1
73
Hi Proxmox,

Now is it time to give you a more information about this problem that i'm forcing and probably that will saving others with same problem this questions.

First of all, i have using Proxmox v4 since it was Beta1 and it seems there is some issues just regarding the LXC containers. And every time it comes an update with LXC i just think they properly solved my problem but NOT..

My containers are using static IPv4 and with and without VLAN.

Scenario

Every time then i need to restart the node and update the server comes up as usual with the green light.
Then if i try to start a container with in my case ID 106, the server went up green on the LXC container but it will never map the network to the server.

Solution
This is a really bad solution, you have to restart the entire nod a couple of times, and after some restarts the server can start bring up the static IP to the container like it should.

Video

Just to be so informative i just can! have i created a video with the problem sequence.

VIDEO #1 (with the problem)
[video]http://sendvid.com/ptqbgr76[/video]

VIDEO #2 (without the problem)
[video]http://sendvid.com/0ung53nz[/video]

I will be glad to doing some debugging if that is something you want me to do.

#Hardware specifications
Dell Blade M620

Best regards
Egner
 
Last edited:
Hi,
can you please provide some information about the network settings form Container and Host?
also the config of the containers would be helpful.
 
Hi,
can you please provide some information about the network settings form Container and Host?
also the config of the containers would be helpful.


Hi Wolfgang,

My physical nodes are using one tagged vlan in a combination of untagged vlan.

For the eth1 (combination of untagged and tagged vlan on same port)
The untagged traffic is for the management network that i manage the cluster via.
The tagged traffic is vlan1338 that provide NFS storage traffic to the lxc containers.

For the eth0
is the port that only have untagged traffic that comes with the static IPv4 address space. (internet)

here is my nodes network configuration

Code:
# network interface settingsauto lo
iface lo inet loopback


iface eth0 inet manual


iface eth1 inet manual


iface eth2 inet manual


iface eth3 inet manual


iface eth4 inet manual


iface eth5 inet manual


iface eth6 inet manual


iface eth7 inet manual


auto vmbr0
iface vmbr0 inet static
        address  10.10.13.103
        netmask  255.255.255.0
        gateway  10.10.13.1
        bridge_ports eth1
        bridge_stp off
        bridge_fd 0
        bridge_vlan_aware yes


auto vmbr1
iface vmbr1 inet manual
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0
        bridge_vlan_aware yes

And here is my nodes configuration in proxmox:

node2-network-settings.png

here is my two LXC containers configurations for proxmox :

For the LXC contains with ID 106:

node2-container-106.png

For the LXC container with ID 107:
node2-container-107.png

This cointainer are using one tagged vlan, eth1 and one untagged for eth0. vlan 1338 is providing NFS and the other is providing internet.


LXC containers configuration files:

106/config
Code:
lxc.arch = amd64lxc.include = /usr/share/lxc/config/debian.common.conf
lxc.tty = 2
lxc.environment = TERM=linux
lxc.utsname = rtmp01-vm-c
lxc.cgroup.memory.limit_in_bytes = 1073741824
lxc.cgroup.memory.memsw.limit_in_bytes = 1610612736
lxc.cgroup.cpu.cfs_period_us = 100000
lxc.cgroup.cpu.cfs_quota_us = 200000
lxc.cgroup.cpu.shares = 1024
lxc.rootfs = loop:/var/lib/vz/images/106/vm-106-rootfs.raw
lxc.network.type = veth
lxc.network.veth.pair = veth106i0
lxc.network.hwaddr = B6:33:7D:25:DC:40
lxc.network.name = eth0

107/config

Code:
lxc.arch = amd64lxc.include = /usr/share/lxc/config/debian.common.conf
lxc.tty = 2
lxc.environment = TERM=linux
lxc.utsname = rtmp1-vm-c
lxc.cgroup.memory.limit_in_bytes = 1073741824
lxc.cgroup.memory.memsw.limit_in_bytes = 1610612736
lxc.cgroup.cpu.cfs_period_us = 100000
lxc.cgroup.cpu.cfs_quota_us = 200000
lxc.cgroup.cpu.shares = 1024
lxc.rootfs = loop:/var/lib/vz/images/107/vm-107-rootfs.raw
lxc.network.type = veth
lxc.network.veth.pair = veth107i0
lxc.network.hwaddr = 3A:13:55:41:D2:6A
lxc.network.name = eth0
lxc.network.type = veth
lxc.network.veth.pair = veth107i1
lxc.network.hwaddr = 72:9A:C8:53:DD:6F
lxc.network.name = eth1

Hope you will understand!

Let me know if you need something more.

Best regards
Egner
 
Last edited:
Hi,

you need to use vlan 1338 for bridge ip management too

Code:
auto vmbr0
iface vmbr0 inet manual
        bridge_ports eth1
        bridge_stp off
        bridge_fd 0
        bridge_vlan_aware yes

auto vmbr0.1338
iface vmbr0.1338 inet static
        address  10.10.13.103
        netmask  255.255.255.0
        gateway  10.10.13.1


I'll try to add documentation for bridge vlan aware setup soon.
 
Hi,

you need to use vlan 1338 for bridge ip management too

Code:
auto vmbr0
iface vmbr0 inet manual
        bridge_ports eth1
        bridge_stp off
        bridge_fd 0
        bridge_vlan_aware yes

auto vmbr0.1338
iface vmbr0.1338 inet static
        address  10.10.13.103
        netmask  255.255.255.0
        gateway  10.10.13.1


I'll try to add documentation for bridge vlan aware setup soon.

No becouse i'm using untagged vlan for the management so that is irrelevant.

here is my switch configuration:

interface Gi1/0/2
description "BLADE-2-IP-CONNECT"
switchport mode trunk
switchport trunk native vlan 801
switchport trunk allowed vlan 801,1338
exit

The network is just tagged for vlan 1338 for the LXC containers. I have not any problem with my network setup so far everything is just works except of the LXC problem. Check my videos.
 
Last edited:
Oh, sorry, I didn't understand your problem.

So is it simply the network config (ip), not applied inside the guest ?

What is the content of /etc/network/interfaces in guest when it's not working ?
 
Oh, sorry, I didn't understand your problem.

So is it simply the network config (ip), not applied inside the guest ?

What is the content of /etc/network/interfaces in guest when it's not working ?

Hi, yes thats right the LXC container are not applied the ip to the guest.

Well, to be honest, you are not manage to get in to the lxc container if they not providing any network so to answer that question isn't easy then ;(

If there isn't any backdoor or so in the the container like openvz "vzctl enter ID"

Best regards
Egner
 
# pct enter <ID>

Hi,

I have recreate the issue on node 1 now after one reboot.

Here is a picture on the /etc/network/interfaces on the LXC container there the network not working. And the /etc/network/interface seems legit.


node-1-lxc-102.png

#Picure 1.

node-1-lxc-102-2.png

#Picture 2.

node-1-lxc-102-3.png

#Picture 3.

Let me know if you need something.

/Best Regards
Egner
 
Please use `ip addr`, or the `-a` switch for ifconfig (`ifconfig -a`) so we at least know whether the interfaces show up at all.
 
Hi and good morning Wolfgang,

Here is the results, i also try to restart the network services from the terminal.

node1-ifconfig-a.png

Here is that one with ifconfig -a

node1-ipaddr.png

here is that one with ip addr

node1-service.png

Services restart with failure.

Let me know if you need something more.

/Best regards
Egner
 
Last edited:
So you do not have a networking issue, but an init system issue. Unfortunately, I didn't manage to solve this either, so I took the long route: reinstall the container from a working template (ubuntu 15.04 in my case), reinstall the packages and copy the data from the old container.
 
So you do not have a networking issue, but an init system issue. Unfortunately, I didn't manage to solve this either, so I took the long route: reinstall the container from a working template (ubuntu 15.04 in my case), reinstall the packages and copy the data from the old container.

Well i have the same issue, if i create a container with a different distro like Ubuntu the same problem is appear. And i want to running Debian and not Ubuntu.
But if you just restart the nodes a couple of times everything just start working like it should and the init.d/system.d scripts works and the network doh.


node2-ps-aux.png

This is how it look likes if i using the container that works if i type in ps -aux, so there is a lot of more of process.

So you are right, there is something with the system.d scripts that start together with LXC container.

/Best regards
Egner
 
Last edited:
I've searched the net for days (weeks?) for a solution to this issue but never managed to find it. If you solve it, please be kind and post it here. I'm pretty sure that there is something basic, like a bind mount or a cgroup thing missing or bad. Maybe a race condition if it works randomly.
 
Here is some additional loggfiles from the container

lxc-start 1442258583.881 ERROR lxc_conf - conf.c:run_buffer:336 - Script exited with status 255 lxc-start 1442258583.885 ERROR lxc_start - start.c:lxc_init:430 - failed to run pre-start hooks for container '102'.
lxc-start 1442258583.886 ERROR lxc_start - start.c:__lxc_start:1131 - failed to initialize the container
lxc-start 1442258588.891 ERROR lxc_start_ui - lxc_start.c:main:344 - The container failed to start.
lxc-start 1442258588.891 ERROR lxc_start_ui - lxc_start.c:main:346 - To get more details, run the container in foreground mode.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!