-
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/