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) { |