provider/maas: only bridge specified interfaces #6342

Merged
merged 2 commits into from Sep 29, 2016

Conversation

Projects
None yet
5 participants
Contributor

frobware commented Sep 28, 2016

The list of interfaces to be bridged is no longer automatically
determined by the bridge script; you know need to specify a space
separated list of interface names that you want bridging.

For example:

$ add-juju-bridge.py
--interfaces-to-bridge="eth0 eth0:1 eth0:2 bond2" /e/n/i

The MAAS provider now works out which interfaces are to be bridged and
invokes the script with a specific set of interface names. The MAAS
provider will now bridge any interface that has a subnet and is not
unconfigured (i.e., it has an IP address).

Fixes LP:#1627037

provider/maas: only bridge specified interfaces
The list of interfaces to be bridged is no longer automatically
determined by the bridge script; you know need to specify a space
separated list of interface names that you want bridging.

For example:

 $ add-juju-bridge.py \
     --interfaces-to-bridge="eth0 eth0:1 eth0:2 bond2" /e/n/i

The MAAS provider now works out which interfaces are to be bridged and
invokes the script with a specific set of interface names. The MAAS
provider will now bridge any interface that has a subnet and is not
unconfigured (i.e., it has an IP address).

Fixes [LP:#1627037](https://bugs.launchpad.net/juju/+bug/1627037)
+ interfaces []network.InterfaceInfo
+ err error
+ )
+ if !usingMAAS2 {
@dooferlad

dooferlad Sep 28, 2016

Contributor

Pass in MAAS API version and switch.

@frobware

frobware Sep 28, 2016

Contributor

We should do this as a separate change; there are many other places that pass in / use the result of usingMAAS2().

@dooferlad

dooferlad Sep 29, 2016

Contributor

OK, 👍 in that case.

Contributor

frobware commented Sep 28, 2016

We're going to drop this PR and produce a final-final version.

Contributor

frobware commented Sep 28, 2016

And... having checked everything we're now going to keep this PR.

Remove bogus constant
A leftover from dev testing.
Contributor

frobware commented Sep 29, 2016

I have tested this MAAS 2.0 using a combination of nodes with:

  • one nic
  • two nics, one unconfigured
  • bonded nics, parent unconfigued
  • vlan on a bond

And for each scenario I added a LXD container. In one setup I ran into the issue PR #6276 fixes, and indeed it fixed my setup too. For each of these scenarios I visually inspected /etc/network/interfaces on both the host and in the container.

Tested the combinations using xenial.

Contributor

frobware commented Sep 29, 2016

I have also tested with trusty.

Contributor

dimitern commented Sep 29, 2016

I tested with trusty on 1.9 MAAS as well, and with xenial (yesterday) on both 2.0 and 1.9 MAAS

Owner

mitechie commented Sep 29, 2016

$$merge$$

Contributor

jujubot commented Sep 29, 2016

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

@jujubot jujubot merged commit f827c1f into juju:master Sep 29, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment