<div dir="ltr">So I was testing scaling today which generally generates huge volumes of logging (I actually wanted to keep it because I used it for seeing how everything went, but I understand why we are rotating the logs.)<div><br></div><div>However, I found this as it was running:<br></div><div><div># ls -sh /var/log/juju</div><div>total 909M</div><div><div>323M all-machines.log</div><div>4.0K ca-cert.pem</div><div>4.0K logrotate.conf</div><div>4.0K logrotate.run</div><div>301M machine-0-2014-09-15T05-02-27.486.log</div><div>301M machine-0-2014-09-15T05-06-53.779.log</div><div> 80M machine-0.log</div><div>4.0K rsyslog-cert.pem</div><div>4.0K rsyslog-key.pem</div></div><div><br></div></div><div>Notice that there is only 1 all-machines.log that is 300MB in size, while there are 2 machine-0 logs.</div><div><br></div><div>And when I track down the various configuration files, I find</div><div><div># cat logrotate.conf </div><div><br></div><div>/var/log/juju/all-machines.log {</div><div>    size 512M</div><div>    # don't move, but copy-and-truncate so the application won't have to be</div><div>    # told that the file has moved.</div><div>    copytruncate</div><div>    # maximum of one old file</div><div>    rotate 1</div><div>    # counting old files starts at 1 rather than 0</div><div>    start 1</div><div>    # use compression</div><div>    compress</div><div>}</div></div><div><br></div><div><br></div><div>I have the feeling that someone didn't realize "rotate 1" means only keep the original log file. As in, there are *no* backup files.</div><div><br></div><div>Did the person who implemented this actually test it?</div><div><br></div><div>Did we ever fix things so that "juju debug-log" doesn't become immediately useless once you reach the rotate threshold (that it can look in the backup log files)?</div><div><br></div><div>I can understand not fixing debug-log, but I'm a bit surprised that our idea of "all-machines.log needs to be rotated" became "all-machines.log needs to be truncated".</div><div><br></div><div>John</div><div>=:-></div><div><br></div></div>