Inconsistencies between juju debug-hooks and "normal" hook environment

Merlijn Sebrechts merlijn.sebrechts at gmail.com
Tue Oct 6 10:07:51 UTC 2015


Hi


I'm developing a Charm that installs the Juju client, among other things.
I'm having some trouble getting this to work. When I use juju debug-hooks
and manually run the install hook, everything works fine. However, when the
hook is executed by Juju automatically, I get strange errors such as
"error: cannot determine juju home, required environment variables are not
set"

Both the debug-hooks and the normal hook environment execute as root.
However, a lot of env vars are different, like the home dir.

Debug-hooks:
    echo ~ : /home/ubuntu
hook env:
    echo ~: /root

Is this intentional? This causes a lot of bugs that cannot be reproduced
by debug-hooks. Is there a way to solve  "error: cannot determine juju
home, required environment variables are not set"?



Kind regards
Merlijn Sebrechts
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20151006/7ba705b4/attachment.html>


More information about the Juju mailing list