~go-bot/juju-core/1.18

Viewing all changes in revision 2264.

[r=jameinel],[bug=1299802] worker/upgrader: Refuse to downgrade

We've always considered the possibility of rolling back an upgrade with
"juju upgrade-juju --version=$OLD", however we never actually
implemented downgrade logic. And the new upgrade steps aren't actually
reversible. Bug #1299802 happened because 1.18 changes some state on
disk vs 1.16. It also has a race condition during upgrade where a 1.16
Unit agent upgrades faster than its Machine agent. When the API server
is 1.18, it will tell the Unit agent that it should actually match its
Machine agent version, thereby causing it to try to downgrade back to
1.16. What that actually does is just roll back to the 1.16 tools which
are now incompatible with the 1.18 agent.conf file.

Since we don't actually support rollback of upgrades, this just changes
the upgrader to refuse to change version to something older than
version.Current.

https://codereview.appspot.com/85710044/

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: