~rogpeppe/juju-core/387-use-testing-set

  • Committer: Tarmac
  • Author(s): Nate Finch
  • Date: 2013-09-10 01:39:09 UTC
  • mfrom: (1665.6.6 009-reboot-cycle)
  • Revision ID: tarmac-20130910013909-my6ntoz4amn95mm8
[r=natefinch] fix local provider upgrade loop

Fix for https://bugs.launchpad.net/juju-core/+bug/1214676
upgrade-juju in local environment causes bootstrap machine agent to restart continuously

This is a problem with the creation of the upstart script for the local provider. It is hard-coded against the tools version that exists when you bootstrap the environment. The rest of the code goes through the upgrade correctly, which updates the symlink at .juju/local/tools/machine-0 ... but the upstart script wasn't referencing that symlink, so it doesn't use the new tools after we restarted... causing it to use the old version and think it needs to upgrade again.

To fix this, I simply called agent/tools/ChangeAgentTools to create the symlink during local provider's bootstrap, and make sure we use the symlink as the tools dir in the upstart script.

https://codereview.appspot.com/13595043/
Filename Latest Rev Last Changed Committer Comment Size
..
cloudinit.go 1206.2.1 11 years ago Martin Packman Add copyright statement at the top of all go files 1.5 KB Diff Download File
cloudinit_test.go 1628.11.16 10 years ago Andrew Wilkins Merge with trunk 5.8 KB Diff Download File
options.go 1628.11.16 10 years ago Andrew Wilkins Merge with trunk 8.9 KB Diff Download File