juju/juju — pull request #554 by mjs (2014-08-20 04:18:59+00:00)
Title: worker/upgrader: use already downloaded tools if available

Environment storage was always being consulted when looking for new tools versions. This change makes it so if the desired tools have already been downloaded locally, the tools in environment storage aren't checked.

Although this is a nice shortcut generally, the change is essential to allow downgrades to the previous agent version in the case of aborted upgrades. For environments using the local or manual provider, environment storage isn't available when upgrade mode is active.