[lxc-users] Eth devices to host bridges association seems unpredictable

Nicola Volpini nicola.volpini at kambi.com
Thu Mar 31 08:58:13 UTC 2016


Hey everyone,

I'm seeing a strange behavior when using lxd profiles to attach the container eth devices to the host bridges.
I see some inconsistency: I made two bridges on my host and want to use the profiles to associate the container eth0 to one bridge, and eth1 to the other. Somehow, the eth0 and eth1 end up being assigned to the wrong bridges (swapped).
Here's the full output from lxd, showing the profiles and the bridges. At the end you'll see each of the container interfaces attached to the wrong bridge:

#####

me at host:~$ lxc profile show dev_br23
name: dev_br23
config: {}
description: ""
devices:
  eth1:
    nictype: bridged
    parent: br23
    type: nic
me at host:~$ lxc profile show dev_br250
name: dev_br250
config: {}
description: ""
devices:
  eth0:
    nictype: bridged
    parent: br250
    type: nic


me at host:~$ lxc profile apply lbng1-internal dev_br23,dev_br250
Profile dev_br23,dev_br250 applied to lbng1-internal
me at host:~$
me at host:~$ lxc config show lbng1-internal
name: lbng1-internal
profiles:
- dev_br23
- dev_br250
config:
  boot.autostart: "true"
  volatile.base_image: 5bcef3ad83936c18d45cd866f38cd2cab53bcd28fa38478166a57c404537ec1f
  volatile.eth0.hwaddr: 00:16:3e:75:5c:3d
  volatile.eth0.name: eth1
  volatile.eth1.hwaddr: 00:16:3e:9d:8f:c7
  volatile.eth1.name: eth0
  volatile.last_state.idmap: '[{"Isuid":true,"Isgid":false,"Hostid":231072,"Nsid":0,"Maprange":65536},{"Isuid":false,"Isgid":true,"Hostid":231072,"Nsid":0,"Maprange":65536}]'
devices:
  root:
    path: /
    type: disk
ephemeral: false

me at host:~$ brctl show
bridge name bridge id       STP enabled interfaces
br23        8000.5254001c2c55   no      eth2
                            vethASE3RF
                            vethB03UPX
br250       8000.525400256f8e   no      eth1
                            veth5AYAW8
                            vethAB1VM9
                            vethH2QO2P
                            vethUA3SUE
                            vethYPM4BL



me at host:~$ lxc info lbng1-internal
Name: lbng1-internal
Architecture: x86_64
Created: 2016/03/31 08:23 UTC
Status: Running
Type: persistent
Profiles: dev_br23, dev_br250
Pid: 17528
Processes: 27
Ips:
  eth0: inet    10.35.15.28 vethASE3RF
  eth0: inet6   fe80::216:3eff:fe9d:8fc7    vethASE3RF
  eth1: inet6   fe80::216:3eff:fe75:5c3d    vethH2QO2P
  lo:   inet    127.0.0.1
  lo:   inet6   ::1

####

Am I missing something very obvious?
Thanks!

CONFIDENTIALITY NOTICE: This email message (and any attachment) is intended only for the individual or entity to which it is addressed. The information in this email is confidential and may contain information that is legally privileged or exempt from disclosure under applicable law. If you are not the intended recipient, you are strictly prohibited from reading, using, publishing or disseminating such information and upon receipt, must permanently delete the original and destroy any copies. We take steps to protect against viruses and other defects but advise you to carry out your own checks and precautions as Kambi does not accept any liability for any which remain. Thank you for your co-operation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20160331/2a7fd762/attachment.html>


More information about the lxc-users mailing list