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

Logrotate and /dev/null as the state file

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • rhel-9.4
    • logrotate
    • None
    • No
    • Assignee, Qa Contact, Doc Contact, Pool Team, Watchers, Developer
    • Moderate
    • rhel-sst-cs-plumbers
    • ssg_core_services
    • 3
    • False
    • Hide

      None

      Show
      None
    • None
    • 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
              RHEL CS Plumbers QE Bot RHEL CS Plumbers QE Bot
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: