provider/maas bridge script is not idempotent

Bug #1553915 reported by Andrew McDermott
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Andrew McDermott
juju-core
Fix Released
High
Andrew McDermott
1.25
Fix Released
High
Andrew McDermott

Bug Description

The add-juju-bridge.py script is not idempotent; running the script against an /etc/network/interfaces file that already has bridged interfaces will create another iface stanza and indirectly bridge the existing interface. This will be a problem if the bridge script gets run again as an upgrade step.

For example:

bridgescript_test.go:117:
    s.assertScriptWithPrefix(c, v.expected, v.expected, v.prefix)
bridgescript_test.go:73:
    c.Check(strings.Trim(output, "\n"), gc.Equals, expectedConfig)
... obtained string = "" +
... "auto lo\n" +
... "iface lo inet loopback\n" +
... "\n" +
... "iface eth0 inet manual\n" +
... "\n" +
... "iface test-br-eth0 inet manual\n" +
... "\n" +
... "auto test-br-test-br-eth0\n" +
... "iface test-br-test-br-eth0 inet static\n" +
... " address 1.2.3.4\n" +
... " netmask 255.255.255.0\n" +
... " gateway 4.3.2.1\n" +
... " bridge_ports eth0\n" +
... " bridge_ports test-br-eth0\n" +
... "\n" +
... "auto eth0:1\n" +
... "iface eth0:1 inet static\n" +
... " address 1.2.3.5"
... expected string = "" +
... "auto lo\n" +
... "iface lo inet loopback\n" +
... "\n" +
... "iface eth0 inet manual\n" +
... "\n" +
... "auto test-br-eth0\n" +
... "iface test-br-eth0 inet static\n" +
... " address 1.2.3.4\n" +
... " netmask 255.255.255.0\n" +
... " gateway 4.3.2.1\n" +
... " bridge_ports eth0\n" +
... "\n" +
... "auto eth0:1\n" +
... "iface eth0:1 inet static\n" +
... " address 1.2.3.5"

Changed in juju-core:
importance: Undecided → High
assignee: nobody → Andrew McDermott (frobware)
Revision history for this message
Andrew McDermott (frobware) wrote :
Changed in juju-core:
status: New → Fix Committed
Changed in juju-core:
milestone: none → 2.0-beta3
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
affects: juju-core → juju
Changed in juju:
milestone: 2.0-beta3 → none
milestone: none → 2.0-beta3
Changed in juju-core:
assignee: nobody → Andrew McDermott (frobware)
importance: Undecided → High
status: New → 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.