Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-69959

Logrotate and /dev/null as the state file

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Minor Minor
    • rhel-9.7
    • rhel-9.4
    • logrotate
    • None
    • logrotate-3.18.0-12.el9
    • No
    • Moderate
    • rhel-systemd
    • ssg_core_services
    • 26
    • 3
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None

      We recently ran into an issue where we needed to have logrotate do an extra rotation and we found that this extra config needed to ignore the state file, or it wouldn't run the extra rotation like we needed it to.

      So we used `-s /dev/null` in the logrotate command to have it skip the state file.  But it looks like the version of logrotate (3.18.0) in CentOS Stream 9 was released before it had support for using /dev/null as the state file.  This resulted in the /dev/null special character device getting replaced with a regular file.  Which caused some obvious problems!

      They talk about the patch used to support this in the following Git issue:

      https://github.com/logrotate/logrotate/issues/395

      It's a very simple patch and I was hoping that we could get this applied to CentOS Stream 9 (and in turn RHEL 9 later).

              jamacku@redhat.com Jan Macku
              wkbradp Brad Patton (Inactive)
              Jan Macku Jan Macku
              Frantisek Sumsal Frantisek Sumsal
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: