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.
Summary: [GlusterD]: After log rotate of cmd_history.log file, the next executed glus...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: glusterd
Version: rhgs-3.1
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
: RHGS 3.1.3
Assignee: Satish Mohan
QA Contact: Byreddy
URL:
Whiteboard: glusterd
Depends On: 1286959 1304963
Blocks: 1299184
TreeView+ depends on / blocked
 
Reported: 2015-10-29 06:49 UTC by Byreddy
Modified: 2016-06-29 04:47 UTC (History)
8 users (show)

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.
Clone Of:
: 1286959 (view as bug list)
Environment:
Last Closed: 2016-06-23 04:55:48 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1240 0 normal SHIPPED_LIVE Red Hat Gluster Storage 3.1 Update 3 2016-06-23 08:51:28 UTC

Description Byreddy 2015-10-29 06:49:44 UTC
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-30 03:25:53 UTC
Aren't you able to see none of the gluster CLI commands or few of them?

Comment 3 Byreddy 2015-10-30 03:33:48 UTC
(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 04:43:34 UTC
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-02 04:27:04 UTC
(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 09:12:59 UTC
upstream patch for this bug available: http://review.gluster.org/#/c/12832/

Comment 7 SATHEESARAN 2016-01-27 10:03:10 UTC
Changing the bug state to POST as the patch is available upstream as seen in comment6

Comment 9 Atin Mukherjee 2016-03-22 12:12:17 UTC
The fix is now available in rhgs-3.1.3 branch, hence moving the state to Modified.

Comment 11 Byreddy 2016-04-11 04:41:03 UTC
Verification of this bug depends on the Fix of BZ-1321509..

Comment 12 Byreddy 2016-05-02 04:40:04 UTC
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 04:30:27 UTC
LGTM :)

Comment 17 errata-xmlrpc 2016-06-23 04:55:48 UTC
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.