~cmars/juju-core/local-repo-errmsg

Viewing all changes in revision 2592.

[r=jameinel],[bug=1304340] 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://codereview.appspot.com/85450043/

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: