Bug 1286959 - [GlusterD]: After log rotate of cmd_history.log file, the next executed gluster commands are not present in the cmd_history.log file.
[GlusterD]: After log rotate of cmd_history.log file, the next executed glus...
Status: CLOSED CURRENTRELEASE
Product: GlusterFS
Classification: Community
Component: glusterd (Show other bugs)
mainline
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Satish Mohan
glusterd
:
Depends On:
Blocks: 1276219 1304963
  Show dependency treegraph
 
Reported: 2015-12-01 03:53 EST by Gaurav Kumar Garg
Modified: 2016-06-16 09:47 EDT (History)
7 users (show)

See Also:
Fixed In Version: glusterfs-3.8rc2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1276219
: 1304963 (view as bug list)
Environment:
Last Closed: 2016-06-16 09:47:31 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Comment 1 Vijay Bellur 2015-12-01 06:15:26 EST
REVIEW: http://review.gluster.org/12832 (libglusterfs: close & open cmd_history.log on log rotate) posted (#5) for review on master by Gaurav Kumar Garg (ggarg@redhat.com)
Comment 2 Vijay Bellur 2015-12-01 06:24:35 EST
REVIEW: http://review.gluster.org/12832 (libglusterfs: close & open cmd_history.log on log rotate) posted (#6) for review on master by Gaurav Kumar Garg (ggarg@redhat.com)
Comment 3 Vijay Bellur 2015-12-03 02:20:45 EST
REVIEW: http://review.gluster.org/12832 (libglusterfs: close & open cmd_history.log on log rotate) posted (#7) for review on master by Gaurav Kumar Garg (ggarg@redhat.com)
Comment 4 Vijay Bellur 2016-02-01 02:49:59 EST
REVIEW: http://review.gluster.org/12832 (libglusterfs: close & open cmd_history.log on log rotate) posted (#8) for review on master by Gaurav Kumar Garg (ggarg@redhat.com)
Comment 5 Vijay Bellur 2016-02-04 16:51:57 EST
COMMIT: http://review.gluster.org/12832 committed in master by Niels de Vos (ndevos@redhat.com) 
------
commit 8fdfa0c17cf492f39e675f7502596754f6e5aeb4
Author: Gaurav Kumar Garg <garg.gaurav52@gmail.com>
Date:   Tue Dec 1 14:23:08 2015 +0530

    libglusterfs: close & open cmd_history.log on log rotate
    
    Post log rotate, cmd_history.log is not refreshed (closed & opened back)
    due to which new commands still land up in the log rotated file.
    
    Fix is to close and open cmd_history.log file upon log rotation
    
    Change-Id: Ie6990c9d55b0afa544bc5c84de3db49ff4b1299b
    BUG: 1286959
    Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com>
    Reviewed-on: http://review.gluster.org/12832
    Smoke: Gluster Build System <jenkins@build.gluster.com>
    CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
    Reviewed-by: Niels de Vos <ndevos@redhat.com>
    NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Comment 6 Vijay Bellur 2016-03-28 01:24:15 EDT
REVIEW: http://review.gluster.org/13829 (libglusterfs: open cmd_history log file with O_APPEND) posted (#1) for review on master by Atin Mukherjee (amukherj@redhat.com)
Comment 7 Vijay Bellur 2016-03-29 01:08:52 EDT
REVIEW: http://review.gluster.org/13829 (libglusterfs: open cmd_history log file with O_APPEND and O_RDWR) posted (#2) for review on master by Atin Mukherjee (amukherj@redhat.com)
Comment 8 Vijay Bellur 2016-03-29 05:15:34 EDT
REVIEW: http://review.gluster.org/13829 (libglusterfs: open cmd_history log file with O_APPEND and O_WRONLY) posted (#3) for review on master by Atin Mukherjee (amukherj@redhat.com)
Comment 9 Vijay Bellur 2016-03-29 15:10:50 EDT
COMMIT: http://review.gluster.org/13829 committed in master by Jeff Darcy (jdarcy@redhat.com) 
------
commit 207289621f6c5b75bdb80aa14ddaf72efd5eb9b1
Author: Atin Mukherjee <amukherj@redhat.com>
Date:   Mon Mar 28 10:49:43 2016 +0530

    libglusterfs: open cmd_history log file with O_APPEND and O_WRONLY
    
    Commit 8fdfa0c introduced a fix to ensure cmd_history file is log rotated
    properly. However with this fix fdopen() is called with mode "a" on a fd which
    was not opened with O_WRONLY & O_APPEND resulting into a fdopen() failure.
    
    Fix is to open cmd_history.log file with O_CREATE|O_WRONLY|O_APPEND mode
    
    Change-Id: I75ef350560aa6d5435c78c5fd83adfde1a73bfc3
    BUG: 1286959
    Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
    Reviewed-on: http://review.gluster.org/13829
    Smoke: Gluster Build System <jenkins@build.gluster.com>
    Reviewed-by: Niels de Vos <ndevos@redhat.com>
    NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
    CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Comment 12 Niels de Vos 2016-06-16 09:47:31 EDT
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.8.0, please open a new bug report.

glusterfs-3.8.0 has been announced on the Gluster mailinglists [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://blog.gluster.org/2016/06/glusterfs-3-8-released/
[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.