Merge lp:~axwalk/juju-core/lp1321025-mongod-path-1.18 into lp:juju-core/1.18

Proposed by Andrew Wilkins
Status: Merged
Approved by: Andrew Wilkins
Approved revision: no longer in the source branch.
Merged at revision: 2294
Proposed branch: lp:~axwalk/juju-core/lp1321025-mongod-path-1.18
Merge into: lp:juju-core/1.18
Diff against target: 40 lines (+4/-3)
2 files modified
agent/mongo/mongo.go (+1/-1)
environs/cloudinit/cloudinit_test.go (+3/-2)
To merge this branch: bzr merge lp:~axwalk/juju-core/lp1321025-mongod-path-1.18
Reviewer Review Type Date Requested Status
Juju Engineering Pending
Review via email: mp+220544@code.launchpad.net

Commit message

Use the right mongod binary on utopic

There was some broken code in agent/mongo
for calculating the mongod path. It special
cased trusty in two different ways.

Fixes lp:1321025

https://codereview.appspot.com/99410053/

Description of the change

Use the right mongod binary on utopic

There was some broken code in agent/mongo
for calculating the mongod path. It special
cased trusty in two different ways.

Fixes lp:1321025

https://codereview.appspot.com/99410053/

To post a comment you must log in.
Revision history for this message
Andrew Wilkins (axwalk) wrote :

Reviewers: mp+220544_code.launchpad.net,

Message:
Please take a look.

Description:
Use the right mongod binary on utopic

There was some broken code in agent/mongo
for calculating the mongod path. It special
cased trusty in two different ways.

Fixes lp:1321025

https://code.launchpad.net/~axwalk/juju-core/lp1321025-mongod-path-1.18/+merge/220544

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/99410053/

Affected files (+6, -3 lines):
   A [revision details]
   M agent/mongo/mongo.go
   M environs/cloudinit/cloudinit_test.go

Index: [revision details]
=== 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-20140513040856-lm051mdy3n916km6
+New revision: <email address hidden>

Index: agent/mongo/mongo.go
=== modified file 'agent/mongo/mongo.go'
--- agent/mongo/mongo.go 2014-03-19 04:08:45 +0000
+++ agent/mongo/mongo.go 2014-05-22 01:53:19 +0000
@@ -44,7 +44,7 @@
  // MongodPathForSeries returns the path to the mongod executable for the
  // series of the machine that it is going to be running on.
  func MongodPathForSeries(series string) string {
- if series == "trusty" {
+ if MongoPackageForSeries(series) == "juju-mongodb" {
    return JujuMongodPath
   }
   return MongodbServerPath

Index: environs/cloudinit/cloudinit_test.go
=== modified file 'environs/cloudinit/cloudinit_test.go'
--- environs/cloudinit/cloudinit_test.go 2014-03-24 04:05:24 +0000
+++ environs/cloudinit/cloudinit_test.go 2014-05-22 01:53:19 +0000
@@ -201,13 +201,13 @@
  ln -s 1\.2\.3-raring-amd64 '/var/lib/juju/tools/machine-0'
  `,
   }, {
- // trusty state server - use the new mongo from juju-mongodb
+ // utopic state server - use the new mongo from juju-mongodb
    cfg: cloudinit.MachineConfig{
     MachineId: "0",
     AuthorizedKeys: "sshkey1",
     AgentEnvironment: map[string]string{agent.ProviderType: "dummy"},
     // raring provides mongo in the archive
- Tools: newSimpleTools("1.2.3-trusty-amd64"),
+ Tools: newSimpleTools("1.2.3-utopic-amd64"),
     StateServer: true,
     StateServerCert: serverCert,
     StateServerKey: serverKey,
@@ -457,6 +457,7 @@
    "precise": "mongodb-server",
    "raring": "mongodb-server",
    "trusty": "juju-mongodb",
+ "utopic": "juju-mongodb",
   }

   for i, test := range cloudinitTests {

Revision history for this message
Ian Booth (wallyworld) wrote :
Revision history for this message
John A Meinel (jameinel) wrote :

So really, our logic *should* be to blacklist precise and raring, rather than whitelisting trusty and utopic. (so we should return juju-mongodb unless precise and raring).

That will let us still "just work" once V is out.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'agent/mongo/mongo.go'
2--- agent/mongo/mongo.go 2014-03-19 04:08:45 +0000
3+++ agent/mongo/mongo.go 2014-05-22 02:08:22 +0000
4@@ -44,7 +44,7 @@
5 // MongodPathForSeries returns the path to the mongod executable for the
6 // series of the machine that it is going to be running on.
7 func MongodPathForSeries(series string) string {
8- if series == "trusty" {
9+ if MongoPackageForSeries(series) == "juju-mongodb" {
10 return JujuMongodPath
11 }
12 return MongodbServerPath
13
14=== modified file 'environs/cloudinit/cloudinit_test.go'
15--- environs/cloudinit/cloudinit_test.go 2014-03-24 04:05:24 +0000
16+++ environs/cloudinit/cloudinit_test.go 2014-05-22 02:08:22 +0000
17@@ -201,13 +201,13 @@
18 ln -s 1\.2\.3-raring-amd64 '/var/lib/juju/tools/machine-0'
19 `,
20 }, {
21- // trusty state server - use the new mongo from juju-mongodb
22+ // utopic state server - use the new mongo from juju-mongodb
23 cfg: cloudinit.MachineConfig{
24 MachineId: "0",
25 AuthorizedKeys: "sshkey1",
26 AgentEnvironment: map[string]string{agent.ProviderType: "dummy"},
27 // raring provides mongo in the archive
28- Tools: newSimpleTools("1.2.3-trusty-amd64"),
29+ Tools: newSimpleTools("1.2.3-utopic-amd64"),
30 StateServer: true,
31 StateServerCert: serverCert,
32 StateServerKey: serverKey,
33@@ -457,6 +457,7 @@
34 "precise": "mongodb-server",
35 "raring": "mongodb-server",
36 "trusty": "juju-mongodb",
37+ "utopic": "juju-mongodb",
38 }
39
40 for i, test := range cloudinitTests {

Subscribers

People subscribed via source and target branches

to all changes: