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

2015-10-06 Thread Matt Bruzek
Merlijn, Now that I see more of what you are doing I have an alternate suggestion. When you are running 'juju init' use the su command to run as the "ubuntu" user. su - ubuntu -c 'juju init' Using the su command in this way gives a "login" environment for the user "ubuntu". I wrote a charm

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

2015-10-06 Thread Merlijn Sebrechts
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

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

2015-10-06 Thread Matt Bruzek
Hell again Merlijn, It was nice to see you at the Charmer summit! This is a very interesting use of Juju. What you are seeing is what we call a "hook context". Hooks execute with root authority and have certain environment variables are set. This is so Juju commands and tools work correctly.