Uploaded image for project: 'CloudStack'
  1. CloudStack
  2. CLOUDSTACK-9454

cloudstack-agent logs rotation outdated

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.7.0
    • Fix Version/s: None
    • Component/s: cloudstack-agent
    • Security Level: Public (Anyone can view this level - this is the default.)
    • Labels:
      None

      Description

      Log4j configuration for cloudstack-agent does not include an archival policy so it can fill /var partition over time.

      we should include a rotation limit of example 31 files which mean 31 days.

      example:

         <appender name="FILE" class="org.apache.log4j.rolling.RollingFileAppender">
            <param name="Append" value="true"/>
            <param name="Threshold" value="INFO"/>
            <rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
              <param name="FileNamePattern" value="/var/log/cloudstack/agent/agent.log.%d{yyyy-MM-dd}.gz"/>
              <param name="ActiveFileName" value="/var/log/cloudstack/agent/agent.log"/>
              <param name="MaxBackupIndex" value="31"/>
            </rollingPolicy>
            <layout class="org.apache.log4j.EnhancedPatternLayout">
               <param name="ConversionPattern" value="%d{ISO8601} %-5p [%c{3}] (%t:%x) (logid:%X{logcontextid}) %m%n"/>
            </layout>
         </appender>
      

      The logrotate file /etc/logrotate.d/cloudstack-agent deployed with cloudstack-agent is outdated.

      The log file: /var/log/cloudstack/management/security_group.log does not have logrotation policy.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              pdion Pierre-Luc Dion
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: