Comment 2 for bug 1362224

Revision history for this message
Martin Pitt (pitti) wrote : Re: local provider creates all containers with the same MAC address

I'm using juju-local with the default settings, i. e. without aufs, and get the same. After deploying two services, I get

$ juju status
environment: local
machines:
  "0":
    agent-state: started
    agent-version: 1.20.5.1
    dns-name: localhost
    instance-id: localhost
    series: utopic
    state-server-member-status: has-vote
  "5":
    agent-state: started
    agent-version: 1.20.5.1
    dns-name: 10.0.3.57
    instance-id: martin-local-machine-5
    series: trusty
    hardware: arch=amd64
  "6":
    agent-state: started
    agent-version: 1.20.5.1
    dns-name: 10.0.3.57
    instance-id: martin-local-machine-6
    series: trusty
    hardware: arch=amd64

$ sudo lxc-ls --fancy
NAME STATE IPV4 IPV6 GROUPS AUTOSTART
---------------------------------------------------------------------
juju-trusty-lxc-template STOPPED - - - NO
martin-local-machine-5 RUNNING 10.0.3.57 - - YES
martin-local-machine-6 RUNNING 10.0.3.57 - - YES

They both have the same IP address and thus their network is broken. I confirm that this is due to having the same MAC:

$ sudo lxc-attach -n martin-local-machine-5 ip a show dev eth0
9: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:16:3e:c4:4e:24 brd ff:ff:ff:ff:ff:ff
    inet 10.0.3.57/24 brd 10.0.3.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::216:3eff:fec4:4e24/64 scope link
       valid_lft forever preferred_lft forever
0 martin@donald:~
$ sudo lxc-attach -n martin-local-machine-6 ip a show dev eth0
11: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:16:3e:c4:4e:24 brd ff:ff:ff:ff:ff:ff
    inet 10.0.3.57/24 brd 10.0.3.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::216:3eff:fec4:4e24/64 scope link tentative dadfailed
       valid_lft forever preferred_lft forever

This breaks lxc-local pretty much completely.