Merge lp:~thumper/juju-core/no-smash-networking into lp:~go-bot/juju-core/trunk
Status: | Merged |
---|---|
Approved by: | Tim Penhey |
Approved revision: | no longer in the source branch. |
Merged at revision: | 1715 |
Proposed branch: | lp:~thumper/juju-core/no-smash-networking |
Merge into: | lp:~go-bot/juju-core/trunk |
Diff against target: |
37 lines (+8/-5) 1 file modified
provider/maas/environ.go (+8/-5) |
To merge this branch: | bzr merge lp:~thumper/juju-core/no-smash-networking |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+182248@code.launchpad.net |
Commit message
Nicer MAAS network change.
The earlier change to create a network bridge for
eth0 was to replace the entire /etc/network/
file. While this worked, it only worked because MAAS
doesn't yet know much about the network hardware on the
physical machines.
Instead of replacing the entire file, we instead write
out a separate network file and use sed to modify the
existing file to source the new file.
Description of the change
Nicer MAAS network change.
The earlier change to create a network bridge for
eth0 was to replace the entire /etc/network/
file. While this worked, it only worked because MAAS
doesn't yet know much about the network hardware on the
physical machines.
Instead of replacing the entire file, we instead write
out a separate network file and use sed to modify the
existing file to source the new file.
Reviewers: mp+182248_ code.launchpad. net,
Message:
Please take a look.
Description:
Nicer MAAS network change.
The earlier change to create a network bridge for interfaces
eth0 was to replace the entire /etc/network/
file. While this worked, it only worked because MAAS
doesn't yet know much about the network hardware on the
physical machines.
Instead of replacing the entire file, we instead write
out a separate network file and use sed to modify the
existing file to source the new file.
https:/ /code.launchpad .net/~thumper/ juju-core/ no-smash- networking/ +merge/ 182248
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/13259043/
Affected files: maas/environ. go
A [revision details]
M environs/
Index: [revision details] 20130815174953- arsxsn7541v1jxs 5
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: tarmac-
+New revision: <email address hidden>
Index: environs/ maas/environ. go maas/environ. go' maas/environ. go 2013-08-15 14:13:29 +0000 maas/environ. go 2013-08-16 03:41:38 +0000 work() string { interfaces << EOF eth0.config << EOF
=== modified file 'environs/
--- environs/
+++ environs/
@@ -254,11 +254,7 @@
// createBridgeNetwork returns a string representing the upstart command to
// create a bridged eth0.
func createBridgeNet
- return `cat > /etc/network/
-auto lo
-iface lo inet loopback
-
-auto eth0
+ return `cat > /etc/network/
iface eth0 inet manual
auto br0
@@ -268,6 +264,12 @@
`
}
+// linkBridgeInInt erfaces adds the file created by createBridgeNetwork to erfaces( ) string { network\ /eth0.config/ " etc/network/ interfaces` stance allocates and starts a MAAS node. It is used both eNetwork( ), erfaces( ),
the
+// interfaces file.
+func linkBridgeInInt
+ return `sed -i "s/iface eth0 inet dhcp/source
\/etc\/
+}
+
// internalStartIn
// for the implementation of StartInstance, and to initialize the bootstrap
// node.
@@ -314,6 +316,7 @@
machineConfig,
runCmd,
createBridg
+ linkBridgeInInt
"service networking restart",
)
if err != nil {