Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(663)

Issue 86600043: provider/maas: Setup networks/VLANs in cloudinit (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years ago by dimitern
Modified:
10 years ago
Reviewers:
mp+215266, fwereade
Visibility:
Public.

Description

provider/maas: Setup networks/VLANs in cloudinit This is possibly the final server-side task to do in order to have VLANs/networks support in MAAS as an MVP. Using the discovered networks and interfaces, we prepare a few scripts to run at cloudinit time: * install the "vlan" package (so we can configure VLANs); * load the 8021q module for VLAN support; * skipping eth0 (part of br0 already), for each NIC discovered on the machine, add /etc/network/interfaces config and bring it up. For VLANs a few extra steps are done after their "parent" NIC is brought up As this is an MVP, we assume the user has configured their MAAS, nodes, and networks correctly, and also has DHCP enabled on all networks (we lack the info to configure the IPs statically from MAAS alone). Live tested on MAAS (works if properly configured). Next step will be to list machine networks in Status and polish up some tech debt stuff (better unit tests, more sanity checks in the CLI, etc.) https://code.launchpad.net/~dimitern/juju-core/395-maas-setup-networks-cloudinit/+merge/215266 Requires: https://code.launchpad.net/~dimitern/juju-core/394-network-name-to-id-and-add-tags/+merge/214962 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 6

Patch Set 2 : provider/maas: Setup networks/VLANs in cloudinit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+69 lines, -4 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M provider/maas/environ.go View 1 3 chunks +48 lines, -2 lines 0 comments Download
M provider/maas/environ_test.go View 2 chunks +19 lines, -2 lines 0 comments Download

Messages

Total messages: 3
dimitern
Please take a look.
10 years ago (2014-04-10 17:58:30 UTC) #1
fwereade
LGTM with a couple of matters of opinion to consider. https://codereview.appspot.com/86600043/diff/1/provider/maas/environ.go File provider/maas/environ.go (right): https://codereview.appspot.com/86600043/diff/1/provider/maas/environ.go#newcode475 ...
10 years ago (2014-04-11 08:05:58 UTC) #2
dimitern
10 years ago (2014-04-11 15:23:49 UTC) #3
Please take a look.

https://codereview.appspot.com/86600043/diff/1/provider/maas/environ.go
File provider/maas/environ.go (right):

https://codereview.appspot.com/86600043/diff/1/provider/maas/environ.go#newco...
provider/maas/environ.go:475: for _, script := range
setupNetworksOnBoot(networkInfo) {
On 2014/04/11 08:05:58, fwereade wrote:
> This seems like a bit of an odd construction. setupNetworksOnBoot(cloudcfg,
> networkInfo) might read more naturally?

Done.

https://codereview.appspot.com/86600043/diff/1/provider/maas/environ.go#newco...
provider/maas/environ.go:482: // networks on boot.
On 2014/04/11 08:05:58, fwereade wrote:
> How maas-specific is this? I'd really like it if we could put this code
> somewhere generic, but I'll leave it to your judgment; I'm just afraid of us
> ending up with multiple subtly-differing versions of this code as we add
> networks for other providers.

It's specific to MAAS only because we get []NetworkInfo from there (and because
we skip configuring eth0 due to the br0 bridge, but eventually as more providers
support container networking this will be the common case). Theoretically, it's
generic enough to put it in a common place, but make sure it doesn't get called
when it shouldn't. Also, we're going to get rid of this as soon as we have the
networker worker working :)
So think leaving it like that for now is OK.

https://codereview.appspot.com/86600043/diff/1/provider/maas/environ.go#newco...
provider/maas/environ.go:485: 
On 2014/04/11 08:05:58, fwereade wrote:
> d?

I left this to better separate NIC definitions when multiple entries are added.
If you don't mind I prefer to leave it.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b