Comment 10 for bug 1519527

Revision history for this message
Andreas Hasenack (ahasenack) wrote : Re: 1.25.1 proposed: lxc units all have the same IP address

Confirmed busted.

juju 1.25.1 + maas 1.9 and all containers get the same IP. The device feature of maas is not used:

juju deploy ubuntu --to lxc:0 yielded this in the maas server syslog file:
Nov 25 17:49:37 maaslds dhcpd: DHCPDISCOVER from 00:16:3e:a9:76:e4 via eth0
Nov 25 17:49:37 maaslds dhcpd: DHCPOFFER on 10.245.202.8 to 00:16:3e:a9:76:e4 via eth0
Nov 25 17:49:37 maaslds dhcpd: DHCPREQUEST for 10.245.202.8 (10.245.200.27) from 00:16:3e:a9:76:e4 via eth0
Nov 25 17:49:37 maaslds dhcpd: DHCPACK on 10.245.202.8 to 00:16:3e:a9:76:e4 via eth0
Nov 25 17:50:10 maaslds dhcpd: DHCPREQUEST for 10.245.202.8 from 00:16:3e:a9:76:e4 via eth0
Nov 25 17:50:10 maaslds dhcpd: DHCPACK on 10.245.202.8 to 00:16:3e:a9:76:e4 via eth0
Nov 25 17:55:41 maaslds dhcpd: DHCPDISCOVER from 00:50:56:98:10:1c via eth0
Nov 25 17:55:42 maaslds dhcpd: DHCPOFFER on 10.245.201.33 to 00:50:56:98:10:1c via eth0

No record of a device allocation. And if I add-unit --to lxc:0, it gets the same IP:
Nov 25 17:56:32 maaslds dhcpd: DHCPREQUEST for 10.245.202.8 from 00:16:3e:cf:46:20 via eth0
Nov 25 17:56:32 maaslds dhcpd: DHCPACK on 10.245.202.8 to 00:16:3e:cf:46:20 via eth0
Nov 25 17:56:41 maaslds maas.lease_upload_service: [INFO] Uploading 54 DHCP leases to region controller.

$ juju status --format=tabular
[Services]
NAME STATUS EXPOSED CHARM
ubuntu unknown false cs:trusty/ubuntu-4

[Units]
ID WORKLOAD-STATE AGENT-STATE VERSION MACHINE PORTS PUBLIC-ADDRESS MESSAGE
ubuntu/0 unknown lost 1.25.1 0/lxc/0 10.245.202.8 agent is lost, sorry! See 'juju status-history ubuntu/0'
ubuntu/1 unknown lost 1.25.1 0/lxc/1 10.245.202.8 agent is lost, sorry! See 'juju status-history ubuntu/1'

[Machines]
ID STATE VERSION DNS INS-ID SERIES HARDWARE
0 started 1.25.1 node-7.vmwarestack /MAAS/api/1.0/nodes/node-5af81cf4-9399-11e5-a306-00505698101c/ trusty arch=amd64 cpu-cores=2 mem=8192M

Steps to reproduce:
1. Create a juju env using MAAS 1.9 as the provider with at least one registered and "Ready" node
2. juju bootstrap
3. juju deploy ubuntu --to lxc:0
4. juju add-unit ubuntu --to lxc:0

On step 3 already you will see that it's not reserving an IP via the API.
When using juju 1.25.1 and maas 1.8, the same operation yields entries like these:
Nov 25 08:39:38 virtue maas.api: [INFO] juju-machine-1-lxc-0: Added new device
Nov 25 08:39:39 virtue maas.api: [INFO] juju-machine-1-lxc-0: Sticky IP address(es) allocated: 10.1.102.116