Triggering a fixed hook as part of upgrade-charm
William Reade
william.reade at canonical.com
Thu Apr 4 14:50:14 UTC 2013
On Thu, 2013-04-04 at 15:07 +0100, Tom Haddon wrote:
> Hi Folks,
>
> If we have a problem with a particular hook, and fix that, we can
> upgrade-charm to rollout the fixed version of the charm. However, how do
> we actually fire the hook in question? I'm looking for this in terms of
> the "right way"™ as there are a few manual ways of doing this I can
> think of. Should we include the hook we want to run in the upgrade-charm
> hook? If the hook is a relation-changed, we don't necessarily want to do
> anything invasive to trigger that hook from being fired (such as
> changing the environment) we just want the hook to be rerun.
>
> Thanks, Tom
>
If you pass "--force" to upgrade-charm, it will silently upgrade units
in an error state without running the upgrade-charm hook (but run it as
normal for other units). This should leave all units in their original
state, and free for `juju resolved --retry`.
Does this cover your situation?
Cheers
William
PS I feel obliged to note that --force is kinda funky, and you need to
think carefully about the consequences of the skipped upgrade-charm
hooks in order to use it safely. If one is not sure whether it should be
used, it probably shouldn't.
More information about the Juju
mailing list