Triggering a fixed hook as part of upgrade-charm

Kapil Thangavelu kapil.thangavelu at canonical.com
Thu Apr 4 14:27:58 UTC 2013


fwiw in the python version this goes..

If you want to distribute the new charm to the units, the following will
put the new charm in place regardless of current unit error state. It this
just drops the new charm on to disk.  it does not run upgrade-charm hook
with the --force flag.

$ juju upgrade-charm --force service

Even without the upgrade you have two options, either a) retry the failed
op with the new hook, specifying relation name if its a relation error and
you want the relation hook to re-executed. The execution environment is the
same as the original execution environment in terms of the units seen  of
the remote side, although current relation settings for those may have
changed from the original execution env.

$ juju resolved --retry unit_name [relation_name]

Alternatively manually mark the error as resolved, typically as a result of
manual intervention.

 $ juju resolved  unit_name [relation_name]




On Thu, Apr 4, 2013 at 10:07 AM, Tom Haddon <tom.haddon at canonical.com>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
>
> --
> Juju mailing list
> Juju at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20130404/3b50bf52/attachment.html>


More information about the Juju mailing list