<div dir="ltr">Thanks John.<div><br></div><div>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.</div>
<div><br></div><div>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.</div>
<div><br></div><div>Cheers,</div><div>Andrew</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 24, 2014 at 1:48 PM, John Meinel <span dir="ltr"><<a href="mailto:john@arbash-meinel.com" target="_blank">john@arbash-meinel.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>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.<br>
It also left ~/.juju/local/ (with storage and db dirs), though the log dir is gone.<br>
<br>Just to be sure, I went ahead and bootstrapped again to see what would happen.<br>I was a bit surprised to see lots of stuff in ~/.juju/local owned by root:<br><br></div><div><span style="font-family:courier new,monospace">$ ll ~/.juju/local<br>
</span></div><div><span style="font-family:courier new,monospace">drwxr-xr-x 3 root root 4096 Mar 24 09:36 agents/<br>drwx------ 4 jameinel jameinel 4096 Mar 24 09:36 db/<br>drwxr-xr-x 2 root root 4096 Mar 24 09:36 locks/<br>
drwxr-xr-x 2 jameinel jameinel 4096 Mar 24 09:36 log/<br>-rw------- 1 root root 1718 Mar 24 09:36 server.pem<br>drwxr-xr-x 3 jameinel jameinel 4096 Mar 24 09:36 storage/<br>-rw------- 1 root root 1676 Mar 24 09:36 system-identity<br>
drwxr-xr-x 3 root root 4096 Mar 24 09:36 tools/<br>$ ll ~/.juju/local/log/<br>total 68<br>lrwxrwxrwx 1 root root 45 Mar 24 09:36 all-machines.log -> /var/log/juju-jameinel-local/all-machines.log<br>-rw-r--r-- 1 root root 2103 Mar 24 09:36 cloud-init-output.log<br>
-rw-r--r-- 1 root root 61955 Mar 24 09:38 machine-0.log<br><br><span></span><span></span></span><br></div><div><span style="font-family:courier new,monospace">$ ll /var/log/juju-jameinel-local<br>total 76<br>
-rw-r--r-- 1 syslog adm 63502 Mar 24 09:37 all-machines.log<br>-rw------- 1 syslog syslog 883 Mar 24 09:36 ca-cert.pem<br>lrwxrwxrwx 1 root root 44 Mar 24 09:36 machine-0.log -> /home/jameinel/.juju/local/log/machine-0.log<br>
-rw------- 1 syslog syslog 830 Mar 24 09:36 rsyslog-cert.pem<br>-rw------- 1 syslog syslog 887 Mar 24 09:36 rsyslog-key.pem<br></span><br></div><div>It means that it is actually kind of hard to clean these things up, since half of the things need sudo access.<br>
<br></div><div>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.<br>
<br></div><div>I tried running: "strace -f juju destroy-environment -y local" after bootstrapping, but that gave:<br><span style="font-family:courier new,monospace">$ strace -o destroy-strace.txt -f juju destroy-environment -y local <br>
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?<br>ERROR failed to destroy environment "local"</span><br><br></div>
<div>It looks like you cannot "sudo" inside a "strace" process?<br><br></div><div>I'll privately send you the logs for strace destroy and regular destroy --debug.<br><br></div><div>John<br>=:-><br>
</div><div><br></div></div>
</blockquote></div><br></div>