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

Issue 85450043: state/apiserver/upgrader: Managers upgrade first

Can't Edit
Can't Publish+Mail
Start Review
Created:
6 years, 5 months ago by jameinel
Modified:
6 years, 5 months ago
Reviewers:
mp+214743, fwereade
Visibility:
Public.

Description

state/apiserver/upgrader: Managers upgrade first This addresses bug #1304340. It gives us a step along the path of having Manager nodes (API Servers) upgrade themselves before we have all the other machine agents upgrade (before we have the Unit agents upgrade). We already had the last two steps. This isn't 100% reliable in HA circumstances, because we aren't waiting for *all* nodes to be upgraded. We could potentially change the check so it was just if DesiredVersion != CurrentVersion (rather than >= CurrentVersion). It also doesn't probe the database unless there is an upgrade pending, so DesiredVersion should still be cheap. This doesn't change FindTools, but it doesn't seem like it needs to. (All places that call FindTools first call DesiredVersion, because we broke stuff in the past when we didn't have API Credentials in time.) Also, this falls back to returning version.Current rather than returning the version of the machine/unit/etc had recorded in State. I'm not sure if that is worth implementing, but when we do the DB lookup to find out if this entity.IsManager() we could grab its current version. https://code.launchpad.net/~jameinel/juju-core/desiredversion-not-newer-1304340/+merge/214743 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+86 lines, -1 line) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M state/apiserver/upgrader/upgrader.go View 4 chunks +28 lines, -1 line 0 comments Download
M state/apiserver/upgrader/upgrader_test.go View 3 chunks +56 lines, -0 lines 1 comment Download

Messages

Total messages: 2
jameinel
Please take a look.
6 years, 5 months ago (2014-04-08 12:57:01 UTC) #1
fwereade
6 years, 5 months ago (2014-04-08 13:05:13 UTC) #2
LGTM

https://codereview.appspot.com/85450043/diff/1/state/apiserver/upgrader/upgra...
File state/apiserver/upgrader/upgrader_test.go (right):

https://codereview.appspot.com/85450043/diff/1/state/apiserver/upgrader/upgra...
state/apiserver/upgrader/upgrader_test.go:291:
s.rawMachine.SetAgentVersion(version.Current)
refresh raw machine instead maybe?
Sign in to reply to this message.

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