Red Hat Bugzilla – Bug 1012776
Dist-geo-rep: logrotate utility command rotates the geo-replication log file but doesn't open a new one to write.
Last modified: 2014-04-17 07:48:54 EDT
REVIEW: http://review.gluster.org/5968 (geo-rep: logrotate: Logrotate handling) posted (#3) for review on master by Aravinda VK (firstname.lastname@example.org)
REVIEW: http://review.gluster.org/5968 (geo-rep: logrotate: Logrotate handling) posted (#4) for review on master by Aravinda VK (email@example.com)
COMMIT: http://review.gluster.org/5968 committed in master by Anand Avati (firstname.lastname@example.org)
Author: Aravinda VK <email@example.com>
Date: Thu Sep 19 14:24:35 2013 +0530
geo-rep: logrotate: Logrotate handling
In existing georep logrotate was implemented by handling SIGSTOP
and SIGCONT, gsyncd was failing to start again after SIGSTOP.
New approach uses WatchedFileHandler in logging, which tracks the
log file changes or logrotate. Reopens the log file if logrotate is
triggered or if same log file is updated from other process.
As per python doc:
The WatchedFileHandler class, located in the logging.handlers module,
is a FileHandler which watches the file it is logging to. If the file
changes, it is closed and reopened using the file name.
A file change can happen because of usage of programs such as newsyslog
and logrotate which perform log file rotation. This handler, intended
for use under Unix/Linux, watches the file to see if it has changed
since the last emit. (A file is deemed to have changed if its device
or inode have changed.) If the file has changed, the old file stream
is closed, and the file opened to get a new stream.
Signed-off-by: Aravinda VK <firstname.lastname@example.org>
Reviewed-by: Amar Tumballi <email@example.com>
Reviewed-by: Harshavardhana <firstname.lastname@example.org>
Tested-by: Gluster Build System <email@example.com>
Reviewed-by: Anand Avati <firstname.lastname@example.org>
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.5.0, please reopen this bug report.
glusterfs-3.5.0 has been announced on the Gluster Developers mailinglist , packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist  and the update infrastructure for your distribution.