[sos] Silence 'could not run' messages at default verbosity

Bryn Reeves bmr at fedoraproject.org
Mon Jun 10 18:55:33 UTC 2013


commit f0734ee1c844c7b09bd6ac1d9eec39d1c5e1464d
Author: Bryn M. Reeves <bmr at redhat.com>
Date:   Mon Jun 10 19:54:45 2013 +0100

    Silence 'could not run' messages at default verbosity

 sos-silence-could-not-run.patch |   24 +++++
 sos.spec                        |  178 +-------------------------------------
 2 files changed, 29 insertions(+), 173 deletions(-)
---
diff --git a/sos-silence-could-not-run.patch b/sos-silence-could-not-run.patch
new file mode 100644
index 0000000..1bb0d97
--- /dev/null
+++ b/sos-silence-could-not-run.patch
@@ -0,0 +1,24 @@
+commit f81df25a32ff525f965a52581711ff06563166b5
+Author: Bryn M. Reeves <bmr at redhat.com>
+Date:   Mon Jun 10 19:50:28 2013 +0100
+
+    Reduce level of 'could not run' messages info->debug
+    
+    We expect not to find all commands; don't output a log message on
+    each missing binary.
+    
+    Signed-off-by: Bryn M. Reeves <bmr at redhat.com>
+
+diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py
+index 70711a3..e25f035 100644
+--- a/sos/plugins/__init__.py
++++ b/sos/plugins/__init__.py
+@@ -543,7 +543,7 @@ class Plugin(object):
+         # pylint: disable-msg = W0612
+         status, shout, runtime = sos_get_command_output(exe, timeout=timeout)
+         if (status == 127):
+-            self.soslog.info("could not run '%s': command not found" % exe)
++            self.soslog.debug("could not run '%s': command not found" % exe)
+             return None
+ 
+         if suggest_filename:
diff --git a/sos.spec b/sos.spec
index 6281395..a6d74c8 100644
--- a/sos.spec
+++ b/sos.spec
@@ -3,7 +3,7 @@
 Summary: A set of tools to gather troubleshooting information from a system
 Name: sos
 Version: 3.0
-Release: 1%{?dist}
+Release: 2%{?dist}
 Group: Applications/System
 Source0: https://people.redhat.com/breeves/sos/releases/sos-3.0.tar.gz
 License: GPLv2+
@@ -17,6 +17,7 @@ Requires: rpm-python
 Requires: tar
 Requires: bzip2
 Requires: xz
+Patch0: sos-silence-could-not-run.patch
 
 %description
 Sos is a set of tools that gathers information about system
@@ -26,7 +27,7 @@ support technicians and developers.
 
 %prep
 %setup -q
-
+%patch0 -p1
 %build
 make
 
@@ -49,305 +50,176 @@ rm -rf ${RPM_BUILD_ROOT}
 %config(noreplace) %{_sysconfdir}/sos.conf
 
 %changelog
-* Mon Jun 10 2013 Bryn M. Reeves <bmr at redhat.com> = 3.0-1
+* Mon Jun 10 2013 Bryn M. Reeves <bmr at redhat.com> = 3.0-2
+- Silence 'could not run' messages at default verbosity
 - New upstream release
 
 * Thu May 23 2013 Bryn M. Reeves <bmr at redhat.com> = 2.2-39
 - Always invoke tar with '-f-' option
-  Resolves: bz966602
 
 * Mon Jan 21 2013 Bryn M. Reeves <bmr at redhat.com> = 2.2-38
 - Fix interactive mode regression when --ticket unspecified
-  Resolves: bz822113
 
 * Fri Jan 18 2013 Bryn M. Reeves <bmr at redhat.com> = 2.2-37
 - Fix propagation of --ticket parameter in interactive mode
-  Resolves: bz822113
 
 * Thu Jan 17 2013 Bryn M. Reeves <bmr at redhat.com> = 2.2-36
 - Revert OpenStack patch
-  Resolves: bz840057
 
 * Wed Jan  9 2013 Bryn M. Reeves <bmr at redhat.com> = 2.2-35
 - Report --name and --ticket values as defaults
-  Resolves: bz822113
 - Fix device-mapper command execution logging
-  Resolves: bz824378
 - Fix data collection and rename PostreSQL module to pgsql
-  Resolves: bz852049
 
 * Fri Oct 19 2012 Bryn M. Reeves <bmr at redhat.com> = 2.2-34
 - Add support for content delivery hosts to RHUI module
-  Resolves: bz821323
 
 * Thu Oct 18 2012 Bryn M. Reeves <bmr at redhat.com> = 2.2-33
 - Add Red Hat Update Infrastructure module
-  Resolves: bz821323
 - Collect /proc/iomem in hardware module
-  Resolves: bz840975
 - Collect subscription-manager output in general module
-  Resolves: bz825968
 - Collect rhsm log files in general module
-  Resolves: bz826312
 - Fix exception in gluster module on non-gluster systems
-  Resolves: bz849546
 - Fix exception in psql module when dbname is not given
-  Resolves: bz852049
 
 * Wed Oct 17 2012 Bryn M. Reeves <bmr at redhat.com> = 2.2-32
 - Collect /proc/pagetypeinfo in memory module
-  Resolves: bz809727
 - Strip trailing newline from command output
-  Resolves: bz850433
 - Add sanlock module
-  Resolves: bz850779
 - Do not collect archived accounting files in psacct module
-  Resolves: bz850542
 - Call spacewalk-debug from rhn module to collect satellite data
-  Resolves: bz859142
 
 * Mon Oct 15 2012 Bryn M. Reeves <bmr at redhat.com> = 2.2-31
 - Avoid calling volume status when collecting gluster statedumps
-  Resolves: bz849546
 - Use a default report name if --name is empty
-  Resolves: bz822113
 - Quote tilde characters passed to shell in RPM module
-  Resolves: bz821005
 - Collect KDC and named configuration in ipa module
-  Resolves: bz825149
 - Sanitize hostname characters before using as report path
-  Resolves: bz822174
 - Collect /etc/multipath in device-mapper module
-  Resolves: bz817093
 - New plug-in for PostgreSQL
-  Resolves: bz852049
 - Add OpenStack module
-  Resolves: bz840057
 - Avoid deprecated sysctls in /proc/sys/net
-  Resolves: bz834594
 - Fix error logging when calling external programs
-  Resolves: bz824378
 - Use ip instead of ifconfig to generate network interface lists
-  Resolves: bz833170
 
 * Wed May 23 2012 Bryn M. Reeves <bmr at redhat.com> = 2.2-29
 - Collect the swift configuration directory in gluster module
-  Resolves: bz822442
 - Update IPA module and related plug-ins
-  Resolves: bz812395
 
 * Fri May 18 2012 Bryn M. Reeves <bmr at redhat.com> = 2.2-28
 - Collect mcelog files in the hardware module
-  Resolves: bz810702
 
 * Wed May 02 2012 Bryn M. Reeves <bmr at redhat.com> = 2.2-27
 - Add nfs statedump collection to gluster module
-  Resolves: bz752549
 
 * Tue May 01 2012 Bryn M. Reeves <bmr at redhat.com> = 2.2-26
 - Use wildcard to match possible libvirt log paths
-  Resolves: bz814474
 
 * Mon Apr 23 2012 Bryn M. Reeves <bmr at redhat.com> = 2.2-25
 - Add forbidden paths for new location of gluster private keys
-  Resolves: bz752549
 
 * Fri Mar  9 2012 Bryn M. Reeves <bmr at redhat.com> = 2.2-24
 - Fix katello and aeolus command string syntax
-  Resolves: bz752666
 - Remove stray hunk from gluster module patch
-  Resolves: bz784061
 
 * Thu Mar  8 2012 Bryn M. Reeves <bmr at redhat.com> = 2.2-22
 - Correct aeolus debug invocation in CloudForms module
-  Resolves: bz752666
 - Update gluster module for gluster-3.3
-  Resolves: bz784061
 - Add additional command output to gluster module
-  Resolves: bz768641
 - Add support for collecting gluster configuration and logs
-  Resolves: bz752549
 
 * Wed Mar  7 2012 Bryn M. Reeves <bmr at redhat.com> = 2.2-19
 - Collect additional diagnostic information for realtime systems
-  Resolves: bz789096
 - Improve sanitization of RHN user and case number in report name
-  Resolves: bz771393
 - Fix verbose output and debug logging
-  Resolves: bz782339 
 - Add basic support for CloudForms data collection
-  Resolves: bz752666
 - Add support for Subscription Asset Manager diagnostics
-  Resolves: bz752670
 
 * Tue Mar  6 2012 Bryn M. Reeves <bmr at redhat.com> = 2.2-18
 - Collect fence_virt.conf in cluster module
-  Resolves: bz760995
 - Fix collection of /proc/net directory tree
-  Resolves: bz730641
 - Gather output of cpufreq-info when present
-  Resolves: bz760424
 - Fix brctl showstp output when bridges contain multiple interfaces
-  Resolves: bz751273
 - Add /etc/modprobe.d to kernel module
-  Resolves: bz749919
 - Ensure relative symlink targets are correctly handled when copying
-  Resolves: bz782589
 - Fix satellite and proxy package detection in rhn plugin
-  Resolves: bz749262
 - Collect stderr output from external commands
-  Resolves: bz739080
 - Collect /proc/cgroups in the cgroups module
   Resolve: bz784874
 - Collect /proc/irq in the kernel module
-  Resolves: bz784862
 - Fix installed-rpms formatting for long package names
-  Resolves: bz767827
 - Add symbolic links for truncated log files
-  Resolves: bz766583
 - Collect non-standard syslog and rsyslog log files
-  Resolves: bz771501
 - Use correct paths for tomcat6 in RHN module
-  Resolves: bz749279
 - Obscure root password if present in anacond-ks.cfg
-  Resolves: bz790402
 - Do not accept embedded forward slashes in RHN usernames
-  Resolves: bz771393
 - Add new sunrpc module to collect rpcinfo for gluster systems
-  Resolves: bz784061
 
 * Tue Nov  1 2011 Bryn M. Reeves <bmr at redhat.com> = 2.2-17
 - Do not collect subscription manager keys in general plugin
-  Resolves: bz750607
  
 * Fri Sep 23 2011 Bryn M. Reeves <bmr at redhat.com> = 2.2-16
 - Fix execution of RHN hardware.py from hardware plugin
-  Resolves: bz736718
 - Fix hardware plugin to support new lsusb path
-  Resolves: bz691477
 
 * Fri Sep 09 2011 Bryn M. Reeves <bmr at redhat.com> = 2.2-15
 - Fix brctl collection when a bridge contains no interfaces
-  Resolves: bz697899
 - Fix up2dateclient path in hardware plugin
-  Resolves: bz736718
 
 * Mon Aug 15 2011 Bryn M. Reeves <bmr at redhat.com> = 2.2-14
 - Collect brctl show and showstp output
-  Resolves: bz697899
 - Collect nslcd.conf in ldap plugin
-  Resolves: bz682124
 
 * Sun Aug 14 2011 Bryn M. Reeves <bmr at redhat.com> = 2.2-11
 - Truncate files that exceed specified size limit
-  Resolves: bz683219
 - Add support for collecting Red Hat Subscrition Manager configuration
-  Resolves: bz714293
 - Collect /etc/init on systems using upstart
-  Resolves: bz694813
 - Don't strip whitespace from output of external programs
-  Resolves: bz713449
 - Collect ipv6 neighbour table in network module
-  Resolves: bz721163
 - Collect basic cgroups configuration data
-  Resolves: bz729455
 
 * Sat Aug 13 2011 Bryn M. Reeves <bmr at redhat.com> = 2.2-10
 - Fix collection of data from LVM2 reporting tools in devicemapper plugin
-  Resolves: bz704383
 - Add /proc/vmmemctl collection to vmware plugin
-  Resolves: bz709491
 
 * Fri Aug 12 2011 Bryn M. Reeves <bmr at redhat.com> = 2.2-9
 - Collect yum repository list by default
-  Resolves: bz600813
 - Add basic Infiniband plugin
-  Resolves: bz673244
 - Add plugin for scsi-target-utils iSCSI target
-  Resolves: bz677124
 - Fix autofs plugin LC_ALL usage
-  Resolves: bz683404
 - Fix collection of lsusb and add collection of -t and -v outputs
-  Resolves: bz691477
 - Extend data collection by qpidd plugin
-  Resolves: bz726360
 - Add ethtool pause, coalesce and ring (-a, -c, -g) options to network plugin
-  Resolves: bz726427
 
 * Thu Apr 07 2011 Bryn M. Reeves <bmr at redhat.com> = 2.2-8
 - Use sha256 for report digest when operating in FIPS mode
-  Resolves: bz689387
  
 * Tue Apr 05 2011 Bryn M. Reeves <bmr at redhat.com> = 2.2-7
 - Fix parted and dumpe2fs output on s390
-  Resolves: bz622784
 
 * Fri Feb 25 2011 Bryn M. Reeves <bmr at redhat.com> = 2.2-6
 - Fix collection of chkconfig output in startup.py
-  Resolves: bz659467
 - Collect /etc/dhcp in dhcp.py plugin
-  Resolves: bz676522
 - Collect dmsetup ls --tree output in devicemapper.py
-  Resolves: bz675559
 - Collect lsblk output in filesys.py
-  Resolves: bz679433
 
 * Thu Feb 24 2011 Bryn M. Reeves <bmr at redhat.com> = 2.2-4
 - Fix collection of logs and config files in sssd.py
-  Resolves: bz624162
 - Add support for collecting entitlement certificates in rhn.py
-  Resolves: bz678665
 
 * Thu Feb 03 2011 Bryn M. Reeves <bmr at redhat.com> = 2.2-3
 - Fix cluster plugin dlm lockdump for el6
-  Resolves: bz622407
 - Add sssd plugin to collect configuration and logs
-  Resolves: bz624162
 - Collect /etc/anacrontab in system plugin
-  Resolves: bz622527
 - Correct handling of redhat-release for el6
-  Resolves: bz622528
 
 * Thu Jul 29 2010 Adam Stokes <ajs at redhat dot com> = 2.2-2
-- Resolves: bz582259
-- Resolves: bz585942
-- Resolves: bz584253
-- Resolves: bz581817
 
 * Thu Jun 10 2010 Adam Stokes <ajs at redhat dot com> = 2.2-0
-- Resolves: bz581921
-- Resolves: bz584253
-- Resolves: bz562651
-- Resolves: bz566170
-- Resolves: bz586450
-- Resolves: bz588223
-- Resolves: bz559737
-- Resolves: bz586405
-- Resolves: bz598978
-- Resolves: bz584763
 
 * Wed Apr 28 2010 Adam Stokes <ajs at redhat dot com> = 2.1-0
-- Resolves: bz585923
-- Resolves: bz585942
-- Resolves: bz586409
-- Resolves: bz586389
-- Resolves: bz548096
-- Resolves: bz557828
-- Resolves: bz563637
-- Resolves: bz584253
-- Resolves: bz462823
-- Resolves: bz528881
-- Resolves: bz566170
-- Resolves: bz578787
-- Resolves: bz581817
-- Resolves: bz581826
-- Resolves: bz584695
-- Resolves: bz568637
-- Resolves: bz584767
-- Resolves: bz586370
 
 * Mon Apr 12 2010 Adam Stokes <ajs at redhat dot com> = 2.0-0
-- Resolves: bz580015
 
 * Tue Mar 30 2010 Adam Stokes <ajs at redhat dot com> = 1.9-3
 - fix setup.py to autocompile translations and man pages
@@ -416,27 +288,8 @@ rm -rf ${RPM_BUILD_ROOT}
 - reworked Makefile to build properly
 
 * Thu Oct 23 2008 Adam Stokes <astokes at redhat dot com> - 1.8-1
-- Resolves: bz459845 collect krb5.conf
-- Resolves: bz457880 include output of xm list and xm list --long
-- Resolves: bz457919 add support for openswan and ipsec-tools
-- Resolves: bz456378 capture elilo configuration
-- Resolves: bz445007 s390 support
-- Resolves: bz371251 hangs when running with a xen kernel where xend has not been started
-- Resolves: bz452705 Add /root/anaconda-ks-cfg to sosreport archive
-- Resolves: bz445510 Do not rely on env to execute python
-- Resolves: bz446868 add support for emc devices
-- Resolves: bz453797 fails to generate fdisk -l
-- Resolves: bz433183 does not collect ext3 information
-- Resolves: bz444838 systool is passed deprecated arguments
-- Resolves: bz455096 add %{INSTALLTIME:date} to rpm --qf collection
-- Resolves: bz332211 avoid hazardous filenames
 
 * Wed Nov 21 2007 Navid Sheikhol-Eslami <navid at redhat dot com> - 1.8-0
-- Resolves: bz368261 sosGetCommandOutput() does not block on hung processes
-- Resolves: bz361861 work-around missing traceback.format_exc() in RHEL4
-- Resolves: bz394781 device-mapper: use /sbin/lvm_dump to collect dm related info
-- Resolves: bz386691 unattended --batch option
-- Resolves: bz371251 sos could hang when accessing /sys/hypervisor/uuid
 - selinux: always collect sestatus
 - added many languages
 - added --debug option which causes exceptions not to be trapped
@@ -472,7 +325,6 @@ rm -rf ${RPM_BUILD_ROOT}
 - simply collect output of fdisk -l in one go
 - handle sysreport invocation properly (warn if shell is interactive, otherwise spawn sysreport.legacy)
 - progress bar don't show 100% until finished() is called
-- Resolves: bz238778 added lspci -t
 - now runs on RHEL3 as well (python 2.2)
 - replaced commonPrefix() with faster code
 - filesys: one fdisk -l for all
@@ -482,15 +334,11 @@ rm -rf ${RPM_BUILD_ROOT}
 - systemtap: cleaned up and added checkenabled() method
 - added kdump plugin
 - added collection of /etc/inittab
-- Resolves: bz332151 apply regex to case number in sysreport for RHEL4
-- Resolves: bz332211 apply regex to case number in sysreport for RHEL5
-- Resolves: bz400111 sos incorrectly reports cluster data in SMP machine
 
 * Wed Aug 13 2007 Navid Sheikhol-Eslami <navid at redhat dot com> - 1.7-8
 - added README.rh-upload-core
 
 * Mon Aug 13 2007 Navid Sheikhol-Eslami <navid at redhat dot com> - 1.7-7
-- Resolves: bz251927 SOS errata needs to be respin to match 4.6 code base
 - added extras/rh-upload-core script from David Mair <dmair at redhat.com>
 
 * Mon Aug  9 2007 Navid Sheikhol-Eslami <navid at redhat dot com> - 1.7-6
@@ -504,11 +352,6 @@ rm -rf ${RPM_BUILD_ROOT}
 - added some commands in cluster and process plugins
 - fixed html output (wrong links to cmds, thanks streeter)
 - process: back down sleep if D state doesn't change
-- Resolves: bz241277 Yum Plugin for sos
-- Resolves: bz247520 Spelling mistake in sosreport output
-- Resolves: bz247531 Feature: plugin to gather initial ramdisk scripts
-- Resolves: bz248252 sos to support language localization
-- Resolves: bz241282 Make SOS for RHEL 4
 
 * Mon Aug  1 2007 Navid Sheikhol-Eslami <navid at redhat dot com> - 1.7-4
 - catch KeyboardInterrupt when entering sosreport name
@@ -569,7 +412,6 @@ rm -rf ${RPM_BUILD_ROOT}
 - Beautified output of --list-plugins.
 - GPL licence is now included in the package.
 - added python-devel requirement for building package
-- Resolves: bz241282 fixed incompatibility with python from RHEL4
 
 * Fri May 25 2007 Steve Conklin <sconklin at redhat dot com> - 1.5-1
 - Bumped version
@@ -588,16 +430,6 @@ rm -rf ${RPM_BUILD_ROOT}
 
 * Mon Apr 16 2007 Steve Conklin <sconklin at redhat dot com> - 1.3-3
 - including patches to fix the following:
-- Resolves: bz219745 sosreport needs a man page
-- Resolves: bz219667 sosreport does not terminate cleanly on ^C
-- Resolves: bz233375 Make SOS flag the situation when running on a fully virtu...
-- Resolves: bz234873 rhel5 sos needs to include rpm-va by default
-- Resolves: bz219669 sosreport multi-threaded option sometimes fails
-- Resolves: bz219671 RFE for sosreport - allow specification of plugins to be run
-- Resolves: bz219672 RFE - show progress while sosreport is running
-- Resolves: bz219673 Add xen information gathering to sosreport
-- Resolves: bz219675 Collect information related to the new driver update model
-- Resolves: bz219877 'Cancel' button during option selection only cancels sele...
 
 * Tue Feb 20 2007 John Berninger <jwb at redhat dot com> - 1.3-2
 - Add man page


More information about the scm-commits mailing list