Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1965)

Delta Between Two Patch Sets: environs/cloudinit/cloudinit.go

Issue 6566058: environs/jujutest: fix live tests.
Left Patch Set: Created 11 years, 6 months ago
Right Patch Set: environs/jujutest: fix live tests. Created 11 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « [revision details] ('k') | environs/jujutest/livetests.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 package cloudinit 1 package cloudinit
2 2
3 import ( 3 import (
4 "encoding/base64" 4 "encoding/base64"
5 "fmt" 5 "fmt"
6 "launchpad.net/goyaml" 6 "launchpad.net/goyaml"
7 "launchpad.net/juju-core/cloudinit" 7 "launchpad.net/juju-core/cloudinit"
8 "launchpad.net/juju-core/environs" 8 "launchpad.net/juju-core/environs"
9 "launchpad.net/juju-core/environs/config" 9 "launchpad.net/juju-core/environs/config"
10 "launchpad.net/juju-core/log" 10 "launchpad.net/juju-core/log"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 } 177 }
178 cmds, err := conf.InstallCommands() 178 cmds, err := conf.InstallCommands()
179 if err != nil { 179 if err != nil {
180 return fmt.Errorf("cannot make cloud-init upstart script for the %s agent: %v", name, err) 180 return fmt.Errorf("cannot make cloud-init upstart script for the %s agent: %v", name, err)
181 } 181 }
182 addScripts(c, cmds...) 182 addScripts(c, cmds...)
183 return nil 183 return nil
184 } 184 }
185 185
186 func addMongoToBoot(c *cloudinit.Config) error { 186 func addMongoToBoot(c *cloudinit.Config) error {
187 » addScripts(c, fmt.Sprintf("mkdir -p /var/lib/juju/db")) 187 » addScripts(c,
188 » » "mkdir -p /var/lib/juju/db/journal",
189 » » // Otherwise we get three files with 100M+ each, which takes tim e.
190 » » "dd bs=1M count=1 if=/dev/zero of=/var/lib/juju/db/journal/preal loc.0",
191 » » "dd bs=1M count=1 if=/dev/zero of=/var/lib/juju/db/journal/preal loc.1",
192 » » "dd bs=1M count=1 if=/dev/zero of=/var/lib/juju/db/journal/preal loc.2",
193 » )
188 svc := upstart.NewService("juju-db") 194 svc := upstart.NewService("juju-db")
189 conf := &upstart.Conf{ 195 conf := &upstart.Conf{
190 Service: *svc, 196 Service: *svc,
191 Desc: "juju state database", 197 Desc: "juju state database",
192 Cmd: fmt.Sprintf( 198 Cmd: fmt.Sprintf(
193 "/opt/mongo/bin/mongod --port %d --bind_ip 0.0.0.0 --dbp ath=/var/lib/juju/db --smallfiles --noprealloc", 199 "/opt/mongo/bin/mongod --port %d --bind_ip 0.0.0.0 --dbp ath=/var/lib/juju/db --smallfiles --noprealloc",
194 mgoPort), 200 mgoPort),
195 } 201 }
196 cmds, err := conf.InstallCommands() 202 cmds, err := conf.InstallCommands()
197 if err != nil { 203 if err != nil {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 if cfg.Config == nil { 261 if cfg.Config == nil {
256 return requiresError("environment configuration") 262 return requiresError("environment configuration")
257 } 263 }
258 } else { 264 } else {
259 if cfg.StateInfo == nil || len(cfg.StateInfo.Addrs) == 0 { 265 if cfg.StateInfo == nil || len(cfg.StateInfo.Addrs) == 0 {
260 return requiresError("zookeeper hosts") 266 return requiresError("zookeeper hosts")
261 } 267 }
262 } 268 }
263 return nil 269 return nil
264 } 270 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b