juju lxc template does not DHCP release

Bug #1498642 reported by Andreas Hasenack
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
juju-core
Invalid
High
Unassigned
1.25
Fix Released
Critical
Mick Gregg

Bug Description

The first time an LXC container is created on a MAAS node, juju creates a template called juju-<distro>-lxc-template.

That container gets a DHCP lease from MAAS, does its business, then shuts down. Juju then clones it into the definitive container it will use for the service unit and brings that one up.

These MAAS syslog logs show that the template does not issue a DHCP RELEASE when shutting down. It's also evidenced by the clone coming up and trying to request the same IP it had before, which is DHCPNAK'ed because from MAAS' point of view, it's still allocated to the template:

Sep 22 16:45:57 maas dhcpd: DHCPDISCOVER from 00:16:3e:cc:bc:6d via bond0
Sep 22 16:45:58 maas dhcpd: DHCPOFFER on 10.0.5.12 to 00:16:3e:cc:bc:6d (juju-trusty-lxc-template) via bond0
Sep 22 16:45:58 maas dhcpd: DHCPREQUEST for 10.0.5.12 (10.0.5.10) from 00:16:3e:cc:bc:6d (juju-trusty-lxc-template) via bond0
Sep 22 16:45:58 maas dhcpd: DHCPACK on 10.0.5.12 to 00:16:3e:cc:bc:6d (juju-trusty-lxc-template) via bond0
Sep 22 16:48:22 maas dhcpd: DHCPREQUEST for 10.0.5.12 from 00:16:3e:ce:a0:4b via bond0: lease 10.0.5.12 unavailable.
Sep 22 16:48:22 maas dhcpd: DHCPNAK on 10.0.5.12 to 00:16:3e:ce:a0:4b via bond0
Sep 22 16:48:22 maas dhcpd: DHCPDISCOVER from 00:16:3e:ce:a0:4b via bond0
Sep 22 16:48:23 maas dhcpd: DHCPOFFER on 10.0.5.14 to 00:16:3e:ce:a0:4b (juju-machine-0-lxc-0) via bond0
Sep 22 16:48:23 maas dhcpd: DHCPREQUEST for 10.0.5.14 (10.0.5.10) from 00:16:3e:ce:a0:4b (juju-machine-0-lxc-0) via bond0
Sep 22 16:48:23 maas dhcpd: DHCPACK on 10.0.5.14 to 00:16:3e:ce:a0:4b (juju-machine-0-lxc-0) via bond0

In the end it all works, as the container just issues a DISCOVER and starts fresh. But we leaked one IP in the process.

Revision history for this message
Alexis Bruemmer (alexis-bruemmer) wrote :

What version of Juju are you using?

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

This does not happen when the juju environment was bootstrapped with JUJU_DEV_FEATURE_FLAGS=address-allocation. Then the template lxc does not issue a DHCP request and instead uses the IP it got from the MAAS API call that allocated it instead.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

1.24.5

Curtis Hovey (sinzui)
tags: added: maas-provider network
Curtis Hovey (sinzui)
Changed in juju-core:
status: New → Triaged
importance: Undecided → High
milestone: none → 1.25.1
Changed in juju-core:
milestone: 1.25.1 → 1.25.2
Changed in juju-core:
milestone: 1.25.2 → 1.25.3
Changed in juju-core:
milestone: 1.25.3 → 1.25.4
Changed in juju-core:
milestone: 1.25.4 → 1.25.5
Changed in juju-core:
milestone: 1.25.5 → 1.25.6
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 1.25.6 → 1.25.7
Changed in juju-core:
importance: High → Critical
Changed in juju-core:
milestone: 1.25.7 → none
importance: Critical → High
Changed in juju-core:
status: Triaged → Won't Fix
status: Won't Fix → Invalid
tags: added: teamb
Revision history for this message
Mick Gregg (macgreagoir) wrote :

Also noting that juju is not cleaning up dhcp lease or cloud-init log files from the template, in cases where address-allocation is not used.

Revision history for this message
Mick Gregg (macgreagoir) wrote :

PR https://github.com/juju/juju/pull/6474

DHCP release and cruft cleanup both handled.

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.