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

Issue 12183043: cmd/jujud: use API-based upgrader

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 9 months ago by rog
Modified:
10 years, 9 months ago
Reviewers:
mue, dimitern, jameinel, mp+177909
CC:
roger.peppe
Visibility:
Public.

Description

cmd/jujud: use API-based upgrader This also has https://code.launchpad.net/~rogpeppe/juju-core/355-remove-1.10-hacks/+merge/177638 as another prerequisite which I can't add because of the only-one prereq rule (hopefully that one will be approved and merged soon) https://code.launchpad.net/~rogpeppe/juju-core/354-use-upgrader/+merge/177909 Requires: https://code.launchpad.net/~rogpeppe/juju-core/356-state-agent-entity/+merge/177892 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 2

Patch Set 2 : cmd/jujud: use API-based upgrader #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+74 lines, -1189 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/jujud/agent.go View 3 chunks +3 lines, -2 lines 0 comments Download
M cmd/jujud/agent_test.go View 3 chunks +4 lines, -3 lines 0 comments Download
M cmd/jujud/machine.go View 4 chunks +5 lines, -13 lines 0 comments Download
M cmd/jujud/unit.go View 2 chunks +23 lines, -13 lines 0 comments Download
M cmd/jujud/unit_test.go View 1 chunk +2 lines, -0 lines 0 comments Download
D cmd/jujud/upgrade.go View 1 chunk +0 lines, -264 lines 0 comments Download
D cmd/jujud/upgrade_test.go View 1 chunk +0 lines, -361 lines 0 comments Download
D cmd/jujud/upgradevalidation.go View 1 chunk +0 lines, -181 lines 0 comments Download
D cmd/jujud/upgradevalidation_test.go View 1 chunk +0 lines, -336 lines 0 comments Download
M state/apiserver/agent/agent.go View 1 chunk +1 line, -1 line 0 comments Download
M state/apiserver/agent/agent_test.go View 1 chunk +11 lines, -2 lines 1 comment Download
M state/apiserver/common/interfaces.go View 1 chunk +4 lines, -0 lines 0 comments Download
M state/apiserver/root.go View 1 chunk +6 lines, -0 lines 0 comments Download
M state/apiserver/testing/fakeauthorizer.go View 2 chunks +5 lines, -0 lines 0 comments Download
M state/apiserver/upgrader/upgrader.go View 1 3 chunks +7 lines, -13 lines 1 comment Download
M state/apiserver/upgrader/upgrader_test.go View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 4
dimitern
Awesome! LGTM with one question https://codereview.appspot.com/12183043/diff/1/cmd/jujud/machine.go File cmd/jujud/machine.go (left): https://codereview.appspot.com/12183043/diff/1/cmd/jujud/machine.go#oldcode89 cmd/jujud/machine.go:89: if err := EnsureWeHaveLXC(a.Conf.DataDir, ...
10 years, 9 months ago (2013-07-31 17:24:07 UTC) #1
rog
Please take a look.
10 years, 9 months ago (2013-08-01 15:56:58 UTC) #2
mue
LGTM
10 years, 9 months ago (2013-08-01 16:05:58 UTC) #3
jameinel
10 years, 9 months ago (2013-08-08 16:03:50 UTC) #4
This looks pretty good overall, though I'd like a direct test that Unit Agents
can talk to the Upgrader API, like you did for the Agent API itself.

https://codereview.appspot.com/12183043/diff/4001/state/apiserver/agent/agent...
File state/apiserver/agent/agent_test.go (right):

https://codereview.appspot.com/12183043/diff/4001/state/apiserver/agent/agent...
state/apiserver/agent/agent_test.go:73: 
This is the "positive assertion" test I mention in the other code. You have this
for agent.API but not for upgrader.

https://codereview.appspot.com/12183043/diff/4001/state/apiserver/upgrader/up...
File state/apiserver/upgrader/upgrader.go (right):

https://codereview.appspot.com/12183043/diff/4001/state/apiserver/upgrader/up...
state/apiserver/upgrader/upgrader.go:31: if !authorizer.AuthMachineAgent() &&
!authorizer.AuthUnitAgent() {
This change is a correct one, but you are missing the matching test case that
asserts that when you aren't a Machine agent but you are a Unit Agent it allows
you to connect to the Upgrader api.

Can you add this in a follow up branch?
Sign in to reply to this message.

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