Merge maas-spaces into master #4392

Merged
merged 370 commits into from Feb 11, 2016

Conversation

Projects
None yet
6 participants
Contributor

dimitern commented Feb 11, 2016

We had a Blessed build for both master and maas-spaces and last few CI runs seem to indicate similar reliability of both branches, I think it's time to merge now.

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

Michael Foord and others added some commits Dec 16, 2015

Merge pull request #3976 from frobware/maas-spaces-multi-bridge-script
maas: add a bridge to all active interfaces

Reworked the bridge script so that all active interfaces get bridged. An
'active' interface is one that has both an 'auto' stanza and whose
'iface' method is either 'dhcp' or 'static'.

To avoid any clashes a prefix ('juju-br-') is added to device names that
become bridges; this allows for 'juju-br-eth0' and 'juju-br-bond0'.
Sticking to the old format we would end up with 'juju-br0' for both
'eth0' and 'bond0'.

I'm landing this change so that the script itself can have some exposure
on the maas-spaces branch. A subsequent PR will follow that ensures LXC
configurations are updated to include network entries for each active
interface.

The script is aware of bonds, VLANs and aliases.

(Review request: http://reviews.vapour.ws/r/3398/)
maas: add bridge script using AddBootTextFile()
Add the python-based bridge script to the node using AddBootTextFile().

This is written as /tmp/add-juju-bridge.py. The run commands that use
this script are bracketed by calls that check for its existence. Ala:

  trap 'rm -f /tmp/add-juju-bridge.py' EXIT

  if [ -f /tmp/add-juju-bridge.py ]; then
     /tmp/add-juju-bridge.py ...
  fi

And the script itself is deleted once it has run once as it is not
idempotent; the script is expected to run once against the
machine-generated /etc/network/interfaces from curtin and MAAS.

This change no longer requires that the python script be encapsulated as
a bash 'here doc' which removes issues with quoting and various other
characters such as embedded "\n". And because it is no longer a 'here
doc' the script is no longer echoed to the console when cloud-init runs
during node deployment.
Merge pull request #3987 from voidspace/maas-spaces-networking-api3
Discover spaces and subnets on bootstrap

Merge of WIP branch.

(Review request: http://reviews.vapour.ws/r/3409/)
Merge pull request #3992 from frobware/maas-spaces-add-bridge-script-…
…using-AddBootTextFile

maas: add bridge script using AddBootTextFile()

Add the python-based bridge script to the node using AddBootTextFile().

This is written as /tmp/add-juju-bridge.py. The run commands that use
this script are bracketed by calls that check for its existence. Ala:

  trap 'rm -f /tmp/add-juju-bridge.py' EXIT

  if [ -f /tmp/add-juju-bridge.py ]; then
     /tmp/add-juju-bridge.py ...
  fi

And the script itself is deleted once it has run once as it is not
idempotent; the script is expected to run once against the
machine-generated /etc/network/interfaces from curtin and MAAS.

This change no longer requires that the python script be encapsulated as
a bash 'here doc' which removes issues with quoting and various other
characters such as embedded "\n". And because it is no longer a 'here
doc' the script is no longer echoed to the console when cloud-init runs
during node deployment.

(Review request: http://reviews.vapour.ws/r/3414/)
Merge pull request #3993 from dooferlad/uniter-network-config
Uniter network config

Add the NetworkConfig API call to the Uniter.

(Review request: http://reviews.vapour.ws/r/3415/)
Merge pull request #3997 from voidspace/maas-spaces-networking-api4
Skips subnets we already know about

Fixes error when worker is restarted and attempts to re-create subnets that already exist.

(Review request: http://reviews.vapour.ws/r/3419/)
Merge pull request #4037 from voidspace/maas-spaces-networking-api5
Tests for discoverspaces api

Add tests for discoverspaces api.

(Review request: http://reviews.vapour.ws/r/3456/)
Merge pull request #4029 from dimitern/maas-spaces-network-get-min
Minimal working implementation on network-get hook tool on MAAS

Tested with a couple of simple charms based on the ubuntu charm, but with
a few relations, which can be bound to spaces and later the addresses we
get from network-get within each relation are logged.

Key changes:
 * network.Address, params.Address, and state.address now have SpaceName added.
 * instance.Addresses() in MAAS parse the interface_set map and return the space
   each IP is bound to (according to the links of each interface).
 * state/API endpoints now are selected first from the default space, if possible,
   which solves the problems with non-deterministic address picking and sorting.
   As a fallback, the old approach with scopes + sorting is used.
 * StartInstance() now includes EndpointBindings map, populated by the provisioner
   with all bindings from all services which have units assigned to the machine we're
   about to provision. This also takes full advantage of the "interfaces=" argument
   in MAAS (acquireNode) for bindings.

Next step should be to do the multi-NIC containers in a simplified way.

(Review request: http://reviews.vapour.ws/r/3448/)
Merge pull request #4038 from voidspace/maas-spaces-networking-api6
Tests for common spaces code

Add tests for apiserver/common/networkingcommon/spaces.

(Review request: http://reviews.vapour.ws/r/3457/)
Merge pull request #4044 from voidspace/maas-spaces-networking-api7
Test common subnets code

Add tests for apiserver/common/commonnetworking/subnets.

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

Michael Foord and others added some commits Feb 4, 2016

Merge pull request #4293 from voidspace/maas-spaces-no-networking-test
Test space discovery on providers without NetworkingEnviron support

Test space discovery correctly closes the channel (completes) on providers without NetworkingEnviron support.

(Review request: http://reviews.vapour.ws/r/3735/)
Merge pull request #4311 from voidspace/maas-spaces-discovery-mutex
Make the space discovery worker safe to be restarted

Ensure there is only a single space discovery channel, so if the discovery worker is restarted the API is left unblocked.

(Review request: http://reviews.vapour.ws/r/3753/)
Merge pull request #4352 from voidspace/maas-spaces-address-provider-id
Add SpaceProviderId to network.Address

Precursor to using space provider id instead of name in MAAS provider.

(Review request: http://reviews.vapour.ws/r/3796/)
apiserver/provisioner: Simplified a couple of tests, extracted Provis…
…ioningInfo code and tests in separate files
Merge pull request #4331 from dimitern/maas-spaces-optional-bindings
Make service endpoint bindings optional and drop network.DefaultSpace dependency

RB link: http://reviews.vapour.ws/r/3773/
Merge pull request #4354 from dimitern/maas-spaces-state-fix-spaces-s…
…ubnets

Allow state.Space and Subnet with duplicate ProviderIds across models

Needed to allow discoverspaces to work in models other than the
controller model.

Also includes some improvements to tests.

(Review request: http://reviews.vapour.ws/r/3798/)
Merge pull request #4386 from dimitern/maas-spaces-merge-master-c215028
Merge master @ c215028 into maas-spaces

Hopefully for the last time..

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

dimitern commented Feb 11, 2016

I'll check back later tonight to see if there are any replies

Contributor

frobware commented Feb 11, 2016

@dimiter - sinzui is preparing a PR, so check with him first.

Contributor

sinzui commented Feb 11, 2016

We can see this revision is blessed
http://reports.vapour.ws/releases/3597

There are no open bugs
https://bugs.launchpad.net/juju-core/maas-spaces

cherylj commented Feb 11, 2016

$$JFDI$$

Contributor

jujubot commented Feb 11, 2016

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

Contributor

jujubot commented Feb 11, 2016

Build failed: Tests failed
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/6352

cherylj commented Feb 11, 2016

$$JFDI$$

Contributor

jujubot commented Feb 11, 2016

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

jujubot added a commit that referenced this pull request Feb 11, 2016

Merge pull request #4392 from juju/maas-spaces
Merge maas-spaces into master

We had a Blessed build for both master and maas-spaces and last few CI runs seem to indicate similar reliability of both branches, I think it's time to merge now.

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

@jujubot jujubot merged commit 4ccd006 into master Feb 11, 2016

@frobware frobware deleted the maas-spaces branch Feb 16, 2016

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