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

Delta Between Two Patch Sets: worker/uniter/uniter.go

Issue 6498117: container: fix jujud arguments.
Left Patch Set: container: fix jujud arguments. Created 12 years, 7 months ago
Right Patch Set: container: fix jujud arguments. Created 12 years, 7 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 | « worker/uniter/tools_test.go ('k') | worker/uniter/uniter_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 uniter 1 package uniter
2 2
3 import ( 3 import (
4 "errors" 4 "errors"
5 "fmt" 5 "fmt"
6 "launchpad.net/juju-core/cmd" 6 "launchpad.net/juju-core/cmd"
7 "launchpad.net/juju-core/cmd/jujuc/server" 7 "launchpad.net/juju-core/cmd/jujuc/server"
8 "launchpad.net/juju-core/log" 8 "launchpad.net/juju-core/log"
9 "launchpad.net/juju-core/state" 9 "launchpad.net/juju-core/state"
10 "launchpad.net/juju-core/state/presence" 10 "launchpad.net/juju-core/state/presence"
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 } 195 }
196 log.Printf("hook complete") 196 log.Printf("hook complete")
197 return nil 197 return nil
198 } 198 }
199 199
200 // ensureFs ensures that files and directories required by the named uniter 200 // ensureFs ensures that files and directories required by the named uniter
201 // exist inside dataDir. It returns the path to the directory within which the u niter must 201 // exist inside dataDir. It returns the path to the directory within which the u niter must
202 // store its data. 202 // store its data.
203 func ensureFs(dataDir string, unit *state.Unit) (string, error) { 203 func ensureFs(dataDir string, unit *state.Unit) (string, error) {
204 // TODO: do this OAOO at packaging time? 204 // TODO: do this OAOO at packaging time?
205 » if err := EnsureJujucSymlinks(dataDir, unit.AgentName()); err != nil { 205 » if err := EnsureJujucSymlinks(dataDir, unit.PathKey()); err != nil {
206 return "", err 206 return "", err
207 } 207 }
208 » path := filepath.Join(dataDir, "agents", unit.AgentName()) 208 » path := filepath.Join(dataDir, "agents", unit.PathKey())
209 if err := trivial.EnsureDir(filepath.Join(path, "state")); err != nil { 209 if err := trivial.EnsureDir(filepath.Join(path, "state")); err != nil {
210 return "", err 210 return "", err
211 } 211 }
212 return path, nil 212 return path, nil
213 } 213 }
LEFTRIGHT

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