Merge lp:~niemeyer/juju-core/new-state-bootstrap-fixes into lp:~juju/juju-core/trunk
Proposed by
Gustavo Niemeyer
Status: | Merged |
---|---|
Merged at revision: | 567 |
Proposed branch: | lp:~niemeyer/juju-core/new-state-bootstrap-fixes |
Merge into: | lp:~juju/juju-core/trunk |
Diff against target: |
76 lines (+12/-16) 2 files modified
environs/cloudinit/cloudinit.go (+7/-12) state/open.go (+5/-4) |
To merge this branch: | bzr merge lp:~niemeyer/juju-core/new-state-bootstrap-fixes |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
The Go Language Gophers | Pending | ||
Review via email: mp+126101@code.launchpad.net |
Description of the change
state,environs/
With these changes environments correctly bootstrap again.
To post a comment you must log in.
Reviewers: mp+126101_ code.launchpad. net,
Message:
Please take a look.
Description: cloudinit: fix bootstrap
state,environs/
With these changes environments correctly bootstrap again.
https:/ /code.launchpad .net/~niemeyer/ juju-core/ new-state- bootstrap- fixes/+ merge/126101
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/6568043/
Affected files: cloudinit/ cloudinit. go
A [revision details]
M environs/
M state/open.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: <email address hidden>
+New revision: <email address hidden>
Index: state/open.go
=== modified file 'state/open.go'
--- state/open.go 2012-09-20 15:41:42 +0000
+++ state/open.go 2012-09-24 21:12:07 +0000
@@ -4,6 +4,7 @@
"errors"
"fmt"
"strings"
+ "time"
"labix. org/v2/ mgo" org/v2/ mgo/txn" strings. Join(info. Addrs, ",")) eout(strings. Join(info. Addrs, ","), "machineid" }},
"labix.
@@ -35,7 +36,7 @@
return nil, errors.New("no mongo addresses")
}
if !info.UseSSH {
- session, err := mgo.Dial(
+ session, err := mgo.DialWithTim
10*time.Minute)
if err != nil {
return nil, err
}
@@ -92,11 +93,11 @@
{"units", []string{
}
-// The capped collection used for transaction logs defaults to 200MB.
+// The capped collection used for transaction logs defaults to 10MB.
// It's tweaked in export_test.go to 1MB to avoid the overhead of
-// creating and deleting the large file repeatedly.
+// creating and deleting the large file repeatedly in tests.
var (
- logSize = 200000000
+ logSize = 10000000
logSizeTests = 1000000
)
Index: environs/ cloudinit/ cloudinit. go cloudinit/ cloudinit. go' cloudinit/ cloudinit. go 2012-09-21 15:45:22 +0000 cloudinit/ cloudinit. go 2012-09-24 21:10:48 +0000 Sprintf( "wget -O - %s | tar xz -C /opt", shquote(url)), )+"/jujud bootstrap-state"+ dAccessor+ base64yaml( cfg.Config) )+ +mgoPortSuffix+ )+"/jujud bootstrap-state"+ dAccessor+ base64yaml( cfg.Config) )+ +mgoPortSuffix+ )+"/jujud bootstrap-state"+ dAccessor+ base64yaml( cfg.Config) )+ +mgoPortSuffix+
=== modified file 'environs/
--- environs/
+++ environs/
@@ -121,22 +121,17 @@
addScripts(c,
"mkdir -p /opt",
fmt.
- cfg.jujuTools(
- " --instance-id "+cfg.InstanceI
- " --env-config "+shquote(
- " --state-servers localhost"
- debugFlag,
)
if err := addMongoToBoot(c); err != nil {
return nil, err
}
- addScripts(c,
- cfg.jujuTools(
- " --instance-id "+cfg.InstanceI
- " --env-config "+shquote(
- " --state-servers localhost"
- debugFlag,
+ addScripts(c, cfg.jujuTools(
+ " --instance-id "+cfg.InstanceI
+ " --env-config "+shquote(
+ " --state-servers localhost"
+ debugFlag,
)
+
}
if err := addAgentToBoot(c, cfg, "machine", "--machine- id %d "+debugFlag, cfg.MachineId)); err != nil { bin/mongod --port 37017 --bind_ip 0.0....
fmt.Sprintf(
@@ -194,7 +189,7 @@
conf := &upstart.Conf{
Service: *svc,
Desc: "juju state database",
- Cmd: "/opt/mongo/