Merge lp:~waigani/juju-core/1301353-mongodb-dep into lp:~go-bot/juju-core/trunk
- 1301353-mongodb-dep
- Merge into trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Jesse Meek | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 2599 | ||||
Proposed branch: | lp:~waigani/juju-core/1301353-mongodb-dep | ||||
Merge into: | lp:~go-bot/juju-core/trunk | ||||
Diff against target: |
337 lines (+14/-200) 3 files modified
Makefile (+1/-1) provider/local/prereqs.go (+10/-104) provider/local/prereqs_test.go (+3/-95) |
||||
To merge this branch: | bzr merge lp:~waigani/juju-core/1301353-mongodb-dep | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+214156@code.launchpad.net |
Commit message
local provider: check for juju-local
Check only for juju-local in the local
provider as mongodb-server, cpu-checker
and rsyslog-gnutls are all dependencies
of juju-local.
Description of the change
local provider: check for juju-local
Check only for juju-local in the local
provider as mongodb-server, cpu-checker
and rsyslog-gnutls are all dependencies
of juju-local.
Tim Penhey (thumper) wrote : | # |
Jesse Meek (waigani) wrote : | # |
Reviewers: mp+214156_
Message:
Running "go test -gocheck.f TestOpenFailsWi
provider/local raises the original make dir test fail: Juju should not
be able to create the dirs but can. My permissions are as follows:
ls -la /usr/lib | grep "juju"
drwxr-xr-x 5 root root 4096 Apr 4 17:00 juju
drwxr-xr-x 4 root root 4096 Apr 1 15:33 juju-1.17.7
If the fail is due to my perms, wouldn't this be a test isolation issue?
https:/
File cmd/jujud/
https:/
cmd/jujud/
On 2014/04/07 03:06:40, thumper wrote:
> This is not the right place to change this one.
> This test is explicitly checking that rsyslog-gnutls has been
installed due to
> changes in logging requirements.
Done.
https:/
File container/
https:/
container/
is not installed. Please install the juju-local package.
On 2014/04/07 03:06:40, thumper wrote:
> Again, wrong place. kvm-ok is in the cpu-checker package.
Done.
https:/
File environs/
https:/
environs/
On 2014/04/07 03:06:40, thumper wrote:
> This is definitely wrong. Cloud-init is what we install on all the
cloud
> images.
Note to self: I should really take a moment to discuss and understand
what I'm doing before I go and do it.
https:/
File provider/
https:/
provider/
On 2014/04/07 03:06:40, thumper wrote:
> We don't need this any more
Done.
https:/
provider/
On 2014/04/07 03:06:40, thumper wrote:
> I'm pretty happy to just have this error returned in all cases.
> We can deal with the local provider in other platforms when it
happens.
Done.
Description:
Check only for juju-local package
Am I'm on the right track? mongodb-server, cpu-checker and
rsyslog-gnutls
are no longer checked for. Only juju-local is checked.
Branch currently fails with the following: On my local machine I get:
FAIL: environ_test.go:54:
environSuite.
[LOG] 36.85478 INFO juju.provider.local opening environment "test"
[LOG] 36.85478 TRACE juju.provider.local creating directory
/usr/lib/
[LOG] 36.85478 TRACE juju.provider.local creating directory
/usr/lib/juju/db
[LOG] 36....
Jesse Meek (waigani) wrote : | # |
On 2014/04/07 04:43:27, waigani wrote:
> Running "go test -gocheck.f TestOpenFailsWi
> provider/local raises the original make dir test fail: Juju should not
be able
> to create the dirs but can. My permissions are as follows:
> ls -la /usr/lib | grep "juju"
> drwxr-xr-x 5 root root 4096 Apr 4 17:00 juju
> drwxr-xr-x 4 root root 4096 Apr 1 15:33 juju-1.17.7
> If the fail is due to my perms, wouldn't this be a test isolation
issue?
https:/
> File cmd/jujud/
https:/
> cmd/jujud/
installed.
> On 2014/04/07 03:06:40, thumper wrote:
> > This is not the right place to change this one.
> >
> > This test is explicitly checking that rsyslog-gnutls has been
installed due to
> > changes in logging requirements.
> Done.
https:/
> File container/
https:/
> container/
is not
> installed. Please install the juju-local package.
> On 2014/04/07 03:06:40, thumper wrote:
> > Again, wrong place. kvm-ok is in the cpu-checker package.
> Done.
https:/
> File environs/
https:/
> environs/
> On 2014/04/07 03:06:40, thumper wrote:
> > This is definitely wrong. Cloud-init is what we install on all the
cloud
> > images.
> Note to self: I should really take a moment to discuss and understand
what I'm
> doing before I go and do it.
https:/
> File provider/
https:/
> provider/
> On 2014/04/07 03:06:40, thumper wrote:
> > We don't need this any more
> Done.
https:/
> provider/
errors.
> On 2014/04/07 03:06:40, thumper wrote:
> > I'm pretty happy to just have this error returned in all cases.
> >
> > We can deal with the local provider in other platforms when it
happens.
> Done.
"go test -gocheck.f TestOpenFailsWi
trunk for me. My guess is that it is my perms. Can you confirm what my
perms should be and is this an isolation issue that should be fixed in
test setup?
Jesse Meek (waigani) wrote : | # |
Please take a look.
Jesse Meek (waigani) wrote : | # |
Please take a look.
Tim Penhey (thumper) wrote : | # |
LGTM with the spelling fixed.
https:/
File container/
https:/
container/
You have mis-spelled checker
Go Bot (go-bot) wrote : | # |
The attempt to merge lp:~waigani/juju-core/1301353-mongodb-dep into lp:juju-core failed. Below is the output from the failed tests.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
? launchpad.
? launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
? launchpad.
? launchpad.
ok launchpad.
ok launchpad.
-------
PANIC: agent.go:0: MachineSuite.
[LOG] 75.81627 DEBUG juju.environs.
[LOG] 75.88249 INFO juju environs/testing: uploading FAKE tools 1.19.0-
[LOG] 75.88308 INFO juju environs/testing: uploading FAKE tools 1.19.0-
[LOG] 75.89138 INFO juju environs/testing: uploading FAKE tools 1.19.0-
[LOG] 75.89183 DEBUG juju.environs.tools no architecture specified when finding tools, looking for any
[LOG] 75.89184 DEBUG juju.environs.tools no series specified when finding tools, looking for any
[LOG] 75.89187 DEBUG juju.environs.
[LOG] 75.89189 DEBUG juju.environs.
[LOG] 75.89191 DEBUG juju.environs.
[LOG] 75.89193 DEBUG juju.environs.
[LOG] 75.89213 INFO juju.environs.tools Writing tools/streams/
[LOG] 75.89215 INFO juju.environs.tools Writing tools/streams/
[LOG] 75.89219 DEBUG juju.environs.
[LOG] 75.89219 INFO juju.environs.
[LOG] 75.89222 DEBUG juju.environs.
[LOG] 75.89223 INFO juju.environs.tools reading tools with major.minor version 1.19
[LOG] 75.89224 INFO juju.environs.tools filtering tools by version: 1.19.0
[LOG] 75.89224 INFO juju.environs.tools filtering tools by series: precise
[LOG] 75.89225 DEBUG juju.environs.tools no architecture specified when finding tools, looking for any
[LOG] 75.89228 DEBUG juju.environs.
Go Bot (go-bot) wrote : | # |
The attempt to merge lp:~waigani/juju-core/1301353-mongodb-dep into lp:juju-core failed. Below is the output from the failed tests.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
? launchpad.
? launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
ok launchpad.
? launchpad.
? launchpad.
ok launchpad.
ok launchpad.
panic: Session already closed
goroutine 1785 [running]:
labix.org/
/home/
labix.org/
/home/
labix.org/
/home/
launchpad.
/home/
launchpad.
/home/
launchpad.
/home/
created by launchpad.
/home/
goroutine 1 [chan receive]:
testing.
/usr/lib/
testing.
/usr/lib/
main.main()
launchpad.
goroutine 2 [syscall]:
goroutine 4 [syscall]:
os/signal.loop()
/usr/lib/
created by os/signal.initĀ·1
/usr/lib/
goroutine 6 [chan receive]:
launchpad.
/home/
created by launchpad.
/home/
goroutine 9 [chan receive]:
launchpad.
/home/
launchpad.
/home/
launchpad.
Dave Cheney (dave-cheney) wrote : | # |
This failure has affected many recent attempts to land branches? Is
the bot/canonistack ill ?
On Thu, Apr 10, 2014 at 7:32 AM, Go Bot <email address hidden> wrote:
> The proposal to merge lp:~waigani/juju-core/1301353-mongodb-dep into lp:juju-core has been updated.
>
> Status: Approved => Needs review
>
> For more details, see:
> https:/
> --
> https:/
> You are subscribed to branch lp:juju-core.
Preview Diff
1 | === modified file 'Makefile' |
2 | --- Makefile 2014-03-18 01:37:21 +0000 |
3 | +++ Makefile 2014-04-09 08:25:59 +0000 |
4 | @@ -23,7 +23,7 @@ |
5 | distro-info-data |
6 | git-core |
7 | mercurial |
8 | - rsyslog-gnutls |
9 | + juju-local |
10 | zip |
11 | $(GO_C) |
12 | endef |
13 | |
14 | === modified file 'provider/local/prereqs.go' |
15 | --- provider/local/prereqs.go 2014-03-17 22:07:47 +0000 |
16 | +++ provider/local/prereqs.go 2014-04-09 08:25:59 +0000 |
17 | @@ -6,33 +6,19 @@ |
18 | import ( |
19 | "errors" |
20 | "fmt" |
21 | - "os" |
22 | "os/exec" |
23 | - "regexp" |
24 | "runtime" |
25 | |
26 | - "launchpad.net/juju-core/agent/mongo" |
27 | "launchpad.net/juju-core/container/kvm" |
28 | "launchpad.net/juju-core/instance" |
29 | "launchpad.net/juju-core/utils" |
30 | - "launchpad.net/juju-core/version" |
31 | ) |
32 | |
33 | var notLinuxError = errors.New("The local provider is currently only available for Linux") |
34 | |
35 | -const installMongodUbuntu = "MongoDB server must be installed to enable the local provider:" |
36 | const aptAddRepositoryJujuStable = ` |
37 | sudo apt-add-repository ppa:juju/stable # required for MongoDB SSL support |
38 | sudo apt-get update` |
39 | -const aptGetInstallMongodbServer = ` |
40 | - sudo apt-get install mongodb-server` |
41 | - |
42 | -const installMongodGeneric = ` |
43 | -MongoDB server must be installed to enable the local provider. |
44 | -Please consult your operating system distribution's documentation |
45 | -for instructions on installing the MongoDB server. Juju requires |
46 | -a MongoDB server built with SSL support. |
47 | -` |
48 | |
49 | const installLxcUbuntu = ` |
50 | Linux Containers (LXC) userspace tools must be |
51 | @@ -40,15 +26,10 @@ |
52 | |
53 | sudo apt-get install lxc` |
54 | |
55 | -const installRsyslogGnutlsUbuntu = ` |
56 | -rsyslog-gnutls must be installed to enable the local provider: |
57 | - |
58 | - sudo apt-get install rsyslog-gnutls` |
59 | - |
60 | -const installRsyslogGnutlsGeneric = ` |
61 | -rsyslog-gnutls must be installed to enable the local provider. |
62 | -Please consult your operating system distribution's documentation |
63 | -for instructions on installing this package.` |
64 | +const installJujuLocalUbuntu = ` |
65 | +juju-local must be installed to enable the local provider: |
66 | + |
67 | + sudo apt-get install juju-local` |
68 | |
69 | const installLxcGeneric = ` |
70 | Linux Containers (LXC) userspace tools must be installed to enable the |
71 | @@ -58,9 +39,6 @@ |
72 | const errUnsupportedOS = `Unsupported operating system: %s |
73 | The local provider is currently only available for Linux` |
74 | |
75 | -// lowestMongoVersion is the lowest version of mongo that juju supports. |
76 | -var lowestMongoVersion = version.Number{Major: 2, Minor: 2, Patch: 4} |
77 | - |
78 | // lxclsPath is the path to "lxc-ls", an LXC userspace tool |
79 | // we check the presence of to determine whether the |
80 | // tools are installed. This is a variable only to support |
81 | @@ -70,18 +48,10 @@ |
82 | // isPackageInstalled is a variable to support testing. |
83 | var isPackageInstalled = utils.IsPackageInstalled |
84 | |
85 | -// defaultRsyslogGnutlsPath is the default path to the |
86 | -// rsyslog GnuTLS module. This is a variable only to |
87 | -// support unit testing. |
88 | -var defaultRsyslogGnutlsPath = "/usr/lib/rsyslog/lmnsd_gtls.so" |
89 | - |
90 | // The operating system the process is running in. |
91 | // This is a variable only to support unit testing. |
92 | var goos = runtime.GOOS |
93 | |
94 | -// This is the regex for processing the results of mongod --verison |
95 | -var mongoVerRegex = regexp.MustCompile(`db version v(\d+\.\d+\.\d+)`) |
96 | - |
97 | // VerifyPrerequisites verifies the prerequisites of |
98 | // the local machine (machine 0) for running the local |
99 | // provider. |
100 | @@ -89,10 +59,7 @@ |
101 | if goos != "linux" { |
102 | return fmt.Errorf(errUnsupportedOS, goos) |
103 | } |
104 | - if err := verifyMongod(); err != nil { |
105 | - return err |
106 | - } |
107 | - if err := verifyRsyslogGnutls(); err != nil { |
108 | + if err := verifyJujuLocal(); err != nil { |
109 | return err |
110 | } |
111 | switch containerType { |
112 | @@ -104,42 +71,6 @@ |
113 | return fmt.Errorf("Unknown container type specified in the config.") |
114 | } |
115 | |
116 | -func verifyMongod() error { |
117 | - path, err := mongo.MongodPath() |
118 | - if err != nil { |
119 | - return wrapMongodNotExist(err) |
120 | - } |
121 | - |
122 | - ver, err := mongodVersion(path) |
123 | - if err != nil { |
124 | - return err |
125 | - } |
126 | - if ver.Compare(lowestMongoVersion) < 0 { |
127 | - return fmt.Errorf("installed version of mongod (%v) is not supported by Juju. "+ |
128 | - "Juju requires version %v or greater.", |
129 | - ver, |
130 | - lowestMongoVersion) |
131 | - } |
132 | - return nil |
133 | -} |
134 | - |
135 | -func mongodVersion(path string) (version.Number, error) { |
136 | - data, err := utils.RunCommand(path, "--version") |
137 | - if err != nil { |
138 | - return version.Zero, wrapMongodNotExist(err) |
139 | - } |
140 | - |
141 | - return parseVersion(data) |
142 | -} |
143 | - |
144 | -func parseVersion(data string) (version.Number, error) { |
145 | - matches := mongoVerRegex.FindStringSubmatch(data) |
146 | - if len(matches) < 2 { |
147 | - return version.Zero, errors.New("could not parse mongod version") |
148 | - } |
149 | - return version.Parse(matches[1]) |
150 | -} |
151 | - |
152 | func verifyLxc() error { |
153 | _, err := exec.LookPath(lxclsPath) |
154 | if err != nil { |
155 | @@ -148,36 +79,11 @@ |
156 | return nil |
157 | } |
158 | |
159 | -func verifyRsyslogGnutls() error { |
160 | - if isPackageInstalled("rsyslog-gnutls") { |
161 | - return nil |
162 | - } |
163 | - if utils.IsUbuntu() { |
164 | - return errors.New(installRsyslogGnutlsUbuntu) |
165 | - } |
166 | - // Not all Linuxes will distribute the module |
167 | - // in the same way. Check if it's in the default |
168 | - // location too. |
169 | - _, err := os.Stat(defaultRsyslogGnutlsPath) |
170 | - if err == nil { |
171 | - return nil |
172 | - } |
173 | - return fmt.Errorf("%v\n%s", err, installRsyslogGnutlsGeneric) |
174 | -} |
175 | - |
176 | -func wrapMongodNotExist(err error) error { |
177 | - if utils.IsUbuntu() { |
178 | - series := version.Current.Series |
179 | - args := []interface{}{err, installMongodUbuntu} |
180 | - format := "%v\n%s\n%s" |
181 | - if series == "precise" || series == "quantal" { |
182 | - format += "%s" |
183 | - args = append(args, aptAddRepositoryJujuStable) |
184 | - } |
185 | - args = append(args, aptGetInstallMongodbServer) |
186 | - return fmt.Errorf(format, args...) |
187 | - } |
188 | - return fmt.Errorf("%v\n%s", err, installMongodGeneric) |
189 | +func verifyJujuLocal() error { |
190 | + if isPackageInstalled("juju-local") { |
191 | + return nil |
192 | + } |
193 | + return errors.New(installJujuLocalUbuntu) |
194 | } |
195 | |
196 | func wrapLxcNotFound(err error) error { |
197 | |
198 | === modified file 'provider/local/prereqs_test.go' |
199 | --- provider/local/prereqs_test.go 2014-03-06 20:35:21 +0000 |
200 | +++ provider/local/prereqs_test.go 2014-04-09 08:25:59 +0000 |
201 | @@ -4,7 +4,6 @@ |
202 | package local |
203 | |
204 | import ( |
205 | - "fmt" |
206 | "io/ioutil" |
207 | "os" |
208 | "path/filepath" |
209 | @@ -15,7 +14,6 @@ |
210 | "launchpad.net/juju-core/instance" |
211 | "launchpad.net/juju-core/testing/testbase" |
212 | "launchpad.net/juju-core/utils" |
213 | - "launchpad.net/juju-core/version" |
214 | ) |
215 | |
216 | type prereqsSuite struct { |
217 | @@ -53,8 +51,6 @@ |
218 | |
219 | s.PatchValue(&mongo.JujuMongodPath, "/somewhere/that/wont/exist") |
220 | |
221 | - s.setMongoVersion(c, lowestMongoVersion.Major, lowestMongoVersion.Minor, lowestMongoVersion.Patch) |
222 | - |
223 | os.Setenv("JUJUTEST_LSB_RELEASE_ID", "Ubuntu") |
224 | err := ioutil.WriteFile(filepath.Join(s.tmpdir, "lsb_release"), []byte(lsbrelease), 0777) |
225 | c.Assert(err, gc.IsNil) |
226 | @@ -80,83 +76,6 @@ |
227 | echo Thu Feb 13 15:53:58.210 git version: b9925db5eac369d77a3a5f5d98a145eaaacd9673 |
228 | ` |
229 | |
230 | -func (s *prereqsSuite) setMongoVersion(c *gc.C, major, minor, patch int) { |
231 | - script := fmt.Sprintf(fakeMongoFmt, major, minor, patch) |
232 | - err := ioutil.WriteFile(s.testMongodPath, []byte(script), 0777) |
233 | - c.Assert(err, gc.IsNil) |
234 | -} |
235 | - |
236 | -func (s *prereqsSuite) TestParseMongoVersion(c *gc.C) { |
237 | - s.setMongoVersion(c, 2, 2, 2) |
238 | - |
239 | - ver, err := mongodVersion(s.testMongodPath) |
240 | - c.Assert(err, gc.IsNil) |
241 | - c.Assert(ver, gc.Equals, version.Number{2, 2, 2, 0}) |
242 | -} |
243 | - |
244 | -func (s *prereqsSuite) TestVerifyMongod(c *gc.C) { |
245 | - lowver := version.Number{2, 2, 2, 0} |
246 | - s.PatchValue(&lowestMongoVersion, lowver) |
247 | - |
248 | - s.setMongoVersion(c, 3, 0, 0) |
249 | - c.Assert(verifyMongod(), gc.IsNil) |
250 | - |
251 | - s.setMongoVersion(c, 2, 3, 0) |
252 | - c.Assert(verifyMongod(), gc.IsNil) |
253 | - |
254 | - s.setMongoVersion(c, 2, 2, 3) |
255 | - c.Assert(verifyMongod(), gc.IsNil) |
256 | - |
257 | - s.setMongoVersion(c, 2, 2, 2) |
258 | - c.Assert(verifyMongod(), gc.IsNil) |
259 | - |
260 | - expected := fmt.Sprintf("installed version of mongod .* is not supported by Juju. "+ |
261 | - "Juju requires version %v or greater.", lowver) |
262 | - |
263 | - s.setMongoVersion(c, 2, 2, 1) |
264 | - c.Assert(verifyMongod(), gc.ErrorMatches, expected) |
265 | - |
266 | - s.setMongoVersion(c, 2, 1, 3) |
267 | - c.Assert(verifyMongod(), gc.ErrorMatches, expected) |
268 | - |
269 | - s.setMongoVersion(c, 1, 3, 3) |
270 | - c.Assert(verifyMongod(), gc.ErrorMatches, expected) |
271 | -} |
272 | - |
273 | -func (s *prereqsSuite) TestParseVersion(c *gc.C) { |
274 | - data := ` |
275 | -db version v3.2.1 |
276 | -Thu Feb 13 15:53:58.210 git version: b9925db5eac369d77a3a5f5d98a145eaaacd9673 |
277 | -`[1:] |
278 | - v, err := parseVersion(data) |
279 | - c.Assert(err, gc.IsNil) |
280 | - c.Assert(v, gc.Equals, version.Number{3, 2, 1, 0}) |
281 | - |
282 | - data = "this is total garbage" |
283 | - v, err = parseVersion(data) |
284 | - c.Assert(err, gc.ErrorMatches, "could not parse mongod version") |
285 | - c.Assert(v, gc.Equals, version.Zero) |
286 | -} |
287 | - |
288 | -func (s *prereqsSuite) TestMongoPrereq(c *gc.C) { |
289 | - err := os.Remove(s.testMongodPath) |
290 | - c.Assert(err, gc.IsNil) |
291 | - |
292 | - err = VerifyPrerequisites(instance.LXC) |
293 | - c.Assert(err, gc.ErrorMatches, "(.|\n)*MongoDB server must be installed(.|\n)*") |
294 | - c.Assert(err, gc.ErrorMatches, "(.|\n)*apt-get install mongodb-server(.|\n)*") |
295 | - |
296 | - os.Setenv("JUJUTEST_LSB_RELEASE_ID", "NotUbuntu") |
297 | - err = VerifyPrerequisites(instance.LXC) |
298 | - c.Assert(err, gc.ErrorMatches, "(.|\n)*MongoDB server must be installed(.|\n)*") |
299 | - c.Assert(err, gc.Not(gc.ErrorMatches), "(.|\n)*apt-get install(.|\n)*") |
300 | - |
301 | - s.PatchValue(&lowestMongoVersion, version.Number{2, 2, 2, 0}) |
302 | - s.setMongoVersion(c, 3, 0, 0) |
303 | - err = VerifyPrerequisites(instance.LXC) |
304 | - c.Assert(err, gc.IsNil) |
305 | -} |
306 | - |
307 | func (s *prereqsSuite) TestLxcPrereq(c *gc.C) { |
308 | s.PatchValue(&lxclsPath, filepath.Join(s.tmpdir, "non-existent")) |
309 | |
310 | @@ -175,24 +94,13 @@ |
311 | c.Assert(err, gc.IsNil) |
312 | } |
313 | |
314 | -func (s *prereqsSuite) TestRsyslogGnutlsPrereq(c *gc.C) { |
315 | +func (s *prereqsSuite) TestJujuLocalPrereq(c *gc.C) { |
316 | err := os.Remove(filepath.Join(s.tmpdir, "dpkg-query")) |
317 | c.Assert(err, gc.IsNil) |
318 | err = os.Symlink("/bin/false", filepath.Join(s.tmpdir, "dpkg-query")) |
319 | c.Assert(err, gc.IsNil) |
320 | |
321 | err = VerifyPrerequisites(instance.LXC) |
322 | - c.Assert(err, gc.ErrorMatches, "(.|\n)*rsyslog-gnutls must be installed to enable the local provider(.|\n)*") |
323 | - c.Assert(err, gc.ErrorMatches, "(.|\n)*apt-get install rsyslog-gnutls(.|\n)*") |
324 | - |
325 | - s.PatchValue(&defaultRsyslogGnutlsPath, filepath.Join(s.tmpdir, "non-existent")) |
326 | - os.Setenv("JUJUTEST_LSB_RELEASE_ID", "NotUbuntu") |
327 | - err = VerifyPrerequisites(instance.LXC) |
328 | - c.Assert(err, gc.ErrorMatches, "(.|\n)*non-existent: no such file or directory(.|\n)*") |
329 | - c.Assert(err, gc.Not(gc.ErrorMatches), "(.|\n)*apt-get install rsyslog-gnutls(.|\n)*") |
330 | - |
331 | - err = ioutil.WriteFile(defaultRsyslogGnutlsPath, nil, 0644) |
332 | - c.Assert(err, gc.IsNil) |
333 | - err = VerifyPrerequisites(instance.LXC) |
334 | - c.Assert(err, gc.IsNil) |
335 | + c.Assert(err, gc.ErrorMatches, "(.|\n)*juju-local must be installed to enable the local provider(.|\n)*") |
336 | + c.Assert(err, gc.ErrorMatches, "(.|\n)*apt-get install juju-local(.|\n)*") |
337 | } |
You have gone a bit too far with some of the checks.
We only need to touch the local provider prereqs.
https:/ /codereview. appspot. com/84360043/ diff/1/ cmd/jujud/ upgrade_ test.go upgrade_ test.go (right):
File cmd/jujud/
https:/ /codereview. appspot. com/84360043/ diff/1/ cmd/jujud/ upgrade_ test.go# newcode101 upgrade_ test.go: 101: // juju-local should have been installed.
cmd/jujud/
This is not the right place to change this one.
This test is explicitly checking that rsyslog-gnutls has been installed
due to changes in logging requirements.
https:/ /codereview. appspot. com/84360043/ diff/1/ container/ kvm/initialisat ion.go kvm/initialisat ion.go (right):
File container/
https:/ /codereview. appspot. com/84360043/ diff/1/ container/ kvm/initialisat ion.go# newcode47 kvm/initialisat ion.go: 47: const neetToInstallKVMOk = `kvm-ok
container/
is not installed. Please install the juju-local package.
Again, wrong place. kvm-ok is in the cpu-checker package.
https:/ /codereview. appspot. com/84360043/ diff/1/ environs/ cloudinit/ cloudinit. go cloudinit/ cloudinit. go (right):
File environs/
https:/ /codereview. appspot. com/84360043/ diff/1/ environs/ cloudinit/ cloudinit. go#newcode223 cloudinit/ cloudinit. go:223: c.AddPackage( "juju-local" )
environs/
This is definitely wrong. Cloud-init is what we install on all the
cloud images.
https:/ /codereview. appspot. com/84360043/ diff/1/ provider/ local/prereqs. go local/prereqs. go (right):
File provider/
https:/ /codereview. appspot. com/84360043/ diff/1/ provider/ local/prereqs. go#newcode60 local/prereqs. go:60: // I'm not sure what the path should be?
provider/
We don't need this any more
https:/ /codereview. appspot. com/84360043/ diff/1/ provider/ local/prereqs. go#newcode99 local/prereqs. go:99: return errors. New(installJuju LocalUbuntu)
provider/
I'm pretty happy to just have this error returned in all cases.
We can deal with the local provider in other platforms when it happens.
https:/ /codereview. appspot. com/84360043/