Merge lp://staging/~thumper/juju-core/hook-execution-message into lp://staging/~juju/juju-core/trunk
Proposed by
Tim Penhey
Status: | Merged |
---|---|
Merged at revision: | 1198 |
Proposed branch: | lp://staging/~thumper/juju-core/hook-execution-message |
Merge into: | lp://staging/~juju/juju-core/trunk |
Prerequisite: | lp://staging/~thumper/juju-core/fslock-message |
Diff against target: |
17 lines (+7/-0) 1 file modified
worker/uniter/uniter.go (+7/-0) |
To merge this branch: | bzr merge lp://staging/~thumper/juju-core/hook-execution-message |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+159280@code.staging.launchpad.net |
Description of the change
Write out the hook context id as the lock message.
It has the important parts like the unit name and the hook name.
To post a comment you must log in.
Reviewers: mp+159280_ code.launchpad. net,
Message:
Please take a look.
Description:
Write out the hook context id as the lock message.
It has the important parts like the unit name and the hook name.
https:/ /code.launchpad .net/~thumper/ juju-core/ hook-execution- message/ +merge/ 159280
Requires: /code.launchpad .net/~thumper/ juju-core/ fslock- message/ +merge/ 159261
https:/
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/8812044/
Affected files: uniter/ uniter. go
A [revision details]
M worker/
Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: <email address hidden>
+New revision: <email address hidden>
Index: worker/ uniter/ uniter. go uniter/ uniter. go' uniter/ uniter. go 2013-04-17 00:02:28 +0000 uniter/ uniter. go 2013-04-17 02:10:47 +0000 "%s:%s: %d", u.unit.Name(), hookName, u.rand.Int63()) SetMessage( hctxId) *ContextRelatio n{} s[id] = r.Context()
=== modified file 'worker/
--- worker/
+++ worker/
@@ -274,6 +274,13 @@
}
}
hctxId := fmt.Sprintf(
+ // Explicitly ignore any error we may get writing out the message for the
+ // lock. Since we have a lock, the only thing it could be is that there
+ // was some error actually writing the file, in which case we don't care.
+ // If there are disk full problems, something else serious will fail.
+ // This message is for post-failure debugging anyway where we can
+ // interrogate the file system.
+ _ = u.hookLock.
ctxRelations := map[int]
for id, r := range u.relationers {
ctxRelation