Merge lp:~axwalk/juju-core/lp1271144-maas-bridge-utils into lp:~go-bot/juju-core/trunk
Proposed by
Andrew Wilkins
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Approved by: | Andrew Wilkins | ||||||||
Approved revision: | no longer in the source branch. | ||||||||
Merged at revision: | 2457 | ||||||||
Proposed branch: | lp:~axwalk/juju-core/lp1271144-maas-bridge-utils | ||||||||
Merge into: | lp:~go-bot/juju-core/trunk | ||||||||
Diff against target: |
142 lines (+65/-12) 5 files modified
provider/maas/environ.go (+21/-10) provider/maas/environ_test.go (+15/-0) provider/maas/export_test.go (+3/-2) utils/apt.go (+10/-0) utils/apt_test.go (+16/-0) |
||||||||
To merge this branch: | bzr merge lp:~axwalk/juju-core/lp1271144-maas-bridge-utils | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+211886@code.launchpad.net |
Commit message
Fix maas bridge-utils installation
Need to do an apt-get update first. I've updated
the code to use the appropriate options to disable
all interactivity.
Also, changed the code to the ifdown/ifup correctly.
Live tested with "juju deploy ubuntu --to lxc:0"
Fixes lp:1271144
Fixes lp:1248283
Description of the change
Fix maas bridge-utils installation
Need to do an apt-get update first. I've updated
the code to use the appropriate options to disable
all interactivity.
Also, changed the code to the ifdown/ifup correctly.
Live tested with "juju deploy ubuntu --to lxc:0"
Fixes lp:1271144
Fixes lp:1248283
To post a comment you must log in.
Reviewers: mp+211886_ code.launchpad. net,
Message:
Please take a look.
Description:
Fix maas bridge-utils installation
Need to do an apt-get update first. I've updated
the code to use the appropriate options to disable
all interactivity.
Also, changed the code to the ifdown/ifup correctly.
Live tested with "juju deploy ubuntu --to lxc:0"
Fixes lp:1271144
Fixes lp:1248283
https:/ /code.launchpad .net/~axwalk/ juju-core/ lp1271144- maas-bridge- utils/+ merge/211886
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/77890045/
Affected files (+67, -12 lines): maas/environ. go maas/environ_ test.go maas/export_ test.go
A [revision details]
M provider/
M provider/
M provider/
M utils/apt.go
M utils/apt_test.go
Index: [revision details] 20140320055725- noj3sbg573beucb k
=== 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: utils/apt.go
=== modified file 'utils/apt.go'
--- utils/apt.go 2014-03-13 20:51:48 +0000
+++ utils/apt.go 2014-03-20 09:08:27 +0000
@@ -81,6 +81,16 @@
}
}
+// AptGetCommand returns a command to execute apt-get []string{ "env"}, aptGetEnvOption s...) ckages returns a slice of installCommands. Each item
+// with the specified arguments, and the appropriate
+// environment variables and options for a non-interactive
+// session.
+func AptGetCommand(args ...string) []string {
+ cmd := append(
+ cmd = append(cmd, aptGetCommand...)
+ return append(cmd, args...)
+}
+
// AptGetPreparePa
// in the slice is suitable for passing directly to AptGetInstall.
//
Index: utils/apt_test.go packagesList[ 1], gc.DeepEquals, []string{ "bridge- utils", "git"})
=== modified file 'utils/apt_test.go'
--- utils/apt_test.go 2014-03-13 20:52:41 +0000
+++ utils/apt_test.go 2014-03-20 09:08:27 +0000
@@ -39,6 +39,22 @@
c.Assert(
}
+func (s *AptSuite) TestAptGetCommand(c *gc.C) { mand(c) mand(c, "install", "foo") FRONTEND= noninteractive" , Dpkg::Options: :=--force- confold" , Dpkg::options: :=--force- unsafe- io", "--assume-yes", "--quiet", mand(args. ..)
+ s.testAptGetCom
+ s.testAptGetCom
+}
+
+func (s *AptSuite) testAptGetCommand(c *gc.C, args ...string) {
+ commonArgs := []string{
+ "env", "DEBIAN_
+ "apt-get", "--option=
+ "--option=
+ }
+ expected := append(commonArgs, args...)
+ cmd := utils.AptGetCom
+ c.Assert(cmd, gc.DeepEquals, expected)
+}
+
func (s *AptSuite) TestAptGetError(c *gc.C) {
const expected = `E: frobnicator failure detected`
cmdError := fmt.Errorf("error")
Index: provider/ maas/environ. go maas/environ. go' maas/environ. go 2014-03-19 19:35:33 +0000 maas/environ. go 2014-03-20 09:08:27 +0000 hostname} unCmd() ts(hostname)
=== modified file 'provider/
--- provider/
+++ provider/
@@ -276,8 +276,7 @@
if err != nil {
return nil, nil, err
}
- info := machineInfo{
- runCmd, err := info.cloudinitR
+ additionalScripts, err := additionalScrip
if err != nil {
return nil, nil, err
}
@@ -288,14 +287,7 @@
// The machine envronment config values are being moved to the...