Bug 1012776 - Dist-geo-rep: logrotate utility command rotates the geo-replication log file but doesn't open a new one to write.
Summary: Dist-geo-rep: logrotate utility command rotates the geo-replication log file ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: geo-replication
Version: pre-release
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ---
Assignee: Aravinda VK
QA Contact:
URL:
Whiteboard:
Depends On: 998943
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-27 06:25 UTC by Aravinda VK
Modified: 2014-04-17 11:48 UTC (History)
8 users (show)

Fixed In Version: glusterfs-3.5.0
Doc Type: Bug Fix
Doc Text:
Clone Of: 998943
Environment:
Last Closed: 2014-04-17 11:48:54 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

Comment 1 Anand Avati 2013-09-27 07:15:15 UTC
REVIEW: http://review.gluster.org/5968 (geo-rep: logrotate: Logrotate handling) posted (#3) for review on master by Aravinda VK (avishwan)

Comment 2 Anand Avati 2013-09-27 09:13:52 UTC
REVIEW: http://review.gluster.org/5968 (geo-rep: logrotate: Logrotate handling) posted (#4) for review on master by Aravinda VK (avishwan)

Comment 3 Anand Avati 2013-10-04 04:26:06 UTC
COMMIT: http://review.gluster.org/5968 committed in master by Anand Avati (avati) 
------
commit 79ba7b3e2ea6e2dc2e720c2cae1e6ae0aeeea392
Author: Aravinda VK <avishwan>
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:
    http://docs.python.org/2/library/logging.handlers.html:
    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.
    
    Change-Id: I30f65eb1e9778b12943d6e43b60a50344a7885c6
    BUG: 1012776
    Signed-off-by: Aravinda VK <avishwan>
    Reviewed-on: http://review.gluster.org/5968
    Reviewed-by: Amar Tumballi <amarts>
    Reviewed-by: Harshavardhana <harsha>
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Anand Avati <avati>

Comment 4 Niels de Vos 2014-04-17 11:48:54 UTC
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 [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/6137
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user


Note You need to log in before you can comment on or make changes to this bug.