Github user ustcweizhou commented on the issue: https://github.com/apache/cloudstack/pull/1915 1. As @dmabry said, the logrotate is moved from cron.daily to cron.hourly in isolated network VR in commit. We should make similar change for VPC VR and VR for shared network. ``` commit 6ac06e5e5e3ceed4a3e3a86ea5f82ffb59c266f2 Author: Abhinandan Prateek <abhinandan.prat...@shapeblue.com> AuthorDate: Mon Mar 30 11:36:11 2015 +0530 Commit: Abhinandan Prateek <abhinandan.prat...@shapeblue.com> CommitDate: Mon Mar 30 13:49:23 2015 +0530 CLOUDSTACK-6885: rotate logs hourly on VR --- .../debian/config/etc/init.d/cloud-early-config | 4 ++++ systemvm/patches/debian/config/etc/logrotate.conf | 2 +- .../patches/debian/config/etc/logrotate.d/cloud | 3 --- .../patches/debian/config/etc/logrotate.d/rsyslog | 2 ++ 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/systemvm/patches/debian/config/etc/init.d/cloud-early-config b/systemvm/patches/debian/config/etc/init.d/cloud-early-config index 729b58f..5a2ee6f 100755 --- a/systemvm/patches/debian/config/etc/init.d/cloud-early-config +++ b/systemvm/patches/debian/config/etc/init.d/cloud-early-config @@ -995,6 +995,10 @@ setup_router() { sed -i "s/-A INPUT -i eth0 -p udp -m udp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p udp -m udp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules sed -i "s/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules.v4 sed -i "s/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -j ACCEPT/-A INPUT -i eth0 -p tcp -m tcp --dport 53 -s $DHCP_RANGE\/$CIDR_SIZE -j ACCEPT/g" /etc/iptables/rules + + #setup hourly logrotate + mv -n /etc/cron.daily/logrotate /etc/cron.hourly 2>&1 + } ``` 2. size and maxsize have no difference in my testing. Anyway, maxsize is ok for me. 3. As I said in previous comment, we'd better use more 'rotate' for cloud.log 4. @dmabry If you are not confident with hourly file compress, we can add a file in /etc/cron.d/ ``` # cat /etc/cron.d/logrorate.cloud * * * * * root /usr/sbin/logrotate /etc/logrotate.d/cloud 2>&1 > /dev/null ```
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---