Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
[RFE] implement a mechanism in logging subsystem to allow its users to interact with logrotate (automatic "infinite" files maintenance) machinery gracefully
DescriptionJan Pokorný [poki]
2016-12-07 18:00:06 UTC
For the problem statement and initial design ideas, see
https://github.com/ClusterLabs/libqb/issues/239
In a nutshell, the top-level goal is to avoid copytruncate option in
logrotate configurations of both corosync and pacemaker (current state)
because, at any rate, any bit missing from logs may be too precious
(e.g. otherwise exactly clarifying the root cause of an issue or putting
an explanation for the observable behavior later in the game, making for
real tough life of anyone trying to inspect past issues) to accept the
connected risk clearly stated in the man page of logrotate (and
logrotate is installed by default so it may definitely kick in).
Currently, most viable implemention would rely on the named pipes:
> libqb will create a named pipe X.pipe for > the target log file X
> which then will be written to per the logrotate > configuration. This
> currently seems the best technical solution:
>
> - named pipes should be available everywhere we desire
> - custom command in logrotate config would be immediately clear on
> whether the libqb supporting the signalling mechanism is in use
> thanks to existing X.pipe file (a la test -p), and thus supporting
> the sketched fallback scheme for older libqb in use
> (it could be viceversa: old -> new)
(for the fallback scheme, see below)
> - no sign of "bad polling" (i.e., checking whether inode has changes
> over and over), just a "good polling" (poll on X.pipe)
> - signal-safe
(signal-safe as opposed to libqb's user having libqb to react on SIGHUP
while handling other signals on its own, with various signal masks,
etc.)
The fallback scheme deals with possible incompatibilities between
libqb's user + its logrotate file vs. libqb version in an actual use:
> One of the possibilities to employ in the updated logrotate files is
> to use firstscript option with custom command to check the libqb
> version (through *.so version info) and if not high enough, to trigger
> logrotate > with an out-of-path original configuration (copytruncate)
> and > subsequently fail to denote the procedure should not continue.
Comment 6Christine Caulfield
2020-05-18 06:26:56 UTC
Closing it was the right thing to do. An API for closing & reopening log files was added to libqb 2.0, and will be backported to RHEL-8 if needed