Fixed lp:1348663 - ensure NICs are brought down to trigger DHCPRELEASE #2548

Merged
merged 1 commit into from Jun 11, 2015

Conversation

Projects
None yet
2 participants
Contributor

dimitern commented Jun 11, 2015

Added a new "juju-clean-shutdown" init job/service to all machines at
initial boot (as an upstart job or systemd service, as needed). This job
ensures that on reboot, shutdown, or halt, "ifdown -a" is called to
bring down (and consequently issue a DHCPRELEASE packet) all machine
network interfaces.

A drive-by fix in the MAAS provider is included. I've discovered when
you bootstrap (or add) a vivid machine on MAAS the script creating
juju-br0 (calling ifdown PRIMARY_NIC ; ifup juju-br0) is somehow causing
a duplicate route (e.g. 10.14.0.0/24 proto kernel scope link dev et0 src
10.14.0.100 and 10.14.0.0/24 proto kernel scope link dev juju-br0 src
10.14.0.100) which effectively makes the bootstrap node inaccessible.
The drive-by fix just flushes any routes on the primary NIC before
bringing up juju-br0 - verified to work by live testing.

Live tested extensively on MAAS and EC2 using different combinations of
series (precise, trusty, vivid) and workloads in containers (LXC, KVM).
Each machine or container was manually stopped or rebooted and
DHCPRELEASE packets are observed as this happens on the MAAS DHCP server
side using dhcpdump.

(Review request: http://reviews.vapour.ws/r/1918/)

Contributor

dimitern commented Jun 11, 2015

$$fixes-1348663$$

Contributor

jujubot commented Jun 11, 2015

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

jujubot added a commit that referenced this pull request Jun 11, 2015

Merge pull request #2548 from dimitern/lp-1348663-1.24-dhcp-release
Fixed lp:1348663 - ensure NICs are brought down to trigger DHCPRELEASE

Added a new "juju-clean-shutdown" init job/service to all machines at
initial boot (as an upstart job or systemd service, as needed). This job
ensures that on reboot, shutdown, or halt, "ifdown -a" is called to
bring down (and consequently issue a DHCPRELEASE packet) all machine
network interfaces.

A drive-by fix in the MAAS provider is included. I've discovered when
you bootstrap (or add) a vivid machine on MAAS the script creating
juju-br0 (calling ifdown PRIMARY_NIC ; ifup juju-br0) is somehow causing
a duplicate route (e.g. 10.14.0.0/24 proto kernel scope link dev et0 src
10.14.0.100 *and* 10.14.0.0/24 proto kernel scope link dev juju-br0 src
10.14.0.100) which effectively makes the bootstrap node inaccessible.
The drive-by fix just flushes any routes on the primary NIC before
bringing up juju-br0 - verified to work by live testing.

Live tested extensively on MAAS and EC2 using different combinations of
series (precise, trusty, vivid) and workloads in containers (LXC, KVM).
Each machine or container was manually stopped or rebooted and
DHCPRELEASE packets are observed as this happens on the MAAS DHCP server
side using `dhcpdump`.

(Review request: http://reviews.vapour.ws/r/1918/)

@jujubot jujubot merged commit 743ab8b into juju:1.24 Jun 11, 2015

@dimitern dimitern deleted the dimitern:lp-1348663-1.24-dhcp-release branch Jun 11, 2015

jujubot added a commit that referenced this pull request Jun 12, 2015

Merge pull request #2549 from dimitern/lp-1348663-1.25-dhcp-release
Fixed lp:1348663 - (port to 1.25) ensure NICs are brought down to trigger DHCPRELEASE

Straightforward port of #2548 to master, no other changes.

Added a new "juju-clean-shutdown" init job/service to all machines at
initial boot (as an upstart job or systemd service, as needed). This job
ensures that on reboot, shutdown, or halt, "ifdown -a" is called to
bring down (and consequently issue a DHCPRELEASE packet) all machine
network interfaces.

A drive-by fix in the MAAS provider is included. I've discovered when
you bootstrap (or add) a vivid machine on MAAS the script creating
juju-br0 (calling ifdown PRIMARY_NIC ; ifup juju-br0) is somehow causing
a duplicate route (e.g. 10.14.0.0/24 proto kernel scope link dev et0 src
10.14.0.100 and 10.14.0.0/24 proto kernel scope link dev juju-br0 src
10.14.0.100) which effectively makes the bootstrap node inaccessible.
The drive-by fix just flushes any routes on the primary NIC before
bringing up juju-br0 - verified to work by live testing.

Live tested extensively on MAAS and EC2 using different combinations of
series (precise, trusty, vivid) and workloads in containers (LXC, KVM).
Each machine or container was manually stopped or rebooted and
DHCPRELEASE packets are observed as this happens on the MAAS DHCP server
side using dhcpdump.

(Review request: http://reviews.vapour.ws/r/1919/)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment