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

Issue 6461061: worker/uniter: simplify EnsureTools and make it concurrent-safe

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 1 month ago by rog
Modified:
13 years, 1 month ago
Reviewers:
mp+118748
Visibility:
Public.

Description

worker/uniter: simplify EnsureTools and make it concurrent-safe If someone breaks the symlinks, the user "gets everything they deserve". Avoiding the link reading logic makes it trivial for EnsureTools to be idempotent, even when run concurrently. Also fix the agent name to match our upstart convention which prefixes the tools directory with the agent kind. https://code.launchpad.net/~rogpeppe/juju-core/uniter-ensuretools-simplify/+merge/118748 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : worker/uniter: simplify EnsureTools and make it concurrent-safe #

Patch Set 3 : worker/uniter: simplify EnsureTools and make it concurrent-safe #

Total comments: 3

Patch Set 4 : worker/uniter: simplify EnsureTools and make it concurrent-safe #

Patch Set 5 : worker/uniter: simplify EnsureTools and make it concurrent-safe #

Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -51 lines) Patch
A [revision details] View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M worker/uniter/tools.go View 1 2 3 4 2 chunks +19 lines, -30 lines 0 comments Download
M worker/uniter/tools_test.go View 1 2 3 chunks +5 lines, -21 lines 0 comments Download

Messages

Total messages: 6
rog
Please take a look.
13 years, 1 month ago (2012-08-08 13:25:24 UTC) #1
rog
Please take a look.
13 years, 1 month ago (2012-08-08 13:41:52 UTC) #2
fwereade
LGTM https://codereview.appspot.com/6461061/diff/4001/worker/uniter/tools.go File worker/uniter/tools.go (right): https://codereview.appspot.com/6461061/diff/4001/worker/uniter/tools.go#newcode25 worker/uniter/tools.go:25: // TODO(rog) use os.IsExist when fix is released. ...
13 years, 1 month ago (2012-08-08 13:47:38 UTC) #3
rog
Please take a look. https://codereview.appspot.com/6461061/diff/4001/worker/uniter/tools.go File worker/uniter/tools.go (right): https://codereview.appspot.com/6461061/diff/4001/worker/uniter/tools.go#newcode25 worker/uniter/tools.go:25: // TODO(rog) use os.IsExist when ...
13 years, 1 month ago (2012-08-08 13:55:30 UTC) #4
niemeyer
LGTM
13 years, 1 month ago (2012-08-08 13:58:41 UTC) #5
rog
13 years, 1 month ago (2012-08-08 14:01:19 UTC) #6
*** Submitted:

worker/uniter: simplify EnsureTools and make it concurrent-safe

If someone breaks the symlinks, the user "gets everything they deserve".
Avoiding the link reading logic makes it trivial for EnsureTools
to be idempotent, even when run concurrently.

Also fix the agent name to match our upstart convention
which prefixes the tools directory with the agent kind.

R=fwereade, niemeyer
CC=
https://codereview.appspot.com/6461061
Sign in to reply to this message.

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