Skip to content

Add mechanism to reopen logfile #1999

@matyasselmeci

Description

@matyasselmeci

Pelican Service:

  • Client
  • Plugin
  • Registry
  • Director
  • Origin
  • Cache
  • Other (please give the detail)

Currently log rotation (using logrotate) requires the copytruncate method, wherein a rotation is performed by copying the log file, then truncating the original. The downside to this is that if the log file suddenly grows to be at least half of the log volume, you can no longer rotate it (because you don't have enough room to make a copy). Since you can't rotate it, the original will just keep getting bigger until it fills up the volume.

A better way to do it is for logrotate to rename the file, then tell the daemon to close the file and open a new logfile (with the old name). This is usually done with Unix signals, typically SIGHUP or SIGUSR1.

Add a mechanism by which logrotate can tell Pelican to close and reopen the log file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cacheIssue relating to the cache componentdirectorIssue relating to the director componentenhancementNew feature or requestoriginIssue relating to the origin componentregistryIssue relating to the registry componentstale

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions