provider/maas: Only bridge configured interfaces on maas nodes #6341

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants
Contributor

dimitern commented Sep 28, 2016

This changes the behavior from "bridge all" to "bridge only configured"
interfaces on MAAS nodes. Tested on 1.9 and 2.0 with various NICs
config, including linked-to-subnet-but-unconfigured, linked-as-auto,
linked-as-static, linked-as-DHCP. All nodes are dual- or quad-NIC ones,
including cases with one or two bonds and various VLAN NICs on top.

QA steps: bootstrap on maas 1.9/2.0, switch controller, add machine(s),
add 2 LXDs on each machine.

Andrew McDermott and others added some commits Sep 27, 2016

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 linked to it,
irrespective of its configured/unconfigured state.

Fixes [LP:#1627037](https://bugs.launchpad.net/juju/+bug/1627037)
}
}
-func (s *bridgeConfigSuite) TestBridgeScriptBridgeNameArgumentRequired(c *gc.C) {
+func (s *bridgeConfigSuite) xxxTestBridgeScriptMatchingNonExistentSpecificIface(c *gc.C) {
@dooferlad

dooferlad Sep 28, 2016

Contributor

xxx?

@@ -1006,7 +1016,7 @@ func (environ *maasEnviron) StartInstance(args environs.StartInstanceParams) (
// assigned IP addresses, even when NICs are set to "auto" instead of
// "static". So instead of selectedNode, which only contains the
// acquire-time details (no IP addresses for NICs set to "auto" vs
- // "static"), we use the up-to-date startedNode response to get the
+ // "static"),e we use the up-to-date startedNode response to get the
@dooferlad

dooferlad Sep 28, 2016

Contributor

unwanted, added 'e'

+ interfaces []network.InterfaceInfo
+ err error
+ )
+ if !usingMAAS2 {
@dooferlad

dooferlad Sep 28, 2016

Contributor

Pass in a MAAS API version and switch on it?

Contributor

frobware commented Sep 28, 2016

I think we should review my branch. :) Largely because that's the one I have been pushing to CI and it doesn't have the xxxTest changes, et al.

Contributor

dooferlad commented Sep 28, 2016

In that case, if you haven't already, please update the card with the branch you want reviewed. You can also ping it to me on IRC if you like.

Contributor

dimitern commented Sep 29, 2016

Closing this - superseded by #6342

@dimitern dimitern closed this Sep 29, 2016

@dimitern dimitern deleted the dimitern:master-lp1627037-bridge-configured branch Sep 29, 2016

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