cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLOUDSTACK-9746) system-vm: logrotate config causes critical failures
Date Mon, 20 Feb 2017 08:18:44 GMT

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-9746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15874189#comment-15874189
] 

ASF GitHub Bot commented on CLOUDSTACK-9746:
--------------------------------------------

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.prateek@shapeblue.com>
    AuthorDate: Mon Mar 30 11:36:11 2015 +0530
    Commit:     Abhinandan Prateek <abhinandan.prateek@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
    ```


> system-vm: logrotate config causes critical failures
> ----------------------------------------------------
>
>                 Key: CLOUDSTACK-9746
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9746
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: SystemVM
>    Affects Versions: 4.8.0, 4.9.0
>            Reporter: Joakim Sernbrant
>            Priority: Critical
>
> CLOUDSTACK-6885 changed logrotate from time based to size based. This means that logs
will grow up to its size times two (due to delaycompress).
> For example:
> 50M auth.log
> 50M auth.log.1
> 10M cloud.log
> 10M cloud.log.1
> 50M cron.log
> 50M cron.log.1
> 50M messages
> 50M messages.1
> ...
> Some files will grow slowly but eventually they will get to their max size. The total
allowed log size with the current config is well beyond the size of the log partition.
> Having a full /dev/log puts the VR in a state where operations on it critically fails.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message