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

Issue 11572043: apiserver: Start Pinger on MA connection (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 9 months ago by dimitern
Modified:
10 years, 9 months ago
Reviewers:
mp+175833, fwereade, rog
Visibility:
Public.

Description

apiserver: Start Pinger on MA connection Machine agent facade now starts a presence.Pinger automatically when logging in successfully. This allows us to skip implementing SetAgentAlive in the API and handles better the concept of an agent being "alive": when it has an active API connection. Next in line is the implementation of the still missing API call Machiner.Watch, needed by the worker. https://code.launchpad.net/~dimitern/juju-core/073-apiserver-pinger-on-ma-connection/+merge/175833 Requires: https://code.launchpad.net/~dimitern/juju-core/072-machineagent-login-nonce/+merge/175791 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : apiserver: Start Pinger on MA connection #

Patch Set 3 : apiserver: Start Pinger on MA connection #

Total comments: 3

Patch Set 4 : apiserver: Start Pinger on MA connection #

Total comments: 2

Patch Set 5 : apiserver: Start Pinger on MA connection #

Unified diffs Side-by-side diffs Delta from patch set Stats (+97 lines, -41 lines) Patch
A [revision details] View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M state/apiserver/admin.go View 1 2 3 4 2 chunks +33 lines, -11 lines 0 comments Download
M state/apiserver/machine/agent.go View 1 2 chunks +3 lines, -2 lines 0 comments Download
M state/apiserver/machine/agent_test.go View 1 7 chunks +23 lines, -26 lines 0 comments Download
M state/apiserver/machine/common_test.go View 1 2 1 chunk +1 line, -1 line 0 comments Download
M state/apiserver/server_test.go View 1 2 3 4 2 chunks +35 lines, -1 line 0 comments Download

Messages

Total messages: 7
dimitern
Please take a look.
10 years, 9 months ago (2013-07-19 13:46:46 UTC) #1
dimitern
Please take a look.
10 years, 9 months ago (2013-07-19 15:42:41 UTC) #2
dimitern
Please take a look.
10 years, 9 months ago (2013-07-19 15:55:41 UTC) #3
rog
LGTM with one simplification below https://codereview.appspot.com/11572043/diff/8001/state/apiserver/admin.go File state/apiserver/admin.go (right): https://codereview.appspot.com/11572043/diff/8001/state/apiserver/admin.go#newcode102 state/apiserver/admin.go:102: if ok && !machine.CheckProvisioned(c.MachineNonce) ...
10 years, 9 months ago (2013-07-19 16:00:05 UTC) #4
dimitern
Please take a look. https://codereview.appspot.com/11572043/diff/8001/state/apiserver/admin.go File state/apiserver/admin.go (right): https://codereview.appspot.com/11572043/diff/8001/state/apiserver/admin.go#newcode102 state/apiserver/admin.go:102: if ok && !machine.CheckProvisioned(c.MachineNonce) { ...
10 years, 9 months ago (2013-07-19 16:06:55 UTC) #5
fwereade
LGTM with one more test, just to check it's really a resource..? https://codereview.appspot.com/11572043/diff/13001/state/apiserver/server_test.go File state/apiserver/server_test.go ...
10 years, 9 months ago (2013-07-19 17:08:09 UTC) #6
dimitern
10 years, 9 months ago (2013-07-19 17:59:47 UTC) #7
Please take a look.

https://codereview.appspot.com/11572043/diff/13001/state/apiserver/server_tes...
File state/apiserver/server_test.go (right):

https://codereview.appspot.com/11572043/diff/13001/state/apiserver/server_tes...
state/apiserver/server_test.go:145: c.Assert(alive, Equals, true)
On 2013/07/19 17:08:09, fwereade wrote:
> I think we should probably test that it's stopped when the connection ends
too.
> 
> And (not this CL) we should probably have a followup that Kills instead of
Stops
> when the machine's actually dead...

Ah, good point. Done.
I had to wrap the pinger to redefine its Stop method to call Pinger.Kill
instead.
Sign in to reply to this message.

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