JUJU_UNIT_NAME no longer set in env
Nick Veitch
nick.veitch at canonical.com
Tue May 23 11:57:19 UTC 2017
On 23 May 2017 at 11:23, Junien Fridrick <junien.fridrick at canonical.com>
wrote:
>
> You can run some hooks like config-changed with e.g. :
>
> $ juju run --unit foo/0 hooks/config-changed
>
You can run any hook like that, but if it requires a hook context (as in
the example of trying to read $JUJU_UNIT_NAME ) it won't work. A lot of
hooks in common charms don't need context, but you can't guarantee that.
N.B. Also when using `juju debug-hooks` once any hook fires and you are in
the hook environment, you can then execute any hook (not just the one that
has been triggered), if you need to test them.
--
Nick Veitch,
Documentation
Canonical
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20170523/dbef60dd/attachment.html>
More information about the Juju
mailing list