Bug 1419277 - sosreport --log-size is ignored for glusterfs module
Summary: sosreport --log-size is ignored for glusterfs module
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: sos
Version: rhgs-3.1
Hardware: Unspecified
OS: Linux
high
high
Target Milestone: ---
: ---
Assignee: Bug Updates Notification Mailing List
QA Contact: Rahul Hinduja
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-04 18:16 UTC by Chris Blum
Modified: 2018-10-11 10:17 UTC (History)
5 users (show)

Fixed In Version: RHGS-3.3.1 & RHEL-7.4
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-11 10:17:19 UTC
Embargoed:


Attachments (Terms of Use)

Description Chris Blum 2017-02-04 18:16:58 UTC
Description of problem:
When generating sosreports it is sometimes needed to limit the amount of log files gathered. sosreport thus has the --log-size option to limit the amount of MB per module.
Apparently in the current version, --log-size is not effective:


	[vagrant@RHGS1 ~]$ sudo sosreport --build --batch --verbose --only-plugins "gluster" --log-size=1

	sosreport (version 3.2)

	This command will collect diagnostic and configuration information from
	this Red Hat Enterprise Linux system and installed applications.

	An archive containing the collected information will be generated in
	/var/tmp/sos.XlHmjN and may be provided to a Red Hat support
	representative.

	Any information provided to Red Hat will be treated in accordance with
	the published support policies at:

	  https://access.redhat.com/support/

	The generated archive may contain data considered sensitive and its
	content should be reviewed by the originating organization before being
	passed to any third party.

	No changes will be made to system configuration.


	 Setting up archive ...
	[archive:TarFileArchive] initialised empty FileCacheArchive at '/var/tmp/sos.XlHmjN/sosreport-RHGS1-20170204130459'
	[sos.sosreport:setup] executing 'sosreport --build --batch --verbose --only-plugins gluster --log-size=1'
	 Setting up plugins ...
	[plugin:gluster] added cmd output 'gluster peer status'
	[plugin:gluster] added copyspec '['/etc/redhat-storage-release']'
	[plugin:gluster] added copyspec '['/etc/swift/']'
	[plugin:gluster] added copyspec '[]'
	[plugin:gluster] added copyspec '['/etc/glusterfs']'
	[plugin:gluster] added copyspec '['/var/lib/glusterd/']'
	[plugin:gluster] added copyspec '['/var/log/glusterfs']'
	[plugin:gluster] added copyspec '['/tmp/glusterdump.options']'
	[plugin:gluster] added copyspec '['/tmp/glusterfs-statedumps']'
	[plugin:gluster] added cmd output 'gluster volume geo-replication  rep01 status'
	[plugin:gluster] added cmd output 'gluster volume status'
	 Running plugins. Please wait ...

	  Running 1/1: gluster...
	[plugin:gluster] collecting path '/var/lib/glusterd/'
	[plugin:gluster] collecting path '/etc/glusterfs'
	[plugin:gluster] collecting path '/var/log/glusterfs'
	[plugin:gluster] collecting path '/tmp/glusterfs-statedumps'
	[plugin:gluster] collecting path '/etc/swift/'
	[plugin:gluster] collecting path '/tmp/glusterdump.options'
	[plugin:gluster] collecting path '/etc/redhat-storage-release'
	[plugin:gluster] collecting output of 'gluster peer status'
	[plugin:gluster] collecting output of 'gluster volume geo-replication  rep01 status'
	[plugin:gluster] collecting output of 'gluster volume status'


	sosreport build tree is located at : /var/tmp/sosreport-RHGS1-20170204130459


	[vagrant@RHGS1 ~]$ cd /var/tmp/sosreport-RHGS1-20170204130459
	-bash: cd: /var/tmp/sosreport-RHGS1-20170204130459: Permission denied
	[vagrant@RHGS1 ~]$ sudo su
	[root@RHGS1 vagrant]# cd /var/tmp/sosreport-RHGS1-20170204130459
	[root@RHGS1 sosreport-RHGS1-20170204130459]# ls
	etc  sos_commands  sos_logs  sos_reports  tmp  usr  var  version.txt
	[root@RHGS1 sosreport-RHGS1-20170204130459]# cd sos_commands/gluster/gluster_
	gluster_peer_status                          gluster_volume_geo-replication_rep01_status  gluster_volume_info                          gluster_volume_status
	[root@RHGS1 sosreport-RHGS1-20170204130459]# cd var/log/glusterfs/
	bricks/                         cli.log                         cmd_history.log                 etc-glusterfs-glusterd.vol.log  glustershd.log                  nfs.log                         rhs-client-rep01.log
	[root@RHGS1 sosreport-RHGS1-20170204130459]# cd var/log/glusterfs/
	[root@RHGS1 glusterfs]# du -sh *
	136K	bricks
	8.0K	cli.log
	4.0K	cmd_history.log
	5.6M	etc-glusterfs-glusterd.vol.log
	12K	glustershd.log
	12K	nfs.log
	5.8M	rhs-client-rep01.log

Version-Release number of selected component (if applicable):
This is just an example on RHEL 7 but could also be reproduced on RHEL 6
	[root@RHGS1 glusterfs]# cat /etc/redhat-release
	Red Hat Enterprise Linux Server release 7.2 (Maipo)
	[root@RHGS1 glusterfs]# cat /etc/redhat-storage-release
	Red Hat Gluster Storage Server 3.1 Update 3
	[root@RHGS1 glusterfs]# rpm -qi sos
	Name        : sos
	Version     : 3.2
	Release     : 35.el7_2.3
	Architecture: noarch
	Install Date: Fri 03 Feb 2017 06:56:59 PM EST
	Group       : Applications/System
	Size        : 1117329
	License     : GPLv2+
	Signature   : RSA/SHA256, Tue 09 Feb 2016 09:46:14 AM EST, Key ID 199e2f91fd431d51
	Source RPM  : sos-3.2-35.el7_2.3.src.rpm
	Build Date  : Thu 14 Jan 2016 04:27:33 AM EST
	Build Host  : x86-035.build.eng.bos.redhat.com
	Relocations : (not relocatable)
	Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
	Vendor      : Red Hat, Inc.
	URL         : http://github.com/sosreport/sos
	Summary     : A set of tools to gather troubleshooting information from a system
	Description :
	Sos is a set of tools that gathers information about system
	hardware and configuration. The information can then be used for
	diagnostic purposes and debugging. Sos is commonly used to help
	support technicians and developers.

How reproducible:
Always

Steps to Reproduce:
1. Collect logs of more than 1MB in size (total)
2. Execute 'sudo sosreport --build --batch --verbose --only-plugins "gluster" --log-size=1'
3. Check amount of logs in the var/log/glusterfs path inside of the sosreport

Actual results:
More than 1MB of log files were collected

Expected results:
Only 1MB of logs should be collected

Additional info:

Comment 4 Bryn M. Reeves 2017-06-28 12:28:47 UTC
Log size limiting for the gluster plugin is supported in sos since upstream release 3.3 (rhel-7.4).

Comment 5 Bryn M. Reeves 2017-06-28 12:29:42 UTC
correction: 3.3 was shipped in rhel-7.3. The rhel-7.4 release will include sos-3.4.

Comment 6 Amar Tumballi 2018-04-02 13:40:39 UTC
As per the comment of Bryn, closing it as CURRENT RELEASE.

Comment 7 Amar Tumballi 2018-04-02 14:38:44 UTC
Putting it back on ON_QA for validation.

Comment 9 Amar Tumballi 2018-10-11 10:17:19 UTC
works with rhel 7.4+


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