[Bugs] [Bug 1187296] No way to gracefully rotate the libgfapi Samba vfs_glusterfs logfile.

bugzilla at redhat.com bugzilla at redhat.com
Tue Feb 10 16:08:43 UTC 2015


https://bugzilla.redhat.com/show_bug.cgi?id=1187296

Shyamsundar <srangana at redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |needinfo?(jbyers at stonefly.c
                   |                            |om)



--- Comment #3 from Shyamsundar <srangana at redhat.com> ---
Current situation:
The regular gluster deamons, use SIGHUP to get notified on log rotations, so
when the logrotate cron job runs, it notifies glusterfs(d), glusterd, et. al.
via a HUP to close the old fd/FILE and open a new one. logrotate in the
background has already renamed the file to its backup name etc.

gfapi cannot override HUP as it is being used by another service and is not a
deamon buy itself. As a result, there is no way currently to notify gfapi that
a log rotation has been performed.

Here are the options for gfapi consumers:

1) Add a logrotate entry for the log file that is configured via SAMBA (or any
other service that uses gfapi) with the copytruncate flag in the rotate
command.

copytruncate, will let the deamon operate on the same fd/FILE whereas copy the
old contents and truncate the original file, as a result we achieve rotation.

@Jeff, possibly even academic, but could you try this option? If not, just
remove the NEEDINFO flag against yourself.

2) Provide an API that the consumer of gfapi can call, to gracefully rotate
logs, and consumer would need to handle when this API is called (say in their
HUP signal handler).

This requires changes (as stated by Niels) in gfapi and its consumers.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=K9WC3QR4GH&a=cc_unsubscribe


More information about the Bugs mailing list