juju/juju — pull request #566 by mjs (2014-08-21 01:56:19+00:00)
Title: Write upgraded to version even when no upgrade

Two related changes here:

1. Store the initial UpgradedToVersion as the the machine agent starts up and use that when deciding whether HA initialisation is required. Previously it could have been possible for the upgrade-steps worker to update UpgradedToVersion before ensureMongoServer got to check it.
2. Recent changes to avoid entering "upgrade mode" unnecessarily have meant that the upgradedToVersion field in a machine agent's config wasnt't getting updated whenever upgrade mode is skipped. This canhave a variety of negative effects.

This change fixes that by writing the current version to agent.conf when upgrade mode is skipped.