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

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

Issue 6501106: environs: remove VarDir global
Left Patch Set: environs: remove VarDir global Created 11 years, 6 months ago
Right Patch Set: environs: remove VarDir global 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 | « container/export_test.go ('k') | environs/cloudinit/cloudinit_test.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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 // Make the agent run via a symbolic link to the actual tools 159 // Make the agent run via a symbolic link to the actual tools
160 // directory, so it can upgrade itself without needing to change 160 // directory, so it can upgrade itself without needing to change
161 // the upstart script. 161 // the upstart script.
162 toolsDir := environs.AgentToolsDir(cfg.DataDir, name) 162 toolsDir := environs.AgentToolsDir(cfg.DataDir, name)
163 addScripts(c, fmt.Sprintf("ln -s $bin %s", toolsDir)) 163 addScripts(c, fmt.Sprintf("ln -s $bin %s", toolsDir))
164 svc := upstart.NewService(fmt.Sprintf("jujud-%s", name)) 164 svc := upstart.NewService(fmt.Sprintf("jujud-%s", name))
165 cmd := fmt.Sprintf( 165 cmd := fmt.Sprintf(
166 "%s/jujud %s"+ 166 "%s/jujud %s"+
167 " --zookeeper-servers '%s'"+ 167 " --zookeeper-servers '%s'"+
168 " --log-file /var/log/juju/%s-agent.log"+ 168 " --log-file /var/log/juju/%s-agent.log"+
169 » » » " --data-directory '%s'"+ 169 » » » " --data-dir '%s'"+
170 " %s", 170 " %s",
171 toolsDir, name, 171 toolsDir, name,
172 cfg.zookeeperHostAddrs(), 172 cfg.zookeeperHostAddrs(),
173 name, 173 name,
174 cfg.DataDir, 174 cfg.DataDir,
175 args, 175 args,
176 ) 176 )
177 conf := &upstart.Conf{ 177 conf := &upstart.Conf{
178 Service: *svc, 178 Service: *svc,
179 Desc: fmt.Sprintf("juju %s agent", name), 179 Desc: fmt.Sprintf("juju %s agent", name),
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 if cfg.Config == nil { 241 if cfg.Config == nil {
242 return requiresError("environment configuration") 242 return requiresError("environment configuration")
243 } 243 }
244 } else { 244 } else {
245 if cfg.StateInfo == nil || len(cfg.StateInfo.Addrs) == 0 { 245 if cfg.StateInfo == nil || len(cfg.StateInfo.Addrs) == 0 {
246 return requiresError("zookeeper hosts") 246 return requiresError("zookeeper hosts")
247 } 247 }
248 } 248 }
249 return nil 249 return nil
250 } 250 }
LEFTRIGHT

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