lxd broker does not handle "No more IPs available" and falls back to lxdbr0

Bug #1656217 reported by Andrew McDermott
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Unassigned

Bug Description

I setup a /28 subnet, some IPs are reserved and there is a dynamic range set aside too. The nett result is that there is a limited set of IPs for static address allocation. I added 10 containers:

$ juju add-machine lxd:2 --constraints spaces=teeny

and I see containers on the LXD bridge - which should never happen:

$ juju status
Model Controller Cloud/Region Version
controller maas21-daily maas21-daily 2.1-rc1.3

App Version Status Scale Charm Store Rev OS Notes

Unit Workload Agent Machine Public address Ports Message

Machine State DNS Inst id Series AZ
0 started 172.16.101.201 cn3bat xenial default
2 started 172.16.101.28 67gtpx xenial default
2/lxd/0 started 172.16.106.4 juju-1da816-2-lxd-0 xenial
2/lxd/1 started 172.16.106.6 juju-1da816-2-lxd-1 xenial
2/lxd/2 started 172.16.106.7 juju-1da816-2-lxd-2 xenial
2/lxd/3 started 172.16.106.8 juju-1da816-2-lxd-3 xenial
2/lxd/4 started 172.16.106.9 juju-1da816-2-lxd-4 xenial
2/lxd/5 started 10.0.0.96 juju-1da816-2-lxd-5 xenial
2/lxd/6 started 172.16.106.14 juju-1da816-2-lxd-6 xenial
2/lxd/7 started 172.16.106.5 juju-1da816-2-lxd-7 xenial
2/lxd/8 started 10.0.0.194 juju-1da816-2-lxd-8 xenial
2/lxd/9 started 10.0.0.195 juju-1da816-2-lxd-9 xenial

Looking through the logs I see:

2017-01-13 07:34:58 WARNING juju.provisioner lxd-broker.go:73 failed to prepare container "2/lxd/8" network config: linking device interface "eth0" to subnet "172.16.106.0/28" failed: No more IPs available in subnet: 172.16.106.0/28

We should not fallback to using the lxd bridge.

Tags: lxd network
Revision history for this message
Andrew McDermott (frobware) wrote :
tags: added: lxd network
Revision history for this message
Andrew McDermott (frobware) wrote :
Changed in juju:
assignee: nobody → Andrew McDermott (frobware)
Changed in juju:
status: New → Triaged
importance: Undecided → High
milestone: none → 2.2.0
Revision history for this message
John A Meinel (jameinel) wrote :
Changed in juju:
assignee: Andrew McDermott (frobware) → nobody
Curtis Hovey (sinzui)
Changed in juju:
milestone: 2.2-beta1 → 2.2-beta2
Revision history for this message
John A Meinel (jameinel) wrote :

We should no longer be falling back to lxdbr0, so now it should just be a provisioning failure as we can't create a machine that won't have an IP address (it isn't useful), so its just a failure.

(This was fixed in 2.1.X)

Changed in juju:
status: Triaged → Fix Committed
milestone: 2.2-beta2 → 2.1.3
status: Fix Committed → Fix Released
Changed in juju:
milestone: 2.1.3 → 2.1.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.