Bug 1276219 - [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 ERRATA
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: glusterd (Show other bugs)
3.1
x86_64 Linux
unspecified Severity high
: ---
: RHGS 3.1.3
Assigned To: Satish Mohan
Byreddy
glusterd
: ZStream
Depends On: 1286959 1304963
Blocks: 1299184
  Show dependency treegraph
 
Reported: 2015-10-29 02:49 EDT by Byreddy
Modified: 2016-06-29 00:47 EDT (History)
8 users (show)

See Also:
Fixed In Version: glusterfs-3.7.9-1
Doc Type: Bug Fix
Doc Text:
The cmd_history.log file was not being refreshed after a log rotation. This meant that new commands appeared in the log file that was rotated out, instead of in the new cmd_history.log file. This update ensures that the cmd_history.log file is closed and reopened upon rotation, so that new commands appear in the correct log file.
Story Points: ---
Clone Of:
: 1286959 (view as bug list)
Environment:
Last Closed: 2016-06-23 00:55:48 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)
Description Byreddy 2015-10-29 02:49:44 EDT
Description of problem:
-----------------------
After cmd_history log file got rotate, the next executed gluster commands are not present in the latest cmd_history.log file.


Version-Release number of selected component (if applicable):
-------------------------------------------------------------
glusterfs-3.7.5-0.3


How reproducible:
-----------------
Always and 
Observed this issue on two nodes.


Steps to Reproduce:
-------------------
1.Once cmd_history.log file got rotated.
2.Execute the new gluster commands 
3.Check the commands executed in step-2 are present in cmd_history.log file (/var/log/glusterfs/cmd_history.log)

Actual results:
---------------
After log rotate, next executed gluster commands are not present in the latest cmd_history.log file

Expected results:
-----------------
After log rotate, next executed gluster commands should present in the latest cmd_history.log file

Additional info:
Comment 2 Atin Mukherjee 2015-10-29 23:25:53 EDT
Aren't you able to see none of the gluster CLI commands or few of them?
Comment 3 Byreddy 2015-10-29 23:33:48 EDT
(In reply to Atin Mukherjee from comment #2)
> Aren't you able to see none of the gluster CLI commands or few of them?

Only empty cmd_history.log file  i saw after log rotate.
Comment 4 Atin Mukherjee 2015-10-30 00:43:34 EDT
What all gluster commands were run post upgrade? The reason I am asking all these questions is because not all of the gluster cli commands are logged in cmd_history log file.
Comment 5 Byreddy 2015-11-01 23:27:04 EST
(In reply to Atin Mukherjee from comment #4)
> What all gluster commands were run post upgrade? The reason I am asking all
> these questions is because not all of the gluster cli commands are logged in
> cmd_history log file.

1. All volume type creation.
2. New peer probe
3. Brick add, remove, replace
4. Volume delete
Comment 6 Gaurav Kumar Garg 2015-12-01 04:12:59 EST
upstream patch for this bug available: http://review.gluster.org/#/c/12832/
Comment 7 SATHEESARAN 2016-01-27 05:03:10 EST
Changing the bug state to POST as the patch is available upstream as seen in comment6
Comment 9 Atin Mukherjee 2016-03-22 08:12:17 EDT
The fix is now available in rhgs-3.1.3 branch, hence moving the state to Modified.
Comment 11 Byreddy 2016-04-11 00:41:03 EDT
Verification of this bug depends on the Fix of BZ-1321509..
Comment 12 Byreddy 2016-05-02 00:40:04 EDT
Verified this bug  using the build "glusterfs-3.7.9-2".

Fix is working good, after log rotate(cmd_history file),next executed commands  are populating to the new log file.


Moving to verified state.
Comment 15 Atin Mukherjee 2016-06-09 00:30:27 EDT
LGTM :)
Comment 17 errata-xmlrpc 2016-06-23 00:55:48 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1240

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