Using MAAS 1.9 as provider using DHCP NIC will prevent juju bootstrap

Bug #1512371 reported by Darryl Weaver
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
Critical
Unassigned
1.25
Fix Released
Critical
Andrew McDermott

Bug Description

After the update from bug 1494476, juju 1.25.0 now correctly deals with the case that MAAS 1.9 is being used as a provider and the address allocation is "Auto-assign" i.e. dynamically allocated from an IP pool, but statically configured in the nodes /etc/network/interfaces.

However, if using MAAS 1.9and setting the NIC to use DHCP instead of "Auto-assign" the /etc/network/interfaces configuration will break the juju runcmd script and fail to complete, there being no /var/lib/juju/nonce.txt file means bootstrap will not complete.

It is caused by the MAAS 1.9 format for /etc/network/interfaces when using DHCP.
The file will look something like this:
auto eth0
iface eth0 inet dhcp

dns-nameservers 192.168.92.18
dns-search hv.dazcloud.com

Juju's runcmd script will then simply remove the first 2 lines and place the juju-br0 stanza at the BOTTOM of the resulting file, i.e.:

dns-nameservers 192.168.92.18
dns-search hv.dazcloud.com

auto juju-br0
iface juju-br0 inet dhcp
     bridge-ports eth0

The /etc/network/interfaces file is therefore invalid and the runcmd's restart of eth0 then fails and the script exits.
The file is invalid as any dns-* entries should be after the first NIC interface stanza and not before it.

Changed in juju-core:
status: New → Triaged
importance: Undecided → Critical
milestone: none → 1.25.1
tags: added: bug-squad maas-provider network
Revision history for this message
Cheryl Jennings (cherylj) wrote :

Dimiter is working on a branch to improve how juju modifies /e/n/i. This case should be addressed in that branch. Will follow up with a target for when that branch will land.

Changed in juju-core:
assignee: nobody → Dimiter Naydenov (dimitern)
status: Triaged → In Progress
Changed in juju-core:
milestone: 1.25.1 → 1.26.0
Changed in juju-core:
assignee: Dimiter Naydenov (dimitern) → Andrew McDermott (frobware)
assignee: Andrew McDermott (frobware) → nobody
Revision history for this message
Andrew McDermott (frobware) wrote :
Revision history for this message
Andrew McDermott (frobware) wrote :
Changed in juju-core:
status: In Progress → Fix Committed
Revision history for this message
Andrew McDermott (frobware) wrote :

Changing back to in progress for master as I selected the wrong branch for my PR.

Changed in juju-core:
status: Fix Committed → In Progress
Revision history for this message
Andrew McDermott (frobware) wrote :
Changed in juju-core:
status: In Progress → Fix Committed
Changed in juju-core:
milestone: 1.26.0 → 2.0-alpha1
Changed in juju-core:
milestone: 2.0-alpha1 → 1.26-alpha3
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
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.