Thanks John. Removing the log dir on destruction is easy to change. I left it like that in case people were using it to debug things after destruction, but it's probably not needed.
In hindsight, provider/local probably would need to be hacked up to call "sudo strace juju" instead of "sudo juju". Looking at your log dirs, though, I see they both have the files (machine-0.log). So is the restart bug still occurring...? I'll take this to IRC. Cheers, Andrew On Mon, Mar 24, 2014 at 1:48 PM, John Meinel <j...@arbash-meinel.com> wrote: > I just did a "juju destroy-environment -y local" and it did kill the > agents, but it left the /var/log/juju-jameinel-local directory lying around. > It also left ~/.juju/local/ (with storage and db dirs), though the log dir > is gone. > > Just to be sure, I went ahead and bootstrapped again to see what would > happen. > I was a bit surprised to see lots of stuff in ~/.juju/local owned by root: > > $ ll ~/.juju/local > drwxr-xr-x 3 root root 4096 Mar 24 09:36 agents/ > drwx------ 4 jameinel jameinel 4096 Mar 24 09:36 db/ > drwxr-xr-x 2 root root 4096 Mar 24 09:36 locks/ > drwxr-xr-x 2 jameinel jameinel 4096 Mar 24 09:36 log/ > -rw------- 1 root root 1718 Mar 24 09:36 server.pem > drwxr-xr-x 3 jameinel jameinel 4096 Mar 24 09:36 storage/ > -rw------- 1 root root 1676 Mar 24 09:36 system-identity > drwxr-xr-x 3 root root 4096 Mar 24 09:36 tools/ > $ ll ~/.juju/local/log/ > total 68 > lrwxrwxrwx 1 root root 45 Mar 24 09:36 all-machines.log -> > /var/log/juju-jameinel-local/all-machines.log > -rw-r--r-- 1 root root 2103 Mar 24 09:36 cloud-init-output.log > -rw-r--r-- 1 root root 61955 Mar 24 09:38 machine-0.log > > > $ ll /var/log/juju-jameinel-local > total 76 > -rw-r--r-- 1 syslog adm 63502 Mar 24 09:37 all-machines.log > -rw------- 1 syslog syslog 883 Mar 24 09:36 ca-cert.pem > lrwxrwxrwx 1 root root 44 Mar 24 09:36 machine-0.log -> > /home/jameinel/.juju/local/log/machine-0.log > -rw------- 1 syslog syslog 830 Mar 24 09:36 rsyslog-cert.pem > -rw------- 1 syslog syslog 887 Mar 24 09:36 rsyslog-key.pem > > It means that it is actually kind of hard to clean these things up, since > half of the things need sudo access. > > The second time I did "juju destroy-environment -y local" I ended up > without ~/.juju/local (good), but also it left /var/log/juju-jameinel-local > around (bad). Even doing "juju destroy-environment -y --force local" still > left /var/log/juju-jameinel-local around. > > I tried running: "strace -f juju destroy-environment -y local" after > bootstrapping, but that gave: > $ strace -o destroy-strace.txt -f juju destroy-environment -y local > sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the > 'nosuid' option set or an NFS file system without root privileges? > ERROR failed to destroy environment "local" > > It looks like you cannot "sudo" inside a "strace" process? > > I'll privately send you the logs for strace destroy and regular destroy > --debug. > > John > =:-> > >
-- Juju-dev mailing list Juju-dev@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju-dev