Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maas: Make spaces constraints work on MAAS 1.9+ #3921

Merged
merged 7 commits into from Dec 15, 2015

Conversation

dimitern
Copy link

@dimitern dimitern commented Dec 8, 2015

This PR introduces 2 main changes:

  • Subnets() can now be called without instance ID and/or empty subnet
    IDs when we detect the new MAAS 1.9 API is available
  • acquireNode API properly transforms spaces constraints and interface
    bindings into "interfaces=" argument. Bindings override spaces
    constraints when both exist, however there's no way yet to pass
    explicit interface bindings.

Added more tests around the various ways Subnets() is being called and
implemented - with older and newer MAAS APIs.

Live tested on MAAS 1.9RC3 to ensure the following steps work:

$ juju bootstrap --upload-tools
$ juju space create space-0     # matching existing one in MAAS
$ juju subnet add 10.20.19.0/24 default # zone is required (e.g. "default")
$ juju deploy mysql --constraints spaces=space-0

Also, for a more real-life-like demo, I managed to deploy a modified
mediawiki bundle (http://paste.ubuntu.com/13837091/) once the subnets,
VLANs, and spaces were preconfigured like this: http://paste.ubuntu.com/13837104/
and I've run:

$ juju space create admin
$ juju space create public
$ juju subnet add 10.50.19.0/24 admin default
$ juju subnet add 10.100.19.0/24 public default

Discovered an issue with the bridge script - it's not handling VLANs
correctly, so I needed to use disable-network-management: true as a
workaround (otherwise bootstrap failed).

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

@dimitern
Copy link
Author

$$merge$$

@jujubot
Copy link
Collaborator

jujubot commented Dec 10, 2015

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

@dimitern
Copy link
Author

Build failed: boo

@dimitern
Copy link
Author

$$finally$$

@dimitern dimitern closed this Dec 15, 2015
@dimitern dimitern reopened this Dec 15, 2015
@jujubot
Copy link
Collaborator

jujubot commented Dec 15, 2015

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

@jujubot
Copy link
Collaborator

jujubot commented Dec 15, 2015

Build failed: Generating tarball failed
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/5746

@dimitern
Copy link
Author

$$suckerpunch$$

@jujubot
Copy link
Collaborator

jujubot commented Dec 15, 2015

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

jujubot added a commit that referenced this pull request Dec 15, 2015
maas: Make spaces constraints work on MAAS 1.9+

This PR introduces 2 main changes:
 * Subnets() can now be called without instance ID and/or empty subnet
   IDs when we detect the new MAAS 1.9 API is available
 * acquireNode API properly transforms spaces constraints and interface
   bindings into "interfaces=" argument. Bindings override spaces
   constraints when both exist, however there's no way yet to pass
   explicit interface bindings.

Added more tests around the various ways Subnets() is being called and
implemented - with older and newer MAAS APIs.

Live tested on MAAS 1.9RC3 to ensure the following steps work:

```
$ juju bootstrap --upload-tools
$ juju space create space-0     # matching existing one in MAAS
$ juju subnet add 10.20.19.0/24 default # zone is required (e.g. "default")
$ juju deploy mysql --constraints spaces=space-0
```

Also, for a more real-life-like demo, I managed to deploy a modified
mediawiki bundle (http://paste.ubuntu.com/13837091/) once the subnets,
VLANs, and spaces were preconfigured like this: http://paste.ubuntu.com/13837104/
and I've run:

```
$ juju space create admin
$ juju space create public
$ juju subnet add 10.50.19.0/24 admin default
$ juju subnet add 10.100.19.0/24 public default
```

Discovered an issue with the bridge script - it's not handling VLANs
correctly, so I needed to use `disable-network-management: true` as a
workaround (otherwise bootstrap failed).

(Review request: http://reviews.vapour.ws/r/3342/)
@jujubot jujubot merged commit 7774ee9 into juju:maas-spaces Dec 15, 2015
@dimitern dimitern deleted the maas-spaces-fix-subnets-maas branch December 15, 2015 21:16
@kisahm
Copy link

kisahm commented May 10, 2016

If i try to use spaces in juju 1.25.5 with MAAS 1.9.2 is get this error:

$ juju space create testspace
cannot create space "testspace": spaces not supported
ERROR cannot create space "testspace": spaces not supported

Must i activate the space usage first?

@dimitern
Copy link
Author

On 05/10/2016 04:47 PM, Kim-Norman Sahm wrote:

If i try to use spaces in juju 1.25.5 with MAAS 1.9.2 is get this error:

|$ juju space create testspace cannot create space "testspace": spaces
not supported ERROR cannot create space "testspace": spaces not supported |

Must i activate the space usage first?


You are receiving this because you modified the open/close state.
Reply to this email directly or view it on GitHub
#3921 (comment)

Hey Kim,

Juju 1.25 does not yet support spaces on MAAS, Juju 2.0 does, but the
release is not yet out. You could try the latest 2.0-beta7 (IIRC).

Also, spaces are only discovered by Juju (automatically at bootstrap),
but managed my MAAS. The 'space create' or as it's called now
'add-space' command is not yet completely supported, and only on AWS for
that matter. Have a look at
https://jujucharms.com/docs/devel/network-spaces for more info on how to
try spaces in AWS (also works for Juju 1.25).

Cheers,

Dimiter Naydenov dimiter.naydenov@canonical.com
Juju Core Sapphire team http://juju.ubuntu.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants