Triggering a fixed hook as part of upgrade-charm
Tom Haddon
tom.haddon at canonical.com
Thu Apr 4 14:40:52 UTC 2013
On 04/04/13 15:27, Kapil Thangavelu wrote:
>
> 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]
The particular case here is that we don't actually have a relation
error, we just want to change the implementation of the hook. Can you
run "juju resolved --retry unit_name [relation_name]" even if there's no
error?
> On Thu, Apr 4, 2013 at 10:07 AM, Tom Haddon <tom.haddon at canonical.com
> <mailto: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 <mailto:Juju at lists.ubuntu.com>
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/juju
>
>
More information about the Juju
mailing list