Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-18015

satellite-maintain logs with DEBUG level by default

XMLWordPrintable

    • 0
    • False
    • Important
    • None
    • None
    • None
    • None

      Description of problem:
      Command satellite-maintain logs its activity to file /var/log/foreman-maintain/foreman-maintain.log with DEBUG log level in its default configuration.

      Compounded with files at /var/log/foreman-maintain not being rotated as per bug 1917422 , this can add up over time and exhaust the space available at /var/log:

      1. ls -lrt /var/log/foreman-maintain
        total 1728620
        rw-rr-. 1 root root 32735994 Jul 22 2020 foreman-maintain.log.3.gz
        rw-rr-. 1 root root 53485973 Jul 22 2020 foreman-maintain.log.2.gz
        rw-rw-r-. 1 root root 10240018 Mar 21 00:48 foreman-maintain.log.8
        rw------. 1 root root 10240058 Mar 23 09:42 foreman-maintain.log.7
        rw-rw-r-. 1 root root 10240587 Mar 25 17:42 foreman-maintain.log.6
        rw-rw-r-. 1 root root 10241774 Mar 27 23:50 foreman-maintain.log.5
        rw-rw-r-. 1 root root 92984095 Mar 28 09:05 foreman-maintain.log.4
        rw-rr-. 1 root root 520596683 Mar 28 09:05 foreman-maintain.log.3
        rw-rr-. 1 root root 978868396 Mar 28 09:08 foreman-maintain.log.2
        rw-rr-. 1 root root 30777676 Mar 28 09:11 foreman-maintain.log.1
        rw-rr-. 1 root root 10240035 Mar 31 00:11 foreman-maintain.log.0
        rw-rw-r-. 1 root root 9389622 Apr 1 15:55 foreman-maintain.log

      (1.7 GB)

      Version-Release number of selected component (if applicable):
      rubygem-foreman_maintain-0.6.13-1.el7sat.noarch

      How reproducible:
      Always

      Steps to Reproduce:
      1. Run "satellite-maintain service status" repeatedly

      Actual results:
      Disk usage at /var/log/foreman-maintain grows by 143KB on each invocation.

      Expected results:
      A lower log level such as ERROR helps preventing disk space at /var/log from being exhausted.

      Additional info:
      The default contents of configuration file /etc/foreman-maintain/foreman_maintain.yml already specify ERROR log level, but the line is commented out:

      1. cat /etc/foreman-maintain/foreman_maintain.yml
      2. Directory where the logs are stored.
      3. The default file is named as /log/foreman_maintain.log
        :log_dir: '/var/log/foreman-maintain/'
      1. Logger levels: mention one of debug, info, warning, error, fatal
      2. :log_level: 'error'

              ehelms@redhat.com Eric Helms
              jira-bugzilla-migration RH Bugzilla Integration
              Griffin Sullivan Griffin Sullivan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: