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

Unified Diff: worker/uniter/uniter.go

Issue 50090044: Add the environment name to the hooks context.
Patch Set: Add the environment name to the hooks context. Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « worker/uniter/context_test.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: worker/uniter/uniter.go
=== modified file 'worker/uniter/uniter.go'
--- worker/uniter/uniter.go 2014-01-28 04:58:43 +0000
+++ worker/uniter/uniter.go 2014-01-31 13:45:51 +0000
@@ -66,6 +66,7 @@
relationers map[int]*Relationer
relationHooks chan hook.Info
uuid string
+ envName string
dataDir string
baseDir string
@@ -189,10 +190,8 @@
if err != nil {
return err
}
- u.uuid, err = env.UUID()
- if err != nil {
- return err
- }
+ u.uuid = env.UUID()
+ u.envName = env.Name()
runListenerSocketPath := filepath.Join(u.baseDir, RunListenerFile)
logger.Debugf("starting juju-run listener on %s:%s", RunListenerNetType, runListenerSocketPath)
@@ -341,8 +340,8 @@
// Make a copy of the proxy settings.
proxySettings := u.proxy
- return NewHookContext(u.unit, hctxId, u.uuid, relationId, remoteUnitName,
- ctxRelations, apiAddrs, ownerTag, proxySettings)
+ return NewHookContext(u.unit, hctxId, u.uuid, u.envName, relationId,
+ remoteUnitName, ctxRelations, apiAddrs, ownerTag, proxySettings)
}
func (u *Uniter) acquireHookLock(message string) (err error) {
« no previous file with comments | « worker/uniter/context_test.go ('k') | no next file » | no next file with comments »

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