New upstream release
Add sos-3.0.tar.gz to sources and lookaside cache Update spec file for 3.0 changes
This commit is contained in:
parent
2851ae29da
commit
2ba3b08fa5
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
sos-2.2.tar.gz
|
sos-2.2.tar.gz
|
||||||
|
/sos-3.0.tar.gz
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/devicemapper.py.orig sos-2.2/sos/plugins/devicemapper.py
|
|
||||||
--- sos-2.2/sos/plugins/devicemapper.py.orig 2011-08-13 13:45:57.508883390 +0100
|
|
||||||
+++ sos-2.2/sos/plugins/devicemapper.py 2011-08-13 13:47:19.384833623 +0100
|
|
||||||
@@ -34,12 +34,12 @@ class devicemapper(sos.plugintools.Plugi
|
|
||||||
self.collectExtOutput("/sbin/dmsetup status")
|
|
||||||
self.collectExtOutput("/sbin/dmsetup ls --tree")
|
|
||||||
|
|
||||||
- self.collectExtOutput("/usr/sbin/vgdisplay -vv", root_symlink = "vgdisplay")
|
|
||||||
- self.collectExtOutput("/usr/sbin/vgscan -vvv")
|
|
||||||
- self.collectExtOutput("/usr/sbin/pvscan -v")
|
|
||||||
- self.collectExtOutput("/usr/sbin/lvs -a -o +devices")
|
|
||||||
- self.collectExtOutput("/usr/sbin/pvs -a -v")
|
|
||||||
- self.collectExtOutput("/usr/sbin/vgs -v")
|
|
||||||
+ self.collectExtOutput("/sbin/vgdisplay -vv", root_symlink = "vgdisplay")
|
|
||||||
+ self.collectExtOutput("/sbin/vgscan -vvv")
|
|
||||||
+ self.collectExtOutput("/sbin/pvscan -v")
|
|
||||||
+ self.collectExtOutput("/sbin/lvs -a -o +devices")
|
|
||||||
+ self.collectExtOutput("/sbin/pvs -a -v")
|
|
||||||
+ self.collectExtOutput("/sbin/vgs -v")
|
|
||||||
self.collectExtOutput("/sbin/mdadm -D /dev/md*")
|
|
||||||
|
|
||||||
self.addCopySpec("/etc/lvm")
|
|
@ -1,18 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/vmware.py.orig sos-2.2/sos/plugins/vmware.py
|
|
||||||
--- sos-2.2/sos/plugins/vmware.py.orig 2011-08-13 12:57:46.112712491 +0100
|
|
||||||
+++ sos-2.2/sos/plugins/vmware.py 2011-08-13 13:00:22.064760692 +0100
|
|
||||||
@@ -19,7 +19,7 @@ class vmware(sos.plugintools.PluginBase)
|
|
||||||
"""VMWare related information
|
|
||||||
"""
|
|
||||||
def checkenabled(self):
|
|
||||||
- if os.path.exists("/usr/bin/vmware"):
|
|
||||||
+ if os.path.exists("/usr/bin/vmware") or os.path.exists("/usr/init.d/vmware-tools"):
|
|
||||||
return True
|
|
||||||
return False
|
|
||||||
|
|
||||||
@@ -27,4 +27,5 @@ class vmware(sos.plugintools.PluginBase)
|
|
||||||
self.collectExtOutput("/usr/bin/vmware -v")
|
|
||||||
self.addCopySpec("/etc/vmware/locations")
|
|
||||||
self.addCopySpec("/etc/vmware/config")
|
|
||||||
+ self.addCopySpec("/proc/vmmemctl")
|
|
||||||
return
|
|
@ -1,34 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/cluster.py.bz582259 sos-2.2/sos/plugins/cluster.py
|
|
||||||
--- sos-2.2/sos/plugins/cluster.py.bz582259 2010-07-29 11:34:08.904167916 -0400
|
|
||||||
+++ sos-2.2/sos/plugins/cluster.py 2010-07-29 11:34:23.483159810 -0400
|
|
||||||
@@ -34,7 +34,8 @@ class cluster(sos.plugintools.PluginBase
|
|
||||||
"gfs-utils", "gnbd", "kmod-gfs", "kmod-gnbd", "lvm2-cluster", "gfs2-utils" ]
|
|
||||||
|
|
||||||
elif rhelver == 6:
|
|
||||||
- self.packages = [ "luci", "ricci" ]
|
|
||||||
+ self.packages = [ "ricci", "corosync", "openais",
|
|
||||||
+ "cman", "clusterlib", "fence-agents" ]
|
|
||||||
|
|
||||||
self.files = [ "/etc/cluster/cluster.conf" ]
|
|
||||||
return sos.plugintools.PluginBase.checkenabled(self)
|
|
||||||
@@ -69,6 +70,10 @@ class cluster(sos.plugintools.PluginBase
|
|
||||||
serv_check.extend( [ "cman", "rgmanager" ] )
|
|
||||||
if self.has_gfs():
|
|
||||||
serv_check.extend( ["gfs", "clvmd"] )
|
|
||||||
+ elif rhelver == 6:
|
|
||||||
+ serv_check.extend( [ "fenced", "corosync", "dlm_controld"] )
|
|
||||||
+ if self.has_gfs():
|
|
||||||
+ serv_check.extend( ["gfs_controld"] )
|
|
||||||
|
|
||||||
# check that kernel module packages are installed for
|
|
||||||
# running kernel version
|
|
||||||
@@ -156,7 +161,8 @@ class cluster(sos.plugintools.PluginBase
|
|
||||||
self.addDiagnose("one or more nodes have manual fencing agent configured (data integrity is not guaranteed)")
|
|
||||||
|
|
||||||
# if fence_ilo or fence_drac, make sure acpid is not running
|
|
||||||
- ret, hostname, time = self.callExtProg("/bin/uname -n").split(".")[0]
|
|
||||||
+ ret, hostname, time = self.callExtProg("/bin/uname -n")
|
|
||||||
+ hostname = hostname.split(".")[0]
|
|
||||||
if len(xpathContext.xpathEval('/cluster/clusternodes/clusternode[@name = "%s" and /cluster/fencedevices/fencedevice[@agent="fence_rsa" or @agent="fence_drac"]/@name=fence/method/device/@name]' % hostname )):
|
|
||||||
ret, out, time = self.callExtProg("/sbin/service acpid status")
|
|
||||||
if ret == 0 or self.policy().runlevelDefault() in self.policy().runlevelByService("acpid"):
|
|
@ -1,47 +0,0 @@
|
|||||||
diff -up sos-2.2/Makefile.bz585942 sos-2.2/Makefile
|
|
||||||
--- sos-2.2/Makefile.bz585942 2010-07-29 11:41:52.260909433 -0400
|
|
||||||
+++ sos-2.2/Makefile 2010-07-29 11:41:56.277909635 -0400
|
|
||||||
@@ -37,6 +37,7 @@ install:
|
|
||||||
install -m644 LICENSE README TODO $(DESTDIR)/usr/share/$(NAME)/.
|
|
||||||
install -m644 $(NAME).conf $(DESTDIR)/etc/$(NAME).conf
|
|
||||||
install -m644 gpgkeys/rhsupport.pub $(DESTDIR)/usr/share/$(NAME)/.
|
|
||||||
+ sed 's/@SOSVERSION@/$(VERSION)/g'<sos/__init__.py.in >sos/__init__.py
|
|
||||||
for d in $(SUBDIRS); do make DESTDIR=`cd $(DESTDIR); pwd` -C $$d install; [ $$? = 0 ] || exit 1; done
|
|
||||||
|
|
||||||
$(NAME)-$(VERSION).tar.gz: clean gpgkey
|
|
||||||
|
|
||||||
diff -up sos-2.2/sos/sosreport.py.bz584253 sos-2.2/sos/sosreport.py
|
|
||||||
--- sos-2.2/sos/sosreport.py.bz584253 2010-07-29 11:43:53.718936059 -0400
|
|
||||||
+++ sos-2.2/sos/sosreport.py 2010-07-29 11:44:01.279936234 -0400
|
|
||||||
@@ -46,8 +46,8 @@ from itertools import *
|
|
||||||
from collections import deque
|
|
||||||
|
|
||||||
from sos import _sos as _
|
|
||||||
+from sos import __version__
|
|
||||||
|
|
||||||
-__version__ = 2.1
|
|
||||||
if os.path.isfile('/etc/fedora-release'):
|
|
||||||
__distro__ = 'Fedora'
|
|
||||||
else:
|
|
||||||
@@ -655,8 +655,9 @@ No changes will be made to your system.
|
|
||||||
raise
|
|
||||||
else:
|
|
||||||
error_log = open(logdir + "/sosreport-plugin-errors.txt", "a")
|
|
||||||
+ etype, eval, etrace = sys.exc_info()
|
|
||||||
traceback.print_exception(etype, eval, etrace, limit=2, file=sys.stdout)
|
|
||||||
- error_log.write(traceback.format_exc)
|
|
||||||
+ error_log.write(traceback.format_exc())
|
|
||||||
error_log.close()
|
|
||||||
|
|
||||||
tmpcount += len(plug.diagnose_msgs)
|
|
||||||
@@ -727,8 +728,9 @@ No changes will be made to your system.
|
|
||||||
raise
|
|
||||||
else:
|
|
||||||
error_log = open(logdir + "/sosreport-plugin-errors.txt", "a")
|
|
||||||
+ etype, eval, etrace = sys.exc_info()
|
|
||||||
traceback.print_exception(etype, eval, etrace, limit=2, file=sys.stdout)
|
|
||||||
- error_log.write(traceback.format_exc)
|
|
||||||
+ error_log.write(traceback.format_exc())
|
|
||||||
error_log.close()
|
|
||||||
|
|
||||||
print
|
|
@ -1,59 +0,0 @@
|
|||||||
--- sos-2.2/sos/__init__.py 2010-03-26 16:24:08.000000000 -0400
|
|
||||||
+++ /dev/null 2010-07-28 23:09:21.745168185 -0400
|
|
||||||
@@ -1,26 +0,0 @@
|
|
||||||
-## Copyright 2010 Red Hat, Inc.
|
|
||||||
-## Author: Adam Stokes <astokes@fedoraproject.org>
|
|
||||||
-
|
|
||||||
-## This program is free software; you can redistribute it and/or modify
|
|
||||||
-## it under the terms of the GNU General Public License as published by
|
|
||||||
-## the Free Software Foundation; either version 2 of the License, or
|
|
||||||
-## (at your option) any later version.
|
|
||||||
-
|
|
||||||
-## This program is distributed in the hope that it will be useful,
|
|
||||||
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
-## GNU General Public License for more details.
|
|
||||||
-
|
|
||||||
-## You should have received a copy of the GNU General Public License
|
|
||||||
-## along with this program; if not, write to the Free Software
|
|
||||||
-## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
-
|
|
||||||
-import gettext
|
|
||||||
-
|
|
||||||
-gettext_dir = "/usr/share/locale"
|
|
||||||
-gettext_app = "sos"
|
|
||||||
-
|
|
||||||
-gettext.bindtextdomain(gettext_app, gettext_dir)
|
|
||||||
-
|
|
||||||
-def _sos(msg):
|
|
||||||
- return gettext.dgettext(gettext_app, msg)
|
|
||||||
--- /dev/null 2010-07-28 23:09:21.745168185 -0400
|
|
||||||
+++ sos-2.2/sos/__init__.py.in 2010-07-29 12:21:12.237102733 -0400
|
|
||||||
@@ -0,0 +1,27 @@
|
|
||||||
+## Copyright 2010 Red Hat, Inc.
|
|
||||||
+## Author: Adam Stokes <astokes@fedoraproject.org>
|
|
||||||
+
|
|
||||||
+## This program is free software; you can redistribute it and/or modify
|
|
||||||
+## it under the terms of the GNU General Public License as published by
|
|
||||||
+## the Free Software Foundation; either version 2 of the License, or
|
|
||||||
+## (at your option) any later version.
|
|
||||||
+
|
|
||||||
+## This program is distributed in the hope that it will be useful,
|
|
||||||
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+## GNU General Public License for more details.
|
|
||||||
+
|
|
||||||
+## You should have received a copy of the GNU General Public License
|
|
||||||
+## along with this program; if not, write to the Free Software
|
|
||||||
+## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
+
|
|
||||||
+import gettext
|
|
||||||
+
|
|
||||||
+gettext_dir = "/usr/share/locale"
|
|
||||||
+gettext_app = "sos"
|
|
||||||
+
|
|
||||||
+gettext.bindtextdomain(gettext_app, gettext_dir)
|
|
||||||
+
|
|
||||||
+__version__="@SOSVERSION@"
|
|
||||||
+def _sos(msg):
|
|
||||||
+ return gettext.dgettext(gettext_app, msg)
|
|
@ -1,27 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/yum.py.orig sos-2.2/sos/plugins/yum.py
|
|
||||||
--- sos-2.2/sos/plugins/yum.py.orig 2011-08-12 12:33:23.768711944 +0100
|
|
||||||
+++ sos-2.2/sos/plugins/yum.py 2011-08-12 12:54:20.547487066 +0100
|
|
||||||
@@ -19,8 +19,8 @@ class yum(sos.plugintools.PluginBase):
|
|
||||||
"""yum information
|
|
||||||
"""
|
|
||||||
|
|
||||||
- optionList = [("yumlist", "list repositories and packages", "slow", False)]
|
|
||||||
- optionList = [("yumdebug", "gather yum debugging data", "slow", False)]
|
|
||||||
+ optionList = [("yumlist", "list repositories and packages", "slow", False),
|
|
||||||
+ ("yumdebug", "gather yum debugging data", "slow", False)]
|
|
||||||
|
|
||||||
def checkenabled(self):
|
|
||||||
self.files = [ "/etc/yum.conf" ]
|
|
||||||
@@ -43,9 +43,10 @@ class yum(sos.plugintools.PluginBase):
|
|
||||||
self.addCopySpec("/etc/yum.conf")
|
|
||||||
self.addCopySpec("/var/log/yum.log")
|
|
||||||
|
|
||||||
+ # Get a list of channels the machine is subscribed to.
|
|
||||||
+ self.collectExtOutput("yum -C repolist")
|
|
||||||
+
|
|
||||||
if self.getOption("yumlist"):
|
|
||||||
- # Get a list of channels the machine is subscribed to.
|
|
||||||
- self.collectExtOutput("/bin/echo \"repo list\" | /usr/bin/yum shell")
|
|
||||||
# List various information about available packages
|
|
||||||
self.collectExtOutput("/usr/bin/yum list")
|
|
||||||
|
|
@ -1,351 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/cluster.py.orig sos-2.2/sos/plugins/cluster.py
|
|
||||||
--- sos-2.2/sos/plugins/cluster.py.orig 2011-02-04 14:50:31.510521528 -0500
|
|
||||||
+++ sos-2.2/sos/plugins/cluster.py 2011-02-04 14:51:19.485399800 -0500
|
|
||||||
@@ -14,12 +14,12 @@
|
|
||||||
|
|
||||||
import sos.plugintools
|
|
||||||
import os, re
|
|
||||||
-import time, libxml2
|
|
||||||
-import glob
|
|
||||||
+from glob import glob
|
|
||||||
|
|
||||||
class cluster(sos.plugintools.PluginBase):
|
|
||||||
"""cluster suite and GFS related information
|
|
||||||
"""
|
|
||||||
+
|
|
||||||
optionList = [("gfslockdump", 'gather output of gfs lockdumps', 'slow', False),
|
|
||||||
('lockdump', 'gather dlm lockdumps', 'slow', False)]
|
|
||||||
|
|
||||||
@@ -40,190 +40,9 @@ class cluster(sos.plugintools.PluginBase
|
|
||||||
self.files = [ "/etc/cluster/cluster.conf" ]
|
|
||||||
return sos.plugintools.PluginBase.checkenabled(self)
|
|
||||||
|
|
||||||
- def has_gfs(self):
|
|
||||||
- return (len(self.doRegexFindAll(r'^\S+\s+\S+\s+gfs\s+.*$', "/etc/mtab")) > 0)
|
|
||||||
-
|
|
||||||
- def diagnose(self):
|
|
||||||
+ def setup(self):
|
|
||||||
rhelver = self.policy().rhelVersion()
|
|
||||||
|
|
||||||
- # check if the minimum set of packages is installed
|
|
||||||
- # for RHEL4 RHCS(ccs, cman, cman-kernel, magma, magma-plugins, (dlm, dlm-kernel) || gulm, perl-Net-Telnet, rgmanager, fence)
|
|
||||||
- # RHEL4 GFS (GFS, GFS-kernel, ccs, lvm2-cluster, fence)
|
|
||||||
-
|
|
||||||
- pkgs_check = []
|
|
||||||
- mods_check = []
|
|
||||||
- serv_check = []
|
|
||||||
-
|
|
||||||
- if rhelver == 4:
|
|
||||||
- pkgs_check.extend( [ "ccs", "cman", "magma", "magma-plugins", "perl-Net-Telnet", "rgmanager", "fence" ] )
|
|
||||||
- mods_check.extend( [ "cman", "dlm" ] )
|
|
||||||
- if self.has_gfs():
|
|
||||||
- mods_check.append("gfs")
|
|
||||||
- serv_check.extend( [ "cman", "ccsd", "rgmanager", "fenced" ] )
|
|
||||||
- if self.has_gfs():
|
|
||||||
- serv_check.extend( ["gfs", "clvmd"] )
|
|
||||||
- elif rhelver == 5:
|
|
||||||
- pkgs_check.extend ( [ "cman", "perl-Net-Telnet", "rgmanager" ] )
|
|
||||||
- mods_check.extend( [ "dlm" ] )
|
|
||||||
- if self.has_gfs():
|
|
||||||
- mods_check.extend( ["gfs", "gfs2"] )
|
|
||||||
- serv_check.extend( [ "cman", "rgmanager" ] )
|
|
||||||
- if self.has_gfs():
|
|
||||||
- serv_check.extend( ["gfs", "clvmd"] )
|
|
||||||
- elif rhelver == 6:
|
|
||||||
- serv_check.extend( [ "fenced", "corosync", "dlm_controld"] )
|
|
||||||
- if self.has_gfs():
|
|
||||||
- serv_check.extend( ["gfs_controld"] )
|
|
||||||
-
|
|
||||||
- # check that kernel module packages are installed for
|
|
||||||
- # running kernel version
|
|
||||||
-
|
|
||||||
- for modname in mods_check:
|
|
||||||
- found = 0
|
|
||||||
-
|
|
||||||
- if self.policy().allPkgsByNameRegex( "^" + modname ):
|
|
||||||
- found = 1
|
|
||||||
-
|
|
||||||
- ret, out, time = self.callExtProg('/sbin/modinfo -F vermagic ' + modname)
|
|
||||||
-
|
|
||||||
- if ret == 0:
|
|
||||||
- found = 2
|
|
||||||
-
|
|
||||||
- if len(self.fileGrep("^%s\s+" % modname, "/proc/modules")) > 0:
|
|
||||||
- found = 3
|
|
||||||
-
|
|
||||||
- if found == 0:
|
|
||||||
- self.addDiagnose("required kernel module is missing: %s" % modname)
|
|
||||||
- elif found == 1:
|
|
||||||
- self.addDiagnose("required module is not available for current kernel: %s" % modname)
|
|
||||||
- elif found == 2:
|
|
||||||
- self.addDiagnose("required module is available but not loaded: %s" % modname)
|
|
||||||
-
|
|
||||||
- for pkg in pkgs_check:
|
|
||||||
- if not self.isInstalled(pkg):
|
|
||||||
- self.addDiagnose("required package is missing: %s" % pkg)
|
|
||||||
-
|
|
||||||
- if rhelver == "4":
|
|
||||||
- # (dlm, dlm-kernel) || gulm
|
|
||||||
- if not ((self.isInstalled("dlm") and self.isInstalled("dlm-kernel")) or self.isInstalled("gulm")):
|
|
||||||
- self.addDiagnose("required packages are missing: (dlm, dlm-kernel) || gulm")
|
|
||||||
-
|
|
||||||
- # check if all the needed daemons are active at sosreport time
|
|
||||||
- # check if they are started at boot time in RHEL4 RHCS (cman, ccsd, rgmanager, fenced)
|
|
||||||
- # and GFS (gfs, ccsd, clvmd, fenced)
|
|
||||||
-
|
|
||||||
- for service in serv_check:
|
|
||||||
- ret, out, time = self.callExtProg("/sbin/service %s status &> /dev/null" % service)
|
|
||||||
- if ret != 0:
|
|
||||||
- self.addDiagnose("service %s is not running" % service)
|
|
||||||
-
|
|
||||||
- if not self.policy().runlevelDefault() in self.policy().runlevelByService(service):
|
|
||||||
- self.addDiagnose("service %s is not started in default runlevel" % service)
|
|
||||||
-
|
|
||||||
- # FIXME: missing important cman services
|
|
||||||
- # FIXME: any cman service whose state != run ?
|
|
||||||
- # Fence Domain: "default" 2 2 run -
|
|
||||||
-
|
|
||||||
- # is cluster quorate
|
|
||||||
- if not self.is_cluster_quorate():
|
|
||||||
- self.addDiagnose("cluster node is not quorate")
|
|
||||||
-
|
|
||||||
- # if there is no cluster.conf, diagnose() finishes here.
|
|
||||||
- try:
|
|
||||||
- os.stat("/etc/cluster/cluster.conf")
|
|
||||||
- except:
|
|
||||||
- self.addDiagnose("/etc/cluster/cluster.conf is missing")
|
|
||||||
- return
|
|
||||||
-
|
|
||||||
- # setup XML xpath context
|
|
||||||
- xml = libxml2.parseFile("/etc/cluster/cluster.conf")
|
|
||||||
- xpathContext = xml.xpathNewContext()
|
|
||||||
-
|
|
||||||
- # make sure that the node names are valid according to RFC 2181
|
|
||||||
- for hostname in xpathContext.xpathEval('/cluster/clusternodes/clusternode/@name'):
|
|
||||||
- if not re.match('^[a-zA-Z]([a-zA-Z0-9-]*[a-zA-Z0-9])?(\.[a-zA-Z]([a-zA-Z0-9-]*[a-zA-Z0-9])?)*$', hostname.content):
|
|
||||||
- self.addDiagnose("node name (%s) contains invalid characters" % hostname.content)
|
|
||||||
-
|
|
||||||
- # do not rely on DNS to resolve node names, must have them in /etc/hosts
|
|
||||||
- for hostname in xpathContext.xpathEval('/cluster/clusternodes/clusternode/@name'):
|
|
||||||
- if len(self.fileGrep(r'^.*\W+%s' % hostname.content , "/etc/hosts")) == 0:
|
|
||||||
- self.addDiagnose("node %s is not defined in /etc/hosts" % hostname.content)
|
|
||||||
-
|
|
||||||
- # check fencing (warn on no fencing)
|
|
||||||
- if len(xpathContext.xpathEval("/cluster/clusternodes/clusternode[not(fence/method/device)]")):
|
|
||||||
- if self.has_gfs():
|
|
||||||
- self.addDiagnose("one or more nodes have no fencing agent configured: fencing is required for GFS to work")
|
|
||||||
- else:
|
|
||||||
- self.addDiagnose("one or more nodes have no fencing agent configured: the cluster infrastructure might not work as intended")
|
|
||||||
-
|
|
||||||
- # check fencing (warn on manual)
|
|
||||||
- if len(xpathContext.xpathEval("/cluster/clusternodes/clusternode[/cluster/fencedevices/fencedevice[@agent='fence_manual']/@name=fence/method/device/@name]")):
|
|
||||||
- self.addDiagnose("one or more nodes have manual fencing agent configured (data integrity is not guaranteed)")
|
|
||||||
-
|
|
||||||
- # if fence_ilo or fence_drac, make sure acpid is not running
|
|
||||||
- ret, hostname, time = self.callExtProg("/bin/uname -n")
|
|
||||||
- hostname = hostname.split(".")[0]
|
|
||||||
- if len(xpathContext.xpathEval('/cluster/clusternodes/clusternode[@name = "%s" and /cluster/fencedevices/fencedevice[@agent="fence_rsa" or @agent="fence_drac"]/@name=fence/method/device/@name]' % hostname )):
|
|
||||||
- ret, out, time = self.callExtProg("/sbin/service acpid status")
|
|
||||||
- if ret == 0 or self.policy().runlevelDefault() in self.policy().runlevelByService("acpid"):
|
|
||||||
- self.addDiagnose("acpid is enabled, this may cause problems with your fencing method.")
|
|
||||||
-
|
|
||||||
- # check for fs exported via nfs without nfsid attribute
|
|
||||||
- if len(xpathContext.xpathEval("/cluster/rm/service//fs[not(@fsid)]/nfsexport")):
|
|
||||||
- for xmlNode in xpathContext.xpathEval("/cluster/rm/service//fs[not(@fsid)]"):
|
|
||||||
- fsRefAttribute = xmlNode.xpathEval("@ref")
|
|
||||||
- if (len(fsRefAttribute) > 0) :
|
|
||||||
- fsRefName = fsRefAttribute[0].content
|
|
||||||
- if len(xpathContext.xpathEval("cluster/rm/resources/fs[@name='%s'][not(@fsid)]" % fsRefName)):
|
|
||||||
- self.addDiagnose("one or more nfs export do not have a fsid attribute set.")
|
|
||||||
- break
|
|
||||||
- else:
|
|
||||||
- self.addDiagnose("one or more nfs export do not have a fsid attribute set.")
|
|
||||||
-
|
|
||||||
- # cluster.conf file version and the in-memory cluster configuration version matches
|
|
||||||
- status, cluster_version, time = self.callExtProg("cman_tool status | grep 'Config version'")
|
|
||||||
- if not status:
|
|
||||||
- cluster_version = cluster_version[16:]
|
|
||||||
- else:
|
|
||||||
- cluster_version = None
|
|
||||||
- conf_version = xpathContext.xpathEval("/cluster/@config_version")[0].content
|
|
||||||
-
|
|
||||||
- if status == 0 and conf_version != cluster_version:
|
|
||||||
- self.addDiagnose("cluster.conf and in-memory configuration version differ (%s != %s)" % (conf_version, cluster_version) )
|
|
||||||
-
|
|
||||||
- status, output, time = self.callExtProg("/usr/sbin/rg_test test /etc/cluster/cluster.conf")
|
|
||||||
- if output.find("Error: ") > 0:
|
|
||||||
- self.addDiagnose("configuration errors are present according to rg_test")
|
|
||||||
-
|
|
||||||
- # make sure the first part of the lock table matches the cluster name
|
|
||||||
- # and that the locking protocol is sane
|
|
||||||
- cluster_name = xpathContext.xpathEval("/cluster/@name")[0].content
|
|
||||||
-
|
|
||||||
- for fs in self.fileGrep(r'^[^#][/\w]*\W*[/\w]*\W*gfs', "/etc/fstab"):
|
|
||||||
- # for each gfs entry
|
|
||||||
- fs = fs.split()
|
|
||||||
- lockproto = self.get_gfs_sb_field(fs[0], "sb_lockproto")
|
|
||||||
- if lockproto and lockproto != self.get_locking_proto():
|
|
||||||
- self.addDiagnose("gfs mountpoint (%s) is using the wrong locking protocol (%s)" % (fs[0], lockproto) )
|
|
||||||
-
|
|
||||||
- locktable = self.get_gfs_sb_field(fs[0], "sb_locktable")
|
|
||||||
- try: locktable = locktable.split(":")[0]
|
|
||||||
- except: continue
|
|
||||||
- if locktable != cluster_name:
|
|
||||||
- self.addDiagnose("gfs mountpoint (%s) is using the wrong locking table" % fs[0])
|
|
||||||
-
|
|
||||||
- # Check for existence of weak-updates in gfs2 prior to 2.6.18-128
|
|
||||||
- if rhelver == 5:
|
|
||||||
- ret, vermagic, time = self.callExtProg("modinfo -F vermagic gfs2")
|
|
||||||
- # just kernel release from vermagic line
|
|
||||||
- vermagic = vermagic.split()[0].lstrip('2.6.18-')
|
|
||||||
- vermagic = vermagic[:vermagic.find('.')]
|
|
||||||
- if int(vermagic) < 128:
|
|
||||||
- self.addDiagnose('GFS2 is being used via weak-updates, kmod-gfs2 should be uninstalled and system reboot' \
|
|
||||||
- 'to allow for kernel provided gfs2 module to be used.')
|
|
||||||
-
|
|
||||||
- def setup(self):
|
|
||||||
- self.collectExtOutput("/sbin/fdisk -l")
|
|
||||||
self.addCopySpec("/etc/cluster.conf")
|
|
||||||
self.addCopySpec("/etc/cluster.xml")
|
|
||||||
self.addCopySpec("/etc/cluster")
|
|
||||||
@@ -231,79 +50,82 @@ class cluster(sos.plugintools.PluginBase
|
|
||||||
self.addCopySpec("/etc/sysconfig/cman")
|
|
||||||
self.addCopySpec("/var/lib/ricci")
|
|
||||||
self.addCopySpec("/var/lib/luci")
|
|
||||||
+ self.addCopySpec("/var/log/cluster")
|
|
||||||
+ self.addCopySpec("/var/log/luci/luci.log")
|
|
||||||
+
|
|
||||||
+ if self.getOption('gfslockdump'):
|
|
||||||
+ self.do_gfslockdump()
|
|
||||||
+
|
|
||||||
+ if self.getOption('lockdump'):
|
|
||||||
+ self.do_lockdump()
|
|
||||||
+
|
|
||||||
self.collectExtOutput("/usr/sbin/rg_test test /etc/cluster/cluster.conf")
|
|
||||||
- self.collectExtOutput("cman_tool status")
|
|
||||||
- self.collectExtOutput("cman_tool -a nodes")
|
|
||||||
- self.collectOutputNow("group_tool ls -g1")
|
|
||||||
- self.collectOutputNow("group_tool dump")
|
|
||||||
- self.collectExtOutput("ccs_tool lsnode")
|
|
||||||
self.collectExtOutput("fence_tool ls -n")
|
|
||||||
- self.collectExtOutput("dlm_tool ls -n")
|
|
||||||
self.collectExtOutput("gfs_control ls -n")
|
|
||||||
- self.collectExtOutput("fence_tool dump", root_symlink="fenced.txt")
|
|
||||||
- self.collectExtOutput("dlm_tool dump", root_symlink="dlm_controld.txt")
|
|
||||||
- self.collectExtOutput("gfs_control dump", root_symlink="gfs_controld.txt")
|
|
||||||
- self.collectExtOutput("dlm_tool log_plock", root_symlink="log_plock.txt")
|
|
||||||
- self.addCopySpec("/var/log/cluster")
|
|
||||||
- self.addCopySpec("/var/log/luci/luci.log")
|
|
||||||
-
|
|
||||||
- self.collectExtOutput("clustat")
|
|
||||||
+ self.collectExtOutput("dlm_tool log_plock")
|
|
||||||
|
|
||||||
+ self.collectExtOutput("/sbin/fdisk -l")
|
|
||||||
+ self.collectOutputNow("clustat")
|
|
||||||
+ self.collectOutputNow("group_tool dump")
|
|
||||||
+ self.collectExtOutput("cman_tool services")
|
|
||||||
+ self.collectExtOutput("cman_tool nodes")
|
|
||||||
+ self.collectExtOutput("cman_tool status")
|
|
||||||
+ self.collectExtOutput("ccs_tool lsnode")
|
|
||||||
self.collectExtOutput("/sbin/ipvsadm -L")
|
|
||||||
|
|
||||||
- if self.getOption('gfslockdump'): self.do_gfslockdump()
|
|
||||||
- if self.getOption('lockdump'): self.do_lockdump()
|
|
||||||
-
|
|
||||||
- return
|
|
||||||
+ if rhelver is 4:
|
|
||||||
+ self.addCopySpec("/proc/cluster/*")
|
|
||||||
+ self.collectExtOutput("cman_tool nodes")
|
|
||||||
+
|
|
||||||
+ if rhelver is not 4: # 5+
|
|
||||||
+ self.collectExtOutput("cman_tool -a nodes")
|
|
||||||
+
|
|
||||||
+ if rhelver is 5:
|
|
||||||
+ self.collectExtOutput("group_tool -v")
|
|
||||||
+ self.collectExtOutput("group_tool dump fence")
|
|
||||||
+ self.collectExtOutput("group_tool dump gfs")
|
|
||||||
+
|
|
||||||
+ if rhelver not in (4,5): # 6+
|
|
||||||
+ self.collectExtOutput("corosync-quorumtool -l")
|
|
||||||
+ self.collectExtOutput("corosync-quorumtool -s")
|
|
||||||
+ self.collectExtOutput("corosync-cpgtool")
|
|
||||||
+ self.collectExtOutput("corosync-objctl")
|
|
||||||
+ self.collectExtOutput("group_tool ls -g1")
|
|
||||||
+ self.collectExtOutput("gfs_control ls -n")
|
|
||||||
+ self.collectExtOutput("gfs_control dump")
|
|
||||||
+ self.collectExtOutput("fence_tool dump")
|
|
||||||
+ self.collectExtOutput("dlm_tool dump")
|
|
||||||
+ self.collectExtOutput("dlm_tool ls -n")
|
|
||||||
|
|
||||||
def do_lockdump(self):
|
|
||||||
- status, output, time= self.callExtProg("cman_tool services")
|
|
||||||
- if status:
|
|
||||||
- # command somehow failed
|
|
||||||
- return False
|
|
||||||
-
|
|
||||||
rhelver = self.policy().rhelVersion()
|
|
||||||
|
|
||||||
- if rhelver == "4":
|
|
||||||
- regex = r'^DLM Lock Space:\s*"([^"]*)".*$'
|
|
||||||
- elif rhelver == "5Server" or rhelver == "5Client":
|
|
||||||
- regex = r'^dlm\s+[^\s]+\s+([^\s]+)\s.*$'
|
|
||||||
-
|
|
||||||
- reg=re.compile(regex,re.MULTILINE)
|
|
||||||
- for lockspace in reg.findall(output):
|
|
||||||
- ret, out, time = self.callExtProg("echo %s > /proc/cluster/dlm_locks" % lockspace)
|
|
||||||
- self.collectOutputNow("cat /proc/cluster/dlm_locks", root_symlink = "dlm_locks_%s" % lockspace)
|
|
||||||
-
|
|
||||||
- def get_locking_proto(self):
|
|
||||||
- # FIXME: what's the best way to find out ?
|
|
||||||
- return "lock_dlm"
|
|
||||||
- return "lock_gulm"
|
|
||||||
+ if rhelver is 4:
|
|
||||||
+ status, output, time = self.callExtProg("cman_tool services")
|
|
||||||
+ for lockspace in re.compile(r'^DLM Lock Space:\s*"([^"]*)".*$', re.MULTILINE).findall(output):
|
|
||||||
+ self.callExtProg("echo %s > /proc/cluster/dlm_locks" % lockspace)
|
|
||||||
+ self.collectOutputNow("cat /proc/cluster/dlm_locks",
|
|
||||||
+ suggest_filename = "dlm_locks_%s" % lockspace)
|
|
||||||
+
|
|
||||||
+ if rhelver is 5:
|
|
||||||
+ status, output, time = self.callExtProg("group_tool")
|
|
||||||
+ for lockspace in re.compile(r'^dlm\s+[^\s]+\s+([^\s]+)$', re.MULTILINE).findall(output):
|
|
||||||
+ self.collectExtOutput("dlm_tool lockdebug '%s'" % lockspace,
|
|
||||||
+ suggest_filename = "dlm_locks_%s" % lockspace)
|
|
||||||
+
|
|
||||||
+ else: # RHEL6 or recent Fedora
|
|
||||||
+ status, output, time = self.callExtProg("dlm_tool ls")
|
|
||||||
+ for lockspace in re.compile(r'^name\s+([^\s]+)$', re.MULTILINE).findall(output):
|
|
||||||
+ self.collectExtOutput("dlm_tool lockdebug -svw '%s'" % lockspace,
|
|
||||||
+ suggest_filename = "dlm_locks_%s" % lockspace)
|
|
||||||
|
|
||||||
def do_gfslockdump(self):
|
|
||||||
for mntpoint in self.doRegexFindAll(r'^\S+\s+([^\s]+)\s+gfs\s+.*$', "/proc/mounts"):
|
|
||||||
- self.collectExtOutput("/sbin/gfs_tool lockdump %s" % mntpoint, root_symlink = "gfs_lockdump_" + self.mangleCommand(mntpoint) )
|
|
||||||
-
|
|
||||||
- def do_rgmanager_bt(self):
|
|
||||||
- # FIXME: threads backtrace via SIGALRM
|
|
||||||
- return
|
|
||||||
+ self.collectExtOutput("/sbin/gfs_tool lockdump %s" % mntpoint,
|
|
||||||
+ suggest_filename = "gfs_lockdump_" + self.mangleCommand(mntpoint))
|
|
||||||
|
|
||||||
def postproc(self):
|
|
||||||
- for cluster_conf in glob.glob("/etc/cluster/cluster.conf*"):
|
|
||||||
+ for cluster_conf in glob("/etc/cluster/cluster.conf*"):
|
|
||||||
self.doRegexSub(cluster_conf, r"(\s*\<fencedevice\s*.*\s*passwd\s*=\s*)\S+(\")", r"\1%s" %('"***"'))
|
|
||||||
return
|
|
||||||
|
|
||||||
- def is_cluster_quorate(self):
|
|
||||||
- ret, output, time = self.callExtProg("cman_tool status | grep '^Membership state: '")
|
|
||||||
- try:
|
|
||||||
- if output[18:] == "Cluster-Member":
|
|
||||||
- return True
|
|
||||||
- except:
|
|
||||||
- pass
|
|
||||||
- return False
|
|
||||||
-
|
|
||||||
- def get_gfs_sb_field(self, device, field):
|
|
||||||
- for ret, line, time in self.callExtProg("/sbin/gfs_tool sb %s all" % device).split("\n"):
|
|
||||||
- if re.match('^\W*%s = ' % field, line):
|
|
||||||
- return line.split("=")[1].strip()
|
|
||||||
- return False
|
|
||||||
-
|
|
@ -1,10 +0,0 @@
|
|||||||
--- sos-2.2/sos/plugins/system.py
|
|
||||||
+++ sos-2.2/sos/plugins/system.py
|
|
||||||
@@ -21,6 +21,7 @@ class system(sos.plugintools.PluginBase)
|
|
||||||
self.addCopySpec("/proc/sys")
|
|
||||||
self.addCopySpec("/etc/sysctl.conf")
|
|
||||||
self.addCopySpec("/etc/cron*")
|
|
||||||
+ self.addCopySpec("/etc/anacrontab")
|
|
||||||
self.addCopySpec("/var/spool/cron*")
|
|
||||||
self.addCopySpec("/var/log/cron*")
|
|
||||||
self.addCopySpec("/etc/syslog.conf")
|
|
@ -1,20 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/policyredhat.py.orig sos-2.2/sos/policyredhat.py
|
|
||||||
--- sos-2.2/sos/policyredhat.py.orig 2011-02-03 20:24:14.000000000 +0000
|
|
||||||
+++ sos-2.2/sos/policyredhat.py 2011-02-03 20:24:51.000000000 +0000
|
|
||||||
@@ -153,12 +153,14 @@ class SosPolicy:
|
|
||||||
|
|
||||||
def rhelVersion(self):
|
|
||||||
try:
|
|
||||||
- pkgname = self.pkgByName("redhat-release")["version"]
|
|
||||||
+ pkg = self.pkgByName("redhat-release") or \
|
|
||||||
+ self.allPkgsByNameRegex("redhat-release-.*")[-1]
|
|
||||||
+ pkgname = pkg["version"]
|
|
||||||
if pkgname[0] == "4":
|
|
||||||
return 4
|
|
||||||
elif pkgname in [ "5Server", "5Client" ]:
|
|
||||||
return 5
|
|
||||||
- elif pkgname == "6":
|
|
||||||
+ elif pkgname[0] == "6":
|
|
||||||
return 6
|
|
||||||
except: pass
|
|
||||||
return False
|
|
@ -1,11 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/filesys.py.orig sos-2.2/sos/plugins/filesys.py
|
|
||||||
--- sos-2.2/sos/plugins/filesys.py.orig 2011-04-05 16:40:02.000000000 +0100
|
|
||||||
+++ sos-2.2/sos/plugins/filesys.py 2011-04-05 16:40:14.000000000 +0100
|
|
||||||
@@ -62,7 +62,6 @@ class filesys(sos.plugintools.PluginBase
|
|
||||||
else:
|
|
||||||
part_in_disk = re.compile("^/dev/[a-z]+$")
|
|
||||||
for dev in partlist:
|
|
||||||
- print part_in_disk.match(dev)
|
|
||||||
if bool(part_in_disk.match(dev)):
|
|
||||||
devlist.append(dev)
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/filesys.py.orig sos-2.2/sos/plugins/filesys.py
|
|
||||||
--- sos-2.2/sos/plugins/filesys.py.orig 2011-02-04 17:02:54.632926253 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/filesys.py 2011-02-04 17:02:58.463947027 +0000
|
|
||||||
@@ -49,12 +49,22 @@ class filesys(sos.plugintools.PluginBase
|
|
||||||
partlist.append('/dev/' + line.split()[-1])
|
|
||||||
except IOError:
|
|
||||||
exit(1)
|
|
||||||
- for dev in partlist:
|
|
||||||
- ret, hdparm, time = self.callExtProg('/sbin/hdparm -g %s' %(dev))
|
|
||||||
- if(ret == 0):
|
|
||||||
- start_geo = hdparm.strip().split("\n")[-1].strip().split()[-1]
|
|
||||||
- if(start_geo == "0"):
|
|
||||||
+ if os.path.exists("/sbin/hdparm"):
|
|
||||||
+ for dev in partlist:
|
|
||||||
+ ret, hdparm, time = self.callExtProg('/sbin/hdparm -g %s' %(dev))
|
|
||||||
+ if(ret == 0):
|
|
||||||
+ start_geo = hdparm.strip().split("\n")[-1].strip().split()[-1]
|
|
||||||
+ if(start_geo == "0"):
|
|
||||||
+ devlist.append(dev)
|
|
||||||
+ # Cheaper heuristic as RHEL* does not ship hdparm for S390(x)
|
|
||||||
+ # Skips least dm-.* correctly
|
|
||||||
+ else:
|
|
||||||
+ part_in_disk = re.compile("^/dev/[a-z]+$")
|
|
||||||
+ for dev in partlist:
|
|
||||||
+ print part_in_disk.match(dev)
|
|
||||||
+ if bool(part_in_disk.match(dev)):
|
|
||||||
devlist.append(dev)
|
|
||||||
+
|
|
||||||
for i in devlist:
|
|
||||||
self.collectExtOutput("/sbin/parted -s %s print" % (i))
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/sssd.py.orig sos-2.2/sos/plugins/sssd.py
|
|
||||||
--- sos-2.2/sos/plugins/sssd.py.orig 2011-02-24 19:26:40.000000000 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/sssd.py 2011-02-24 19:27:19.000000000 +0000
|
|
||||||
@@ -0,0 +1,29 @@
|
|
||||||
+## Copyright (C) 2007 Red Hat, Inc., Pierre Carrier <pcarrier@redhat.com>
|
|
||||||
+
|
|
||||||
+### This program is free software; you can redistribute it and/or modify
|
|
||||||
+## it under the terms of the GNU General Public License as published by
|
|
||||||
+## the Free Software Foundation; either version 2 of the License, or
|
|
||||||
+## (at your option) any later version.
|
|
||||||
+
|
|
||||||
+## This program is distributed in the hope that it will be useful,
|
|
||||||
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+## GNU General Public License for more details.
|
|
||||||
+
|
|
||||||
+## You should have received a copy of the GNU General Public License
|
|
||||||
+## along with this program; if not, write to the Free Software
|
|
||||||
+## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
+
|
|
||||||
+import sos.plugintools
|
|
||||||
+import os
|
|
||||||
+
|
|
||||||
+class sssd(sos.plugintools.PluginBase):
|
|
||||||
+ """sssd-related Diagnostic Information
|
|
||||||
+ """
|
|
||||||
+
|
|
||||||
+ def checkenabled(self):
|
|
||||||
+ return self.isInstalled("sssd")
|
|
||||||
+
|
|
||||||
+ def setup(self):
|
|
||||||
+ self.addCopySpec("/etc/sssd")
|
|
||||||
+ self.addCopySpec("/var/log/sssd/*")
|
|
@ -1,12 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/startup.py.orig sos-2.2/sos/plugins/startup.py
|
|
||||||
--- sos-2.2/sos/plugins/startup.py.orig 2011-02-25 11:55:10.000000000 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/startup.py 2011-02-25 11:55:24.000000000 +0000
|
|
||||||
@@ -22,7 +22,7 @@ class startup(sos.plugintools.PluginBase
|
|
||||||
def setup(self):
|
|
||||||
self.addCopySpec("/etc/rc.d")
|
|
||||||
|
|
||||||
- self.collectExtOutput("LC_ALL=C /sbin/chkconfig --list", root_symlink = "chkconfig")
|
|
||||||
+ self.collectExtOutput("/sbin/chkconfig --list", root_symlink = "chkconfig")
|
|
||||||
if self.getOption('servicestatus'):
|
|
||||||
self.collectExtOutput("/sbin/service --status-all")
|
|
||||||
self.collectExtOutput("/sbin/runlevel")
|
|
@ -1,36 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/infiniband.py.orig sos-2.2/sos/plugins/infiniband.py
|
|
||||||
--- sos-2.2/sos/plugins/infiniband.py.orig 2011-08-12 20:51:28.450712897 +0100
|
|
||||||
+++ sos-2.2/sos/plugins/infiniband.py 2011-08-12 21:02:17.143789131 +0100
|
|
||||||
@@ -0,0 +1,32 @@
|
|
||||||
+## Copyright (C) 2011 Red Hat
|
|
||||||
+
|
|
||||||
+### This program is free software; you can redistribute it and/or modify
|
|
||||||
+## it under the terms of the GNU General Public License as published by
|
|
||||||
+## the Free Software Foundation; either version 2 of the License, or
|
|
||||||
+## (at your option) any later version.
|
|
||||||
+
|
|
||||||
+## This program is distributed in the hope that it will be useful,
|
|
||||||
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+## GNU General Public License for more details.
|
|
||||||
+
|
|
||||||
+## You should have received a copy of the GNU General Public License
|
|
||||||
+## along with this program; if not, write to the Free Software
|
|
||||||
+## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
+
|
|
||||||
+import sos.plugintools
|
|
||||||
+
|
|
||||||
+class infiniband(sos.plugintools.PluginBase):
|
|
||||||
+ """Infiniband related information
|
|
||||||
+ """
|
|
||||||
+
|
|
||||||
+ def checkenabled(self):
|
|
||||||
+ if self.cInfo["policy"].pkgByName("libibverbs-utils"):
|
|
||||||
+ return True
|
|
||||||
+ return False
|
|
||||||
+
|
|
||||||
+ def setup(self):
|
|
||||||
+ self.collectExtOutput("/usr/bin/ibv_devices")
|
|
||||||
+ self.collectExtOutput("/usr/bin/ibv_devinfo")
|
|
||||||
+ return
|
|
||||||
+
|
|
@ -1,11 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/devicemapper.py.orig sos-2.2/sos/plugins/devicemapper.py
|
|
||||||
--- sos-2.2/sos/plugins/devicemapper.py.orig 2011-02-25 12:02:20.000000000 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/devicemapper.py 2011-02-25 12:02:38.000000000 +0000
|
|
||||||
@@ -32,6 +32,7 @@ class devicemapper(sos.plugintools.Plugi
|
|
||||||
self.collectExtOutput("/sbin/dmsetup info -c")
|
|
||||||
self.collectExtOutput("/sbin/dmsetup table")
|
|
||||||
self.collectExtOutput("/sbin/dmsetup status")
|
|
||||||
+ self.collectExtOutput("/sbin/dmsetup ls --tree")
|
|
||||||
|
|
||||||
self.collectExtOutput("/usr/sbin/vgdisplay -vv", root_symlink = "vgdisplay")
|
|
||||||
self.collectExtOutput("/usr/sbin/vgscan -vvv")
|
|
@ -1,9 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/dhcp.py.orig sos-2.2/sos/plugins/dhcp.py
|
|
||||||
--- sos-2.2/sos/plugins/dhcp.py.orig 2011-02-25 11:59:12.000000000 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/dhcp.py 2011-02-25 11:59:57.000000000 +0000
|
|
||||||
@@ -26,4 +26,5 @@ class dhcp(sos.plugintools.PluginBase):
|
|
||||||
self.addCopySpec("/etc/sysconfig/dhcrelay")
|
|
||||||
self.addCopySpec("/etc/sysconfig/dhcpd")
|
|
||||||
self.addCopySpec("/etc/dhcpd.conf")
|
|
||||||
+ self.addCopySpec("/etc/dhcp")
|
|
||||||
return
|
|
@ -1,33 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/iscsitarget.py.orig sos-2.2/sos/plugins/iscsitarget.py
|
|
||||||
--- sos-2.2/sos/plugins/iscsitarget.py.orig 2011-08-12 21:31:06.822774059 +0100
|
|
||||||
+++ sos-2.2/sos/plugins/iscsitarget.py 2011-08-12 21:17:01.115712664 +0100
|
|
||||||
@@ -0,0 +1,29 @@
|
|
||||||
+## Copyright (C) 2007-2010 Red Hat, Inc., Ben Turner <bturner@redhat.com>
|
|
||||||
+
|
|
||||||
+### This program is free software; you can redistribute it and/or modify
|
|
||||||
+## it under the terms of the GNU General Public License as published by
|
|
||||||
+## the Free Software Foundation; either version 2 of the License, or
|
|
||||||
+## (at your option) any later version.
|
|
||||||
+
|
|
||||||
+## This program is distributed in the hope that it will be useful,
|
|
||||||
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+## GNU General Public License for more details.
|
|
||||||
+
|
|
||||||
+## You should have received a copy of the GNU General Public License
|
|
||||||
+## along with this program; if not, write to the Free Software
|
|
||||||
+## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
+
|
|
||||||
+import sos.plugintools
|
|
||||||
+
|
|
||||||
+class iscsitarget(sos.plugintools.PluginBase):
|
|
||||||
+ """iscsi-target related information
|
|
||||||
+ """
|
|
||||||
+
|
|
||||||
+ def checkenabled(self):
|
|
||||||
+ self.packages = [ "scsi-target-utils" ]
|
|
||||||
+ return sos.plugintools.PluginBase.checkenabled(self)
|
|
||||||
+
|
|
||||||
+ def setup(self):
|
|
||||||
+ self.addCopySpec("/etc/tgt/targets.conf")
|
|
||||||
+ self.collectExtOutput("tgtadm --lld iscsi --op show --mode target")
|
|
@ -1,27 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/general.py.orig sos-2.2/sos/plugins/general.py
|
|
||||||
--- sos-2.2/sos/plugins/general.py.orig 2011-02-24 19:41:50.000000000 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/general.py 2011-02-24 19:43:02.000000000 +0000
|
|
||||||
@@ -25,6 +25,7 @@ class general(sos.plugintools.PluginBase
|
|
||||||
("all_logs", "collect all log files defined in syslog.conf", "", False)]
|
|
||||||
|
|
||||||
def setup(self):
|
|
||||||
+ rhelver = self.policy().rhelVersion()
|
|
||||||
self.addCopySpec("/etc/redhat-release")
|
|
||||||
self.addCopySpec("/etc/fedora-release")
|
|
||||||
self.addCopySpec("/etc/inittab")
|
|
||||||
@@ -49,8 +50,14 @@ class general(sos.plugintools.PluginBase
|
|
||||||
self.collectExtOutput("/usr/sbin/alternatives --display java", root_symlink = "java")
|
|
||||||
self.collectExtOutput("/usr/bin/readlink -f /usr/bin/java")
|
|
||||||
|
|
||||||
+ # new entitlement certificate support
|
|
||||||
+ if rhelver == 6 or rhelver == 5:
|
|
||||||
+ self.addCopySpec("/etc/pki/product/*.pem")
|
|
||||||
+ self.addCopySpec("/etc/pki/consumer/cert.pem")
|
|
||||||
+ self.addCopySpec("/etc/pki/entitlement/*.pem")
|
|
||||||
+ self.addForbiddenPath("/etc/pki/entitlement/key.pem")
|
|
||||||
+
|
|
||||||
if self.getOption('all_logs'):
|
|
||||||
- rhelver = self.policy().rhelVersion()
|
|
||||||
if rhelver == 5 or rhelver == 4:
|
|
||||||
logs=self.doRegexFindAll(r"^\S+\s+(\/.*log.*)\s+$", "/etc/syslog.conf")
|
|
||||||
for i in logs:
|
|
@ -1,11 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/filesys.py.orig sos-2.2/sos/plugins/filesys.py
|
|
||||||
--- sos-2.2/sos/plugins/filesys.py.orig 2011-02-25 12:21:24.000000000 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/filesys.py 2011-02-25 12:38:14.000000000 +0000
|
|
||||||
@@ -37,6 +37,7 @@ class filesys(sos.plugintools.PluginBase
|
|
||||||
if self.getOption('lsof'):
|
|
||||||
self.collectExtOutput("/usr/sbin/lsof -b +M -n -l -P", root_symlink = "lsof")
|
|
||||||
self.collectExtOutput("/sbin/blkid -c /dev/null")
|
|
||||||
+ self.collectExtOutput("/bin/lsblk")
|
|
||||||
|
|
||||||
part_titlep = re.compile("^major")
|
|
||||||
blankp = re.compile("^$")
|
|
@ -1,23 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/ldap.py.orig sos-2.2/sos/plugins/ldap.py
|
|
||||||
--- sos-2.2/sos/plugins/ldap.py.orig 2011-08-12 21:38:49.342684154 +0100
|
|
||||||
+++ sos-2.2/sos/plugins/ldap.py 2011-08-12 21:48:37.714760213 +0100
|
|
||||||
@@ -19,7 +19,7 @@ class ldap(sos.plugintools.PluginBase):
|
|
||||||
"""LDAP related information
|
|
||||||
"""
|
|
||||||
def checkenabled(self):
|
|
||||||
- self.packages = [ "openldap" ]
|
|
||||||
+ self.packages = [ "openldap", "nss-pam-ldapd" ]
|
|
||||||
self.files = [ "/etc/openldap/ldap.conf" ]
|
|
||||||
return sos.plugintools.PluginBase.checkenabled(self)
|
|
||||||
|
|
||||||
@@ -43,8 +43,10 @@ class ldap(sos.plugintools.PluginBase):
|
|
||||||
|
|
||||||
def setup(self):
|
|
||||||
self.addCopySpec("/etc/ldap.conf")
|
|
||||||
+ self.addCopySpec("/etc/nslcd.conf")
|
|
||||||
self.addCopySpec("/etc/openldap")
|
|
||||||
|
|
||||||
def postproc(self):
|
|
||||||
self.doRegexSub("/etc/ldap.conf", r"(\s*bindpw\s*)\S+", r"\1***")
|
|
||||||
+ self.doRegexSub("/etc/nslcd.conf", r"(\s*bindpw\s*)\S+", r"\1***")
|
|
||||||
return
|
|
@ -1,26 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugintools.py.orig sos-2.2/sos/plugintools.py
|
|
||||||
--- sos-2.2/sos/plugintools.py.orig 2011-08-15 01:33:35.900753944 +0100
|
|
||||||
+++ sos-2.2/sos/plugintools.py 2011-08-15 01:33:43.762754017 +0100
|
|
||||||
@@ -286,11 +286,19 @@ class PluginBase:
|
|
||||||
files = glob.glob(fname)
|
|
||||||
files.sort()
|
|
||||||
cursize = 0
|
|
||||||
+ limit_reached = False
|
|
||||||
+ sizelimit *= 1024 * 1024 # in MB
|
|
||||||
for flog in files:
|
|
||||||
cursize += os.stat(flog)[ST_SIZE]
|
|
||||||
- if sizelimit and (cursize / 1024 / 1024) > sizelimit:
|
|
||||||
- break
|
|
||||||
- self.addCopySpec(flog)
|
|
||||||
+ if sizelimit and cursize > sizelimit:
|
|
||||||
+ limit_reached = True
|
|
||||||
+ else:
|
|
||||||
+ self.addCopySpec(flog)
|
|
||||||
+ # Truncate the first file (others would likely be compressed),
|
|
||||||
+ # ensuring we get at least some logs
|
|
||||||
+ if flog == files[0] and limit_reached:
|
|
||||||
+ self.collectExtOutput("tail -c%d %s" % (sizelimit, flog),
|
|
||||||
+ "tail_" + os.path.basename(flog))
|
|
||||||
|
|
||||||
def addCopySpec(self, copyspec):
|
|
||||||
""" Add a file specification (can be file, dir,or shell glob) to be
|
|
@ -1,12 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/autofs.py.orig sos-2.2/sos/plugins/autofs.py
|
|
||||||
--- sos-2.2/sos/plugins/autofs.py.orig 2011-08-12 21:54:09.405697055 +0100
|
|
||||||
+++ sos-2.2/sos/plugins/autofs.py 2011-08-12 21:54:21.403820531 +0100
|
|
||||||
@@ -54,7 +54,7 @@ class autofs(sos.plugintools.PluginBase)
|
|
||||||
self.collectExtOutput("ps auxwww | grep automount")
|
|
||||||
self.collectExtOutput("/bin/egrep -e 'automount|pid.*nfs' /proc/mounts")
|
|
||||||
self.collectExtOutput("/bin/mount | egrep -e 'automount|pid.*nfs'")
|
|
||||||
- self.collectExtOutput("LC_ALL=C /sbin/chkconfig --list autofs")
|
|
||||||
+ self.collectExtOutput("/sbin/chkconfig --list autofs")
|
|
||||||
if self.checkdebug():
|
|
||||||
self.addCopySpec(self.getdaemondebug())
|
|
||||||
return
|
|
@ -1,82 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/policyredhat.py.orig sos-2.2/sos/policyredhat.py
|
|
||||||
--- sos-2.2/sos/policyredhat.py.orig 2011-04-07 11:57:19.000000000 +0100
|
|
||||||
+++ sos-2.2/sos/policyredhat.py 2011-04-07 11:59:55.000000000 +0100
|
|
||||||
@@ -24,10 +24,7 @@ from tempfile import gettempdir
|
|
||||||
from sos.helpers import *
|
|
||||||
import random
|
|
||||||
import re
|
|
||||||
-try:
|
|
||||||
- from hashlib import md5
|
|
||||||
-except ImportError:
|
|
||||||
- from md5 import md5
|
|
||||||
+import hashlib
|
|
||||||
import rpm
|
|
||||||
import time
|
|
||||||
from subprocess import Popen, PIPE
|
|
||||||
@@ -68,7 +65,7 @@ class SosPolicy:
|
|
||||||
def __init__(self):
|
|
||||||
self.report_file = ""
|
|
||||||
self.report_file_ext = ""
|
|
||||||
- self.report_md5 = ""
|
|
||||||
+ self.report_checksum = ""
|
|
||||||
self.reportName = ""
|
|
||||||
self.ticketNumber = ""
|
|
||||||
|
|
||||||
@@ -306,31 +303,49 @@ class SosPolicy:
|
|
||||||
print _("There was a problem encrypting your report.")
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
+ def getChecksumAlgorithm(self):
|
|
||||||
+ checksum = "md5"
|
|
||||||
+ # this is the canonical check for FIPS
|
|
||||||
+ try:
|
|
||||||
+ fp = open("/proc/sys/crypto/fips_enabled", "r")
|
|
||||||
+ except:
|
|
||||||
+ return checksum
|
|
||||||
+ fips_enabled = fp.read()
|
|
||||||
+ if fips_enabled.find("1") >= 0:
|
|
||||||
+ checksum = "sha256"
|
|
||||||
+ fp.close()
|
|
||||||
+ return checksum
|
|
||||||
+
|
|
||||||
def displayResults(self):
|
|
||||||
# make sure a report exists
|
|
||||||
if not self.report_file:
|
|
||||||
return False
|
|
||||||
|
|
||||||
- # calculate md5
|
|
||||||
+ # determine checksum algo and instantiate
|
|
||||||
+ checksum = self.getChecksumAlgorithm()
|
|
||||||
+ digest = hashlib.new(checksum)
|
|
||||||
+
|
|
||||||
+ # calculate checksum
|
|
||||||
fp = open(self.report_file, "r")
|
|
||||||
- self.report_md5 = md5(fp.read()).hexdigest()
|
|
||||||
+ digest.update(fp.read())
|
|
||||||
fp.close()
|
|
||||||
+ self.report_checksum = digest.hexdigest()
|
|
||||||
|
|
||||||
self.renameResults("sosreport-%s-%s-%s.%s" % (self.reportName,
|
|
||||||
time.strftime("%Y%m%d%H%M%S"),
|
|
||||||
- self.report_md5[-4:],
|
|
||||||
+ self.report_checksum[-4:],
|
|
||||||
self.report_file_ext))
|
|
||||||
|
|
||||||
- # store md5 into file
|
|
||||||
- fp = open(self.report_file + ".md5", "w")
|
|
||||||
- fp.write(self.report_md5 + "\n")
|
|
||||||
+ # store checksum into file
|
|
||||||
+ fp = open(self.report_file + "." + checksum, "w")
|
|
||||||
+ fp.write(self.report_checksum + "\n")
|
|
||||||
fp.close()
|
|
||||||
|
|
||||||
print
|
|
||||||
print _("Your sosreport has been generated and saved in:\n %s") % self.report_file
|
|
||||||
print
|
|
||||||
- if len(self.report_md5):
|
|
||||||
- print _("The md5sum is: ") + self.report_md5
|
|
||||||
+ if len(self.report_checksum):
|
|
||||||
+ print _("The " + checksum + "sum is: ") + self.report_checksum
|
|
||||||
print
|
|
||||||
print _("Please send this file to your support representative.")
|
|
||||||
print
|
|
@ -1,14 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/hardware.py.orig sos-2.2/sos/plugins/hardware.py
|
|
||||||
--- sos-2.2/sos/plugins/hardware.py.orig 2011-08-12 22:00:08.588682606 +0100
|
|
||||||
+++ sos-2.2/sos/plugins/hardware.py 2011-08-12 22:12:23.255788988 +0100
|
|
||||||
@@ -44,7 +44,9 @@ class hardware(sos.plugintools.PluginBas
|
|
||||||
if self.policy().getArch().endswith("386"):
|
|
||||||
self.collectExtOutput("/usr/sbin/x86info -a")
|
|
||||||
|
|
||||||
- self.collectExtOutput("/sbin/lsusb")
|
|
||||||
+ self.collectExtOutput("/usr/sbin/lsusb")
|
|
||||||
+ self.collectExtOutput("/usr/sbin/lsusb -v")
|
|
||||||
+ self.collectExtOutput("/usr/sbin/lsusb -t 2>&1", suggest_filename = "lsusb_-t")
|
|
||||||
self.collectExtOutput("/usr/bin/lshal")
|
|
||||||
self.collectExtOutput("/usr/bin/systool -c fc_host -v")
|
|
||||||
self.collectExtOutput("/usr/bin/systool -c scsi_host -v")
|
|
@ -1,29 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/hardware.py.orig sos-2.2/sos/plugins/hardware.py
|
|
||||||
--- sos-2.2/sos/plugins/hardware.py.orig 2011-09-23 16:00:34.000000000 +0100
|
|
||||||
+++ sos-2.2/sos/plugins/hardware.py 2011-09-23 16:00:55.000000000 +0100
|
|
||||||
@@ -13,6 +13,7 @@
|
|
||||||
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
|
|
||||||
import sos.plugintools
|
|
||||||
+import os
|
|
||||||
|
|
||||||
class hardware(sos.plugintools.PluginBase):
|
|
||||||
"""hardware related information
|
|
||||||
@@ -44,9 +45,14 @@ class hardware(sos.plugintools.PluginBas
|
|
||||||
if self.policy().getArch().endswith("386"):
|
|
||||||
self.collectExtOutput("/usr/sbin/x86info -a")
|
|
||||||
|
|
||||||
- self.collectExtOutput("/usr/sbin/lsusb")
|
|
||||||
- self.collectExtOutput("/usr/sbin/lsusb -v")
|
|
||||||
- self.collectExtOutput("/usr/sbin/lsusb -t 2>&1", suggest_filename = "lsusb_-t")
|
|
||||||
+ if os.path.exists("/usr/bin/lsusb"):
|
|
||||||
+ self.collectExtOutput("/usr/bin/lsusb")
|
|
||||||
+ self.collectExtOutput("/usr/bin/lsusb -v")
|
|
||||||
+ self.collectExtOutput("/usr/bin/lsusb -t 2>&1", suggest_filename = "lsusb_-t")
|
|
||||||
+ elif os.path.exists("/sbin/lsusb"):
|
|
||||||
+ self.collectExtOutput("/sbin/lsusb")
|
|
||||||
+ self.collectExtOutput("/sbin/lsusb -v")
|
|
||||||
+ self.collectExtOutput("/sbin/lsusb -t 2>&1", suggest_filename = "lsusb_-t")
|
|
||||||
self.collectExtOutput("/usr/bin/lshal")
|
|
||||||
self.collectExtOutput("/usr/bin/systool -c fc_host -v")
|
|
||||||
self.collectExtOutput("/usr/bin/systool -c scsi_host -v")
|
|
@ -1,30 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/general.py.orig sos-2.2/sos/plugins/general.py
|
|
||||||
--- sos-2.2/sos/plugins/general.py.orig 2011-08-14 12:09:59.224806981 +0100
|
|
||||||
+++ sos-2.2/sos/plugins/general.py 2011-08-14 12:12:37.567686798 +0100
|
|
||||||
@@ -29,6 +29,7 @@ class general(sos.plugintools.PluginBase
|
|
||||||
self.addCopySpec("/etc/redhat-release")
|
|
||||||
self.addCopySpec("/etc/fedora-release")
|
|
||||||
self.addCopySpec("/etc/inittab")
|
|
||||||
+ self.addCopySpec("/etc/init")
|
|
||||||
self.addCopySpec("/etc/sos.conf")
|
|
||||||
self.addCopySpec("/etc/sysconfig")
|
|
||||||
self.addCopySpec("/proc/stat")
|
|
||||||
@@ -50,12 +51,12 @@ class general(sos.plugintools.PluginBase
|
|
||||||
self.collectExtOutput("/usr/sbin/alternatives --display java", root_symlink = "java")
|
|
||||||
self.collectExtOutput("/usr/bin/readlink -f /usr/bin/java")
|
|
||||||
|
|
||||||
- # new entitlement certificate support
|
|
||||||
- if rhelver == 6 or rhelver == 5:
|
|
||||||
- self.addCopySpec("/etc/pki/product/*.pem")
|
|
||||||
- self.addCopySpec("/etc/pki/consumer/cert.pem")
|
|
||||||
- self.addCopySpec("/etc/pki/entitlement/*.pem")
|
|
||||||
- self.addForbiddenPath("/etc/pki/entitlement/key.pem")
|
|
||||||
+ # new entitlement certificate support
|
|
||||||
+ if rhelver == 6 or rhelver == 5:
|
|
||||||
+ self.addCopySpec("/etc/pki/product/*.pem")
|
|
||||||
+ self.addCopySpec("/etc/pki/consumer/cert.pem")
|
|
||||||
+ self.addCopySpec("/etc/pki/entitlement/*.pem")
|
|
||||||
+ self.addForbiddenPath("/etc/pki/entitlement/key.pem")
|
|
||||||
|
|
||||||
if self.getOption('all_logs'):
|
|
||||||
if rhelver == 5 or rhelver == 4:
|
|
@ -1,36 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/networking.py.orig sos-2.2/sos/plugins/networking.py
|
|
||||||
--- sos-2.2/sos/plugins/networking.py.orig 2011-08-15 01:44:30.290816400 +0100
|
|
||||||
+++ sos-2.2/sos/plugins/networking.py 2011-08-15 02:03:36.814212707 +0100
|
|
||||||
@@ -21,6 +21,20 @@ class networking(sos.plugintools.PluginB
|
|
||||||
"""
|
|
||||||
optionList = [("traceroute", "collects a traceroute to rhn.redhat.com", "slow", False)]
|
|
||||||
|
|
||||||
+ def get_bridge_name(self,brctlFile):
|
|
||||||
+ """Return a dictionary for which key are bridge name according to the
|
|
||||||
+ output of brctl show stored in brctlFile.
|
|
||||||
+ """
|
|
||||||
+ out=[]
|
|
||||||
+ fp = open(brctlFile, 'r')
|
|
||||||
+ for line in fp.readlines():
|
|
||||||
+ if line.startswith("bridge name") or line.isspace():
|
|
||||||
+ continue
|
|
||||||
+ brName, brRest = line.split(None, 1)
|
|
||||||
+ out.append(brName)
|
|
||||||
+ fp.close()
|
|
||||||
+ return out
|
|
||||||
+
|
|
||||||
def get_interface_name(self,ifconfigFile):
|
|
||||||
"""Return a dictionary for which key are interface name according to the
|
|
||||||
output of ifconifg-a stored in ifconfigFile.
|
|
||||||
@@ -77,6 +91,10 @@ class networking(sos.plugintools.PluginB
|
|
||||||
self.collectExtOutput("/sbin/ethtool -g "+eth)
|
|
||||||
if self.getOption("traceroute"):
|
|
||||||
self.collectExtOutput("/bin/traceroute -n rhn.redhat.com")
|
|
||||||
-
|
|
||||||
+ if os.path.exists("/usr/sbin/brctl"):
|
|
||||||
+ brctlFile=self.collectOutputNow("/usr/sbin/brctl show")
|
|
||||||
+ if brctlFile:
|
|
||||||
+ for brName in self.get_bridge_name(brctlFile):
|
|
||||||
+ self.collectExtOutput("/usr/sbin/brctl showstp "+brName)
|
|
||||||
return
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/helpers.py.orig sos-2.2/sos/helpers.py
|
|
||||||
--- sos-2.2/sos/helpers.py.orig 2011-08-14 13:15:07.018884665 +0100
|
|
||||||
+++ sos-2.2/sos/helpers.py 2011-08-14 13:15:21.880027577 +0100
|
|
||||||
@@ -55,7 +55,7 @@ def sosGetCommandOutput(command, timeout
|
|
||||||
|
|
||||||
p = Popen(command, shell=True, stdout=PIPE, stderr=PIPE, bufsize=-1)
|
|
||||||
stdout, stderr = p.communicate()
|
|
||||||
- return (p.returncode, stdout.strip(), 0)
|
|
||||||
+ return (p.returncode, stdout, 0)
|
|
||||||
|
|
||||||
def commonPrefix(l1, l2, common = []):
|
|
||||||
''' return a list of common elements at the start of all sequences,
|
|
@ -1,11 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/general.py.orig sos-2.2/sos/plugins/general.py
|
|
||||||
--- sos-2.2/sos/plugins/general.py.orig 2011-08-14 23:16:32.000000000 +0100
|
|
||||||
+++ sos-2.2/sos/plugins/general.py 2011-08-14 23:16:56.000000000 +0100
|
|
||||||
@@ -56,6 +56,7 @@ class general(sos.plugintools.PluginBase
|
|
||||||
self.addCopySpec("/etc/pki/product/*.pem")
|
|
||||||
self.addCopySpec("/etc/pki/consumer/cert.pem")
|
|
||||||
self.addCopySpec("/etc/pki/entitlement/*.pem")
|
|
||||||
+ self.addCopySpec("/etc/rhsm/")
|
|
||||||
self.addForbiddenPath("/etc/pki/entitlement/key.pem")
|
|
||||||
|
|
||||||
if self.getOption('all_logs'):
|
|
@ -1,11 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/networking.py.orig sos-2.2/sos/plugins/networking.py
|
|
||||||
--- sos-2.2/sos/plugins/networking.py.orig 2011-08-14 12:18:17.784697343 +0100
|
|
||||||
+++ sos-2.2/sos/plugins/networking.py 2011-08-14 12:18:37.709228057 +0100
|
|
||||||
@@ -66,6 +66,7 @@ class networking(sos.plugintools.PluginB
|
|
||||||
self.collectExtOutput("/sbin/ifenslave -a")
|
|
||||||
self.collectExtOutput("/sbin/ip mroute show")
|
|
||||||
self.collectExtOutput("/sbin/ip maddr show")
|
|
||||||
+ self.collectExtOutput("/sbin/ip neigh show")
|
|
||||||
if ifconfigFile:
|
|
||||||
for eth in self.get_interface_name(ifconfigFile):
|
|
||||||
self.collectExtOutput("/sbin/ethtool "+eth)
|
|
@ -1,52 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/qpidd.py.orig sos-2.2/sos/plugins/qpidd.py
|
|
||||||
--- sos-2.2/sos/plugins/qpidd.py.orig 2011-08-13 12:00:24.054712827 +0100
|
|
||||||
+++ sos-2.2/sos/plugins/qpidd.py 2011-08-13 12:00:26.419712889 +0100
|
|
||||||
@@ -19,25 +19,36 @@ class qpidd(sos.plugintools.PluginBase):
|
|
||||||
"""
|
|
||||||
def checkenabled(self):
|
|
||||||
""" checks if mrg enabled """
|
|
||||||
- if self.cInfo["policy"].pkgByName("qpidd") and \
|
|
||||||
- self.cInfo["policy"].pkgByName("python-qpid"):
|
|
||||||
+ if self.cInfo["policy"].pkgByName("qpid-cpp-server") and \
|
|
||||||
+ self.cInfo["policy"].pkgByName("qpid-tools"):
|
|
||||||
return True
|
|
||||||
return False
|
|
||||||
|
|
||||||
def setup(self):
|
|
||||||
""" performs data collection for mrg """
|
|
||||||
self.addCopySpec("/etc/qpidd.conf")
|
|
||||||
- self.collectExtOutput("/usr/bin/qpid-stat -q")
|
|
||||||
+ self.addCopySpec("/etc/sasl2/qpidd.conf")
|
|
||||||
+ self.addCopySpec("/etc/qpid/qpidc.conf")
|
|
||||||
+ self.addCopySpec("/etc/sesame/sesame.conf")
|
|
||||||
+ self.addCopySpec("/etc/cumin/cumin.conf")
|
|
||||||
+ self.addCopySpec("/etc/corosync/corosync.conf")
|
|
||||||
+ self.addCopySpec("/var/lib/sesame")
|
|
||||||
+ self.addCopySpec("/var/log/qpidd.log")
|
|
||||||
+ self.addCopySpec("/var/log/sesame")
|
|
||||||
+ self.addCopySpec("/var/log/cumin")
|
|
||||||
+ self.addCopySpec("/var/log/cluster")
|
|
||||||
+
|
|
||||||
+ self.collectExtOutput("/usr/bin/qpid-config queues")
|
|
||||||
+ self.collectExtOutput("/usr/bin/qpid-config exchanges")
|
|
||||||
+ self.collectExtOutput("/usr/bin/qpid-config exchanges -b")
|
|
||||||
+ self.collectExtOutput("/usr/bin/qpid-stat -b")
|
|
||||||
self.collectExtOutput("/usr/bin/qpid-stat -e")
|
|
||||||
- self.collectExtOutput("/usr/bin/qpid-stat -b")
|
|
||||||
- self.addCopySpec("/var/lib/qpid/syslog")
|
|
||||||
- self.collectExtOutput("/usr/bin/qpid-config")
|
|
||||||
- self.collectExtOutput("/usr/bin/qpid-config -b exchanges")
|
|
||||||
- self.collectExtOutput("/usr/bin/qpid-config -b queues")
|
|
||||||
+ self.collectExtOutput("/usr/bin/qpid-stat -q")
|
|
||||||
+ self.collectExtOutput("/usr/bin/qpid-stat -u")
|
|
||||||
self.collectExtOutput("/usr/bin/qpid-stat -c")
|
|
||||||
- self.collectExtOutput("/usr/bin/qpid-route link list")
|
|
||||||
self.collectExtOutput("/usr/bin/qpid-route route list")
|
|
||||||
- self.addCopySpec("/etc/ais/openais.conf")
|
|
||||||
+ self.collectExtOutput("/usr/bin/qpid-route link list")
|
|
||||||
+ self.collectExtOutput("/usr/bin/qpid-cluster")
|
|
||||||
+ self.collectExtOutput("/usr/bin/qpid-cluster -c")
|
|
||||||
self.collectExtOutput("ls -lR /var/lib/qpidd")
|
|
||||||
- self.addCopySpec("/var/log/cumin.log")
|
|
||||||
- self.addCopySpec("/var/log/mint.log")
|
|
||||||
+ self.collectExtOutput("ls -lR /opt/rh-qpid")
|
|
@ -1,13 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/networking.py.orig sos-2.2/sos/plugins/networking.py
|
|
||||||
--- sos-2.2/sos/plugins/networking.py.orig 2011-08-12 20:45:07.618990769 +0100
|
|
||||||
+++ sos-2.2/sos/plugins/networking.py 2011-08-12 20:46:27.203697655 +0100
|
|
||||||
@@ -72,6 +72,9 @@ class networking(sos.plugintools.PluginB
|
|
||||||
self.collectExtOutput("/sbin/ethtool -i "+eth)
|
|
||||||
self.collectExtOutput("/sbin/ethtool -k "+eth)
|
|
||||||
self.collectExtOutput("/sbin/ethtool -S "+eth)
|
|
||||||
+ self.collectExtOutput("/sbin/ethtool -a "+eth)
|
|
||||||
+ self.collectExtOutput("/sbin/ethtool -c "+eth)
|
|
||||||
+ self.collectExtOutput("/sbin/ethtool -g "+eth)
|
|
||||||
if self.getOption("traceroute"):
|
|
||||||
self.collectExtOutput("/bin/traceroute -n rhn.redhat.com")
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/cgroups.py.orig sos-2.2/sos/plugins/cgroups.py
|
|
||||||
--- sos-2.2/sos/plugins/cgroups.py.orig 2011-08-14 12:26:35.446697966 +0100
|
|
||||||
+++ sos-2.2/sos/plugins/cgroups.py 2011-08-14 12:26:40.768745167 +0100
|
|
||||||
@@ -0,0 +1,27 @@
|
|
||||||
+### This program is free software; you can redistribute it and/or modify
|
|
||||||
+## it under the terms of the GNU General Public License as published by
|
|
||||||
+## the Free Software Foundation; either version 2 of the License, or
|
|
||||||
+## (at your option) any later version.
|
|
||||||
+
|
|
||||||
+## This program is distributed in the hope that it will be useful,
|
|
||||||
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+## GNU General Public License for more details.
|
|
||||||
+
|
|
||||||
+## You should have received a copy of the GNU General Public License
|
|
||||||
+## along with this program; if not, write to the Free Software
|
|
||||||
+## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
+
|
|
||||||
+import sos.plugintools
|
|
||||||
+
|
|
||||||
+class cgroups(sos.plugintools.PluginBase):
|
|
||||||
+ """cgroup subsystem information
|
|
||||||
+ """
|
|
||||||
+
|
|
||||||
+ def setup(self):
|
|
||||||
+ self.addCopySpec("/etc/sysconfig/cgconfig")
|
|
||||||
+ self.addCopySpec("/etc/sysconfig/cgred.conf")
|
|
||||||
+ self.addCopySpec("/etc/cgsnapshot_blacklist.conf")
|
|
||||||
+ self.addCopySpec("/etc/cgconfig.conf")
|
|
||||||
+ self.addCopySpec("/etc/cgrules.conf")
|
|
||||||
+ return
|
|
@ -1,12 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/networking.py.orig sos-2.2/sos/plugins/networking.py
|
|
||||||
--- sos-2.2/sos/plugins/networking.py.orig 2012-03-06 11:18:02.339316914 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/networking.py 2012-03-06 11:18:04.615316966 +0000
|
|
||||||
@@ -58,7 +58,7 @@ class networking(sos.plugintools.PluginB
|
|
||||||
self.writeTextToCommand(cmd,"IPTables module "+tablename+" not loaded\n")
|
|
||||||
|
|
||||||
def setup(self):
|
|
||||||
- self.addCopySpec("/proc/net")
|
|
||||||
+ self.addCopySpec("/proc/net/")
|
|
||||||
self.addCopySpec("/etc/nsswitch.conf")
|
|
||||||
self.addCopySpec("/etc/yp.conf")
|
|
||||||
self.addCopySpec("/etc/inetd.conf")
|
|
@ -1,12 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/hardware.py.orig sos-2.2/sos/plugins/hardware.py
|
|
||||||
--- sos-2.2/sos/plugins/hardware.py.orig 2011-09-09 16:14:41.000000000 +0100
|
|
||||||
+++ sos-2.2/sos/plugins/hardware.py 2011-09-09 16:14:53.000000000 +0100
|
|
||||||
@@ -36,7 +36,7 @@ class hardware(sos.plugintools.PluginBas
|
|
||||||
self.addCopySpec("/proc/s390dbf/tape")
|
|
||||||
self.addCopySpec("/sys/bus/scsi")
|
|
||||||
self.addCopySpec("/sys/state")
|
|
||||||
- self.collectExtOutput("/usr/share/rhn/up2dateclient/hardware.py")
|
|
||||||
+ self.collectExtOutput("/usr/share/rhn/up2date_client/hardware.py")
|
|
||||||
self.collectExtOutput("""/bin/echo -e "lspci:\n" ; /sbin/lspci ; /bin/echo -e "\nlspci -nvv:\n" ; /sbin/lspci -nvv ; /bin/echo -e "\nlspci -tv:\n" ; /sbin/lspci -tv""", suggest_filename = "lspci", root_symlink = "lspci")
|
|
||||||
|
|
||||||
self.collectExtOutput("/usr/sbin/dmidecode", root_symlink = "dmidecode")
|
|
@ -1,12 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/hardware.py.orig sos-2.2/sos/plugins/hardware.py
|
|
||||||
--- sos-2.2/sos/plugins/hardware.py.orig 2011-09-23 15:34:51.000000000 +0100
|
|
||||||
+++ sos-2.2/sos/plugins/hardware.py 2011-09-23 15:34:58.000000000 +0100
|
|
||||||
@@ -36,7 +36,7 @@ class hardware(sos.plugintools.PluginBas
|
|
||||||
self.addCopySpec("/proc/s390dbf/tape")
|
|
||||||
self.addCopySpec("/sys/bus/scsi")
|
|
||||||
self.addCopySpec("/sys/state")
|
|
||||||
- self.collectExtOutput("/usr/share/rhn/up2date_client/hardware.py")
|
|
||||||
+ self.collectExtOutput("python /usr/share/rhn/up2date_client/hardware.py", suggest_filename="hardware.py")
|
|
||||||
self.collectExtOutput("""/bin/echo -e "lspci:\n" ; /sbin/lspci ; /bin/echo -e "\nlspci -nvv:\n" ; /sbin/lspci -nvv ; /bin/echo -e "\nlspci -tv:\n" ; /sbin/lspci -tv""", suggest_filename = "lspci", root_symlink = "lspci")
|
|
||||||
|
|
||||||
self.collectExtOutput("/usr/sbin/dmidecode", root_symlink = "dmidecode")
|
|
@ -1,21 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/helpers.py.orig sos-2.2/sos/helpers.py
|
|
||||||
--- sos-2.2/sos/helpers.py.orig 2012-03-06 13:03:15.121460956 +0000
|
|
||||||
+++ sos-2.2/sos/helpers.py 2012-03-06 13:03:16.400460986 +0000
|
|
||||||
@@ -27,7 +27,7 @@ helper functions used by sosreport and p
|
|
||||||
"""
|
|
||||||
import os, sys
|
|
||||||
import logging
|
|
||||||
-from subprocess import Popen, PIPE
|
|
||||||
+from subprocess import Popen, PIPE, STDOUT
|
|
||||||
|
|
||||||
def importPlugin(pluginname, name):
|
|
||||||
""" Import a plugin to extend capabilities of sosreport
|
|
||||||
@@ -53,7 +53,7 @@ def sosGetCommandOutput(command, timeout
|
|
||||||
# soslog.log(logging.VERBOSE, "binary '%s' does not exist or is not runnable" % cmdfile)
|
|
||||||
return (127, "", 0)
|
|
||||||
|
|
||||||
- p = Popen(command, shell=True, stdout=PIPE, stderr=PIPE, bufsize=-1)
|
|
||||||
+ p = Popen(command, shell=True, stdout=PIPE, stderr=STDOUT, bufsize=-1)
|
|
||||||
stdout, stderr = p.communicate()
|
|
||||||
return (p.returncode, stdout, 0)
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/rhn.py.orig sos-2.2/sos/plugins/rhn.py
|
|
||||||
--- sos-2.2/sos/plugins/rhn.py.orig 2012-03-06 11:22:14.336322665 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/rhn.py 2012-03-06 11:22:23.937322883 +0000
|
|
||||||
@@ -28,8 +28,13 @@ class rhn(sos.plugintools.PluginBase):
|
|
||||||
def checkenabled(self):
|
|
||||||
# enable if any related package is installed
|
|
||||||
|
|
||||||
- self.satellite = self.isInstalled("rhns-satellite-tools")
|
|
||||||
- self.proxy = self.isInstalled("rhns-proxy-tools")
|
|
||||||
+ self.satellite = self.isInstalled("rhns-satellite-tools") \
|
|
||||||
+ or self.isInstalled("spacewalk-java") \
|
|
||||||
+ or self.isInstalled("rhn-base")
|
|
||||||
+
|
|
||||||
+ self.proxy = self.isInstalled("rhns-proxy-tools") \
|
|
||||||
+ or self.isInstalled("spacewalk-proxy-management") \
|
|
||||||
+ or self.isInstalled("rhn-proxy-management")
|
|
||||||
|
|
||||||
if self.satellite or self.proxy:
|
|
||||||
return True
|
|
||||||
@@ -72,15 +77,15 @@ class rhn(sos.plugintools.PluginBase):
|
|
||||||
self.addCopySpec("/etc/tomcat5")
|
|
||||||
self.addCopySpec("/var/log/tomcat5")
|
|
||||||
|
|
||||||
- self.addCopySpec("/etc/tomcat5")
|
|
||||||
- self.addCopySpec("/var/log/tomcat5")
|
|
||||||
+ self.addCopySpec("/etc/tomcat5/")
|
|
||||||
+ self.addCopySpec("/var/log/tomcat5/")
|
|
||||||
|
|
||||||
if self.proxy:
|
|
||||||
# copying configuration information
|
|
||||||
- self.addCopySpec("/etc/squid")
|
|
||||||
+ self.addCopySpec("/etc/squid/")
|
|
||||||
|
|
||||||
# copying logs
|
|
||||||
- self.addCopySpec("/var/log/squid")
|
|
||||||
+ self.addCopySpec("/var/log/squid/")
|
|
||||||
|
|
||||||
return
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/rhn.py.orig sos-2.2/sos/plugins/rhn.py
|
|
||||||
--- sos-2.2/sos/plugins/rhn.py.orig 2012-03-06 16:33:35.648748925 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/rhn.py 2012-03-06 16:33:38.357748986 +0000
|
|
||||||
@@ -72,13 +72,8 @@ class rhn(sos.plugintools.PluginBase):
|
|
||||||
self.addCopySpec("/etc/tnsnames.ora")
|
|
||||||
self.addCopySpec("/etc/jabberd")
|
|
||||||
|
|
||||||
- # tomcat (4.x and newer satellites only)
|
|
||||||
- if not self.policy().pkgNVRA(satellite)[1].startswith("3."):
|
|
||||||
- self.addCopySpec("/etc/tomcat5")
|
|
||||||
- self.addCopySpec("/var/log/tomcat5")
|
|
||||||
-
|
|
||||||
- self.addCopySpec("/etc/tomcat5/")
|
|
||||||
- self.addCopySpec("/var/log/tomcat5/")
|
|
||||||
+ self.addCopySpec("/etc/tomcat6/")
|
|
||||||
+ self.addCopySpec("/var/log/tomcat6/")
|
|
||||||
|
|
||||||
if self.proxy:
|
|
||||||
# copying configuration information
|
|
@ -1,11 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/kernel.py.orig sos-2.2/sos/plugins/kernel.py
|
|
||||||
--- sos-2.2/sos/plugins/kernel.py.orig 2012-03-06 11:20:52.499320796 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/kernel.py 2012-03-06 11:20:59.206320950 +0000
|
|
||||||
@@ -64,6 +64,7 @@ class kernel(sos.plugintools.PluginBase)
|
|
||||||
self.addCopySpec("/etc/conf.modules")
|
|
||||||
self.addCopySpec("/etc/modules.conf")
|
|
||||||
self.addCopySpec("/etc/modprobe.conf")
|
|
||||||
+ self.addCopySpec("/etc/modprobe.d/")
|
|
||||||
self.collectExtOutput("/usr/sbin/dkms status")
|
|
||||||
self.addCopySpec("/proc/cmdline")
|
|
||||||
self.addCopySpec("/proc/driver")
|
|
@ -1,11 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/general.py.orig sos-2.2/sos/plugins/general.py
|
|
||||||
--- sos-2.2/sos/plugins/general.py.orig 2011-11-01 18:33:37.631824485 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/general.py 2011-11-01 18:33:47.084880437 +0000
|
|
||||||
@@ -58,6 +58,7 @@ class general(sos.plugintools.PluginBase
|
|
||||||
self.addCopySpec("/etc/pki/entitlement/*.pem")
|
|
||||||
self.addCopySpec("/etc/rhsm/")
|
|
||||||
self.addForbiddenPath("/etc/pki/entitlement/key.pem")
|
|
||||||
+ self.addForbiddenPath("/etc/pki/entitlement/*-key.pem")
|
|
||||||
|
|
||||||
if self.getOption('all_logs'):
|
|
||||||
if rhelver == 5 or rhelver == 4:
|
|
@ -1,12 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/networking.py.orig sos-2.2/sos/plugins/networking.py
|
|
||||||
--- sos-2.2/sos/plugins/networking.py.orig 2012-03-06 11:20:00.128319602 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/networking.py 2012-03-06 11:20:10.820319845 +0000
|
|
||||||
@@ -28,7 +28,7 @@ class networking(sos.plugintools.PluginB
|
|
||||||
out=[]
|
|
||||||
fp = open(brctlFile, 'r')
|
|
||||||
for line in fp.readlines():
|
|
||||||
- if line.startswith("bridge name") or line.isspace():
|
|
||||||
+ if line.startswith("bridge name") or line.isspace() or line[:1].isspace():
|
|
||||||
continue
|
|
||||||
brName, brRest = line.split(None, 1)
|
|
||||||
out.append(brName)
|
|
@ -1,99 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/gluster.py.orig ./sos/plugins/gluster.py
|
|
||||||
--- sos-2.2/sos/plugins/gluster.py.orig 2012-03-08 13:31:14.393436730 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/gluster.py 2012-03-08 13:30:55.024434492 +0000
|
|
||||||
@@ -0,0 +1,84 @@
|
|
||||||
+### This program is free software; you can redistribute it and/or modify
|
|
||||||
+## it under the terms of the GNU General Public License as published by
|
|
||||||
+## the Free Software Foundation; either version 2 of the License, or
|
|
||||||
+## (at your option) any later version.
|
|
||||||
+
|
|
||||||
+## This program is distributed in the hope that it will be useful,
|
|
||||||
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+## GNU General Public License for more details.
|
|
||||||
+
|
|
||||||
+## You should have received a copy of the GNU General Public License
|
|
||||||
+## along with this program; if not, write to the Free Software
|
|
||||||
+## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
+
|
|
||||||
+import os.path
|
|
||||||
+import sos.plugintools
|
|
||||||
+
|
|
||||||
+class gluster(sos.plugintools.PluginBase):
|
|
||||||
+ '''gluster related information'''
|
|
||||||
+
|
|
||||||
+ def defaultenabled(self):
|
|
||||||
+ return True
|
|
||||||
+
|
|
||||||
+ def get_volume_names(self, volume_file):
|
|
||||||
+ """Return a dictionary for which key are volume names according to the
|
|
||||||
+ output of gluster volume info stored in volume_file.
|
|
||||||
+ """
|
|
||||||
+ out=[]
|
|
||||||
+ fp = open(volume_file, 'r')
|
|
||||||
+ for line in fp.readlines():
|
|
||||||
+ if not line.startswith("Volume Name:"):
|
|
||||||
+ continue
|
|
||||||
+ volname = line[12:-1]
|
|
||||||
+ out.append(volname)
|
|
||||||
+ fp.close()
|
|
||||||
+ return out
|
|
||||||
+
|
|
||||||
+ def checkenabled(self):
|
|
||||||
+ packages = ["glusterfs", "glusterfs-core"]
|
|
||||||
+ return os.path.exists("/etc/glusterd") \
|
|
||||||
+ or os.path.exists("/var/lib/glusterd") \
|
|
||||||
+ or sos.plugintools.PluginBase.checkenabled(self)
|
|
||||||
+
|
|
||||||
+ def setup(self):
|
|
||||||
+ self.collectExtOutput("/usr/sbin/gluster peer status")
|
|
||||||
+
|
|
||||||
+ # check package version handling rename of glusterfs-core -> glusterfs
|
|
||||||
+ pkg = self.policy().pkgByName("glusterfs-core");
|
|
||||||
+ if not pkg:
|
|
||||||
+ pkg = self.policy().pkgByName("glusterfs");
|
|
||||||
+ # need to handle "no package" case for users who enable with -e/-o
|
|
||||||
+ if not pkg:
|
|
||||||
+ return
|
|
||||||
+
|
|
||||||
+ gluster_major = int((pkg["version"])[:1])
|
|
||||||
+ gluster_minor = int((pkg["version"])[2:3])
|
|
||||||
+ if (gluster_major == 3) and (gluster_minor <= 2):
|
|
||||||
+ self.addCopySpec("/etc/glusterd/")
|
|
||||||
+ self.addForbiddenPath("/etc/glusterd/geo-replication/secret.pem")
|
|
||||||
+ else:
|
|
||||||
+ self.addCopySpec("/var/lib/glusterd/")
|
|
||||||
+
|
|
||||||
+ # glusterfs-server rpm scripts stash this on migration to 3.3.x
|
|
||||||
+ self.addCopySpec("/etc/glusterd.rpmsave")
|
|
||||||
+
|
|
||||||
+ # common to all versions
|
|
||||||
+ self.addCopySpec("/etc/glusterfs")
|
|
||||||
+
|
|
||||||
+ # This will fail on <3.3.x but has no harmful side-effects
|
|
||||||
+ volume_file = self.collectOutputNow("/usr/sbin/gluster volume info",
|
|
||||||
+ "gluster_volume_info")
|
|
||||||
+ if volume_file:
|
|
||||||
+ for volname in self.get_volume_names(volume_file):
|
|
||||||
+ self.collectExtOutput("gluster volume statedump %s" % volname)
|
|
||||||
+ self.collectExtOutput("gluster volume status %s detail" % volname)
|
|
||||||
+ self.collectExtOutput("gluster volume status %s clients" % volname)
|
|
||||||
+ self.collectExtOutput("gluster volume status %s mem" % volname)
|
|
||||||
+ self.collectExtOutput("gluster volume status %s callpool" % volname)
|
|
||||||
+ self.collectExtOutput("gluster volume status %s inode" % volname)
|
|
||||||
+ self.collectExtOutput("gluster volume status %s fd" % volname)
|
|
||||||
+
|
|
||||||
+ self.collectExtOutput("gluster volume status")
|
|
||||||
+ # collect this last as some of the other actions create log entries
|
|
||||||
+ self.addCopySpec("/var/log/glusterfs")
|
|
||||||
diff -up sos-2.2/sos/plugins/gluster.py.orig sos-2.2/sos/plugins/gluster.py
|
|
||||||
--- sos-2.2/sos/plugins/gluster.py.orig 2012-05-02 14:09:06.768072384 +0100
|
|
||||||
+++ sos-2.2/sos/plugins/gluster.py 2012-05-02 14:10:10.568449078 +0100
|
|
||||||
@@ -73,6 +73,7 @@ class gluster(sos.plugintools.PluginBase
|
|
||||||
if volume_file:
|
|
||||||
for volname in self.get_volume_names(volume_file):
|
|
||||||
self.collectExtOutput("gluster volume statedump %s" % volname)
|
|
||||||
+ self.collectExtOutput("gluster volume statedump %s nfs" % volname)
|
|
||||||
self.collectExtOutput("gluster volume status %s detail" % volname)
|
|
||||||
self.collectExtOutput("gluster volume status %s clients" % volname)
|
|
||||||
self.collectExtOutput("gluster volume status %s mem" % volname)
|
|
@ -1,11 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/gluster.py.orig sos-2.2/sos/plugins/gluster.py
|
|
||||||
--- sos-2.2/sos/plugins/gluster.py.orig 2012-04-23 18:25:15.698646073 +0100
|
|
||||||
+++ sos-2.2/sos/plugins/gluster.py 2012-04-23 18:25:25.257646291 +0100
|
|
||||||
@@ -59,6 +59,7 @@ class gluster(sos.plugintools.PluginBase
|
|
||||||
self.addForbiddenPath("/etc/glusterd/geo-replication/secret.pem")
|
|
||||||
else:
|
|
||||||
self.addCopySpec("/var/lib/glusterd/")
|
|
||||||
+ self.addForbiddenPath("/var/lib/glusterd/geo-replication/secret.pem")
|
|
||||||
|
|
||||||
# glusterfs-server rpm scripts stash this on migration to 3.3.x
|
|
||||||
self.addCopySpec("/etc/glusterd.rpmsave")
|
|
@ -1,31 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/cloudforms.py.orig ./sos/plugins/cloudforms.py
|
|
||||||
--- sos-2.2/sos/plugins/cloudforms.py.orig 2012-03-08 12:35:06.415447641 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/cloudforms.py 2012-03-08 12:45:53.485443241 +0000
|
|
||||||
@@ -0,0 +1,27 @@
|
|
||||||
+import sos.plugintools
|
|
||||||
+import os
|
|
||||||
+
|
|
||||||
+class cloudforms(sos.plugintools.PluginBase):
|
|
||||||
+ """CloudForms related information
|
|
||||||
+ """
|
|
||||||
+
|
|
||||||
+ def defaultenabled(self):
|
|
||||||
+ return True
|
|
||||||
+
|
|
||||||
+ def checkenabled(self):
|
|
||||||
+ self.packages = ["katello", "katello-common",
|
|
||||||
+ "katello-headpin", "aeolus-conductor"]
|
|
||||||
+ self.files = ["/usr/share/katello/script/katello-debug",
|
|
||||||
+ "/usr/bin/aeolus-debug"]
|
|
||||||
+ return sos.plugintools.PluginBase.checkenabled(self)
|
|
||||||
+
|
|
||||||
+ def setup(self):
|
|
||||||
+ katello_debug = "/usr/share/katello/script/katello-debug"
|
|
||||||
+ aeolus_debug = "/usr/bin/aeolus-debug"
|
|
||||||
+ if os.path.isfile(katello_debug):
|
|
||||||
+ katello_debug_path = os.path.join(self.cInfo['dstroot'],"katello-debug")
|
|
||||||
+ self.collectExtOutput("%s --notar -d %s" % (katello_debug, katello_debug_path))
|
|
||||||
+ if os.path.isfile(aeolus_debug):
|
|
||||||
+ aeolus_debug_path = os.path.join(self.cInfo['dstroot'],"aeolus-debug")
|
|
||||||
+ self.collectExtOutput("%s --notar -d %s" % (aeolus_debug, aeolus_debug_path))
|
|
||||||
+
|
|
@ -1,11 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/hardware.py.orig sos-2.2/sos/plugins/hardware.py
|
|
||||||
--- sos-2.2/sos/plugins/hardware.py.orig 2012-03-06 11:18:50.687318018 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/hardware.py 2012-03-06 11:19:04.559318335 +0000
|
|
||||||
@@ -41,6 +41,7 @@ class hardware(sos.plugintools.PluginBas
|
|
||||||
self.collectExtOutput("""/bin/echo -e "lspci:\n" ; /sbin/lspci ; /bin/echo -e "\nlspci -nvv:\n" ; /sbin/lspci -nvv ; /bin/echo -e "\nlspci -tv:\n" ; /sbin/lspci -tv""", suggest_filename = "lspci", root_symlink = "lspci")
|
|
||||||
|
|
||||||
self.collectExtOutput("/usr/sbin/dmidecode", root_symlink = "dmidecode")
|
|
||||||
+ self.collectExtOutput("/usr/bin/cpufreq-info")
|
|
||||||
|
|
||||||
if self.policy().getArch().endswith("386"):
|
|
||||||
self.collectExtOutput("/usr/sbin/x86info -a")
|
|
@ -1,11 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/cluster.py.orig sos-2.2/sos/plugins/cluster.py
|
|
||||||
--- sos-2.2/sos/plugins/cluster.py.orig 2012-03-06 11:16:10.917314372 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/cluster.py 2012-03-06 11:16:24.354314679 +0000
|
|
||||||
@@ -48,6 +48,7 @@ class cluster(sos.plugintools.PluginBase
|
|
||||||
self.addCopySpec("/etc/cluster")
|
|
||||||
self.addCopySpec("/etc/sysconfig/cluster")
|
|
||||||
self.addCopySpec("/etc/sysconfig/cman")
|
|
||||||
+ self.addCopySpec("/etc/fence_virt.conf")
|
|
||||||
self.addCopySpec("/var/lib/ricci")
|
|
||||||
self.addCopySpec("/var/lib/luci")
|
|
||||||
self.addCopySpec("/var/log/cluster")
|
|
@ -1,260 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/devicemapper.py.orig sos-2.2/sos/plugins/devicemapper.py
|
|
||||||
--- sos-2.2/sos/plugins/devicemapper.py.orig 2012-03-06 14:23:24.361570691 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/devicemapper.py 2012-03-06 14:23:27.535570770 +0000
|
|
||||||
@@ -34,7 +34,7 @@ class devicemapper(sos.plugintools.Plugi
|
|
||||||
self.collectExtOutput("/sbin/dmsetup status")
|
|
||||||
self.collectExtOutput("/sbin/dmsetup ls --tree")
|
|
||||||
|
|
||||||
- self.collectExtOutput("/sbin/vgdisplay -vv", root_symlink = "vgdisplay")
|
|
||||||
+ self.collectExtOutput("/sbin/vgdisplay -vv", symlink = "vgdisplay")
|
|
||||||
self.collectExtOutput("/sbin/vgscan -vvv")
|
|
||||||
self.collectExtOutput("/sbin/pvscan -v")
|
|
||||||
self.collectExtOutput("/sbin/lvs -a -o +devices")
|
|
||||||
diff -up sos-2.2/sos/plugins/filesys.py.orig sos-2.2/sos/plugins/filesys.py
|
|
||||||
--- sos-2.2/sos/plugins/filesys.py.orig 2012-03-06 14:23:24.364570691 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/filesys.py 2012-03-06 14:23:27.536570767 +0000
|
|
||||||
@@ -30,12 +30,12 @@ class filesys(sos.plugintools.PluginBase
|
|
||||||
self.addCopySpec("/proc/mounts")
|
|
||||||
self.addCopySpec("/proc/mdstat")
|
|
||||||
self.addCopySpec("/etc/raidtab")
|
|
||||||
- mounts = self.collectOutputNow("/bin/mount -l", root_symlink = "mount")
|
|
||||||
+ mounts = self.collectOutputNow("/bin/mount -l", symlink = "mount")
|
|
||||||
self.addCopySpec("/etc/mdadm.conf")
|
|
||||||
|
|
||||||
- self.collectExtOutput("/bin/df -al", root_symlink = "df")
|
|
||||||
+ self.collectExtOutput("/bin/df -al", symlink = "df")
|
|
||||||
if self.getOption('lsof'):
|
|
||||||
- self.collectExtOutput("/usr/sbin/lsof -b +M -n -l -P", root_symlink = "lsof")
|
|
||||||
+ self.collectExtOutput("/usr/sbin/lsof -b +M -n -l -P", symlink = "lsof")
|
|
||||||
self.collectExtOutput("/sbin/blkid -c /dev/null")
|
|
||||||
self.collectExtOutput("/bin/lsblk")
|
|
||||||
|
|
||||||
diff -up sos-2.2/sos/plugins/general.py.orig sos-2.2/sos/plugins/general.py
|
|
||||||
--- sos-2.2/sos/plugins/general.py.orig 2012-03-06 14:23:24.366570691 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/general.py 2012-03-06 14:23:27.536570767 +0000
|
|
||||||
@@ -43,12 +43,12 @@ class general(sos.plugintools.PluginBase
|
|
||||||
self.addCopySpec("/var/log/pm/suspend.log")
|
|
||||||
self.addCopySpec("/var/log/up2date")
|
|
||||||
self.addCopySpec("/etc/exports")
|
|
||||||
- self.collectExtOutput("/bin/hostname", root_symlink = "hostname")
|
|
||||||
- self.collectExtOutput("/bin/date", root_symlink = "date")
|
|
||||||
- self.collectExtOutput("/usr/bin/uptime", root_symlink = "uptime")
|
|
||||||
+ self.collectExtOutput("/bin/hostname", symlink = "hostname")
|
|
||||||
+ self.collectExtOutput("/bin/date", symlink = "date")
|
|
||||||
+ self.collectExtOutput("/usr/bin/uptime", symlink = "uptime")
|
|
||||||
self.collectExtOutput("/bin/dmesg")
|
|
||||||
self.addCopySpec("/root/anaconda-ks.cfg")
|
|
||||||
- self.collectExtOutput("/usr/sbin/alternatives --display java", root_symlink = "java")
|
|
||||||
+ self.collectExtOutput("/usr/sbin/alternatives --display java", symlink = "java")
|
|
||||||
self.collectExtOutput("/usr/bin/readlink -f /usr/bin/java")
|
|
||||||
|
|
||||||
# new entitlement certificate support
|
|
||||||
diff -up sos-2.2/sos/plugins/hardware.py.orig sos-2.2/sos/plugins/hardware.py
|
|
||||||
--- sos-2.2/sos/plugins/hardware.py.orig 2012-03-06 14:23:24.368570691 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/hardware.py 2012-03-06 14:23:27.537570765 +0000
|
|
||||||
@@ -38,9 +38,9 @@ class hardware(sos.plugintools.PluginBas
|
|
||||||
self.addCopySpec("/sys/bus/scsi")
|
|
||||||
self.addCopySpec("/sys/state")
|
|
||||||
self.collectExtOutput("python /usr/share/rhn/up2date_client/hardware.py", suggest_filename="hardware.py")
|
|
||||||
- self.collectExtOutput("""/bin/echo -e "lspci:\n" ; /sbin/lspci ; /bin/echo -e "\nlspci -nvv:\n" ; /sbin/lspci -nvv ; /bin/echo -e "\nlspci -tv:\n" ; /sbin/lspci -tv""", suggest_filename = "lspci", root_symlink = "lspci")
|
|
||||||
+ self.collectExtOutput("""/bin/echo -e "lspci:\n" ; /sbin/lspci ; /bin/echo -e "\nlspci -nvv:\n" ; /sbin/lspci -nvv ; /bin/echo -e "\nlspci -tv:\n" ; /sbin/lspci -tv""", suggest_filename = "lspci", symlink = "lspci")
|
|
||||||
|
|
||||||
- self.collectExtOutput("/usr/sbin/dmidecode", root_symlink = "dmidecode")
|
|
||||||
+ self.collectExtOutput("/usr/sbin/dmidecode", symlink = "dmidecode")
|
|
||||||
self.collectExtOutput("/usr/bin/cpufreq-info")
|
|
||||||
|
|
||||||
if self.policy().getArch().endswith("386"):
|
|
||||||
diff -up sos-2.2/sos/plugins/kernel.py.orig sos-2.2/sos/plugins/kernel.py
|
|
||||||
--- sos-2.2/sos/plugins/kernel.py.orig 2012-03-06 14:23:24.371570691 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/kernel.py 2012-03-06 14:23:27.537570765 +0000
|
|
||||||
@@ -41,8 +41,8 @@ class kernel(sos.plugintools.PluginBase)
|
|
||||||
]
|
|
||||||
|
|
||||||
def setup(self):
|
|
||||||
- self.collectExtOutput("/bin/uname -a", root_symlink = "uname")
|
|
||||||
- self.moduleFile = self.collectOutputNow("/sbin/lsmod", root_symlink = "lsmod")
|
|
||||||
+ self.collectExtOutput("/bin/uname -a", symlink = "uname")
|
|
||||||
+ self.moduleFile = self.collectOutputNow("/sbin/lsmod", symlink = "lsmod")
|
|
||||||
|
|
||||||
if self.getOption('modinfo'):
|
|
||||||
runcmd = ""
|
|
||||||
diff -up sos-2.2/sos/plugins/lsbrelease.py.orig sos-2.2/sos/plugins/lsbrelease.py
|
|
||||||
--- sos-2.2/sos/plugins/lsbrelease.py.orig 2012-03-06 14:23:24.373570691 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/lsbrelease.py 2012-03-06 14:23:27.538570762 +0000
|
|
||||||
@@ -25,6 +25,6 @@ class lsbrelease(sos.plugintools.PluginB
|
|
||||||
return
|
|
||||||
def setup(self):
|
|
||||||
self.collectExtOutput("/usr/bin/lsb_release -a")
|
|
||||||
- self.collectExtOutput("/usr/bin/lsb_release -d", suggest_filename = "lsb_release", root_symlink = "lsb-release")
|
|
||||||
+ self.collectExtOutput("/usr/bin/lsb_release -d", suggest_filename = "lsb_release", symlink = "lsb-release")
|
|
||||||
self.addCopySpec("/etc/lsb-release*")
|
|
||||||
return
|
|
||||||
diff -up sos-2.2/sos/plugins/memory.py.orig sos-2.2/sos/plugins/memory.py
|
|
||||||
--- sos-2.2/sos/plugins/memory.py.orig 2012-03-06 14:23:24.375570691 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/memory.py 2012-03-06 14:23:27.538570762 +0000
|
|
||||||
@@ -24,7 +24,7 @@ class memory(sos.plugintools.PluginBase)
|
|
||||||
self.addCopySpec("/proc/slabinfo")
|
|
||||||
|
|
||||||
self.collectExtOutput("/bin/dmesg | grep -e 'e820.' -e 'aperature.'")
|
|
||||||
- self.collectExtOutput("/usr/bin/free", root_symlink = "free")
|
|
||||||
+ self.collectExtOutput("/usr/bin/free", symlink = "free")
|
|
||||||
self.collectExtOutput("/usr/bin/free -m")
|
|
||||||
return
|
|
||||||
|
|
||||||
diff -up sos-2.2/sos/plugins/networking.py.orig sos-2.2/sos/plugins/networking.py
|
|
||||||
--- sos-2.2/sos/plugins/networking.py.orig 2012-03-06 14:23:24.378570691 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/networking.py 2012-03-06 14:23:27.539570760 +0000
|
|
||||||
@@ -66,14 +66,14 @@ class networking(sos.plugintools.PluginB
|
|
||||||
self.addCopySpec("/etc/xinetd.d")
|
|
||||||
self.addCopySpec("/etc/host*")
|
|
||||||
self.addCopySpec("/etc/resolv.conf")
|
|
||||||
- ifconfigFile=self.collectOutputNow("/sbin/ifconfig -a", root_symlink = "ifconfig")
|
|
||||||
- self.collectExtOutput("/sbin/route -n", root_symlink = "route")
|
|
||||||
+ ifconfigFile=self.collectOutputNow("/sbin/ifconfig -a", symlink = "ifconfig")
|
|
||||||
+ self.collectExtOutput("/sbin/route -n", symlink = "route")
|
|
||||||
self.collectIPTable("filter")
|
|
||||||
self.collectIPTable("nat")
|
|
||||||
self.collectIPTable("mangle")
|
|
||||||
self.collectExtOutput("/bin/netstat -s")
|
|
||||||
self.collectExtOutput("/bin/netstat -agn")
|
|
||||||
- self.collectExtOutput("/bin/netstat -neopa", root_symlink = "netstat")
|
|
||||||
+ self.collectExtOutput("/bin/netstat -neopa", symlink = "netstat")
|
|
||||||
self.collectExtOutput("/sbin/ip route show table all")
|
|
||||||
self.collectExtOutput("/sbin/ip link")
|
|
||||||
self.collectExtOutput("/sbin/ip address")
|
|
||||||
diff -up sos-2.2/sos/plugins/process.py.orig sos-2.2/sos/plugins/process.py
|
|
||||||
--- sos-2.2/sos/plugins/process.py.orig 2012-03-06 14:23:24.380570691 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/process.py 2012-03-06 14:23:27.539570760 +0000
|
|
||||||
@@ -20,11 +20,11 @@ class process(sos.plugintools.PluginBase
|
|
||||||
"""process information
|
|
||||||
"""
|
|
||||||
def setup(self):
|
|
||||||
- self.collectExtOutput("/bin/ps auxwww", root_symlink = "ps")
|
|
||||||
+ self.collectExtOutput("/bin/ps auxwww", symlink = "ps")
|
|
||||||
self.collectExtOutput("/bin/ps auxwwwm")
|
|
||||||
self.collectExtOutput("/bin/ps alxwww")
|
|
||||||
- self.collectExtOutput("/usr/bin/pstree", root_symlink = "pstree")
|
|
||||||
- self.collectExtOutput("/usr/sbin/lsof -b +M -n -l", root_symlink = "lsof")
|
|
||||||
+ self.collectExtOutput("/usr/bin/pstree", symlink = "pstree")
|
|
||||||
+ self.collectExtOutput("/usr/sbin/lsof -b +M -n -l", symlink = "lsof")
|
|
||||||
return
|
|
||||||
|
|
||||||
def find_mountpoint(s):
|
|
||||||
diff -up sos-2.2/sos/plugins/rhn.py.orig sos-2.2/sos/plugins/rhn.py
|
|
||||||
--- sos-2.2/sos/plugins/rhn.py.orig 2012-03-06 14:23:24.383570691 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/rhn.py 2012-03-06 14:23:27.540570760 +0000
|
|
||||||
@@ -64,9 +64,9 @@ class rhn(sos.plugintools.PluginBase):
|
|
||||||
self.addCopySpec("/var/log/nocpulse/TSDBLocalQueue/TSDBLocalQueue.log")
|
|
||||||
|
|
||||||
self.addCopySpec("/root/ssl-build")
|
|
||||||
- self.collectExtOutput("rpm -qa --last", root_symlink = "rpm-manifest")
|
|
||||||
- self.collectExtOutput("/usr/bin/rhn-schema-version", root_symlink = "database-schema-version")
|
|
||||||
- self.collectExtOutput("/usr/bin/rhn-charsets", root_symlink = "database-character-sets")
|
|
||||||
+ self.collectExtOutput("rpm -qa --last", symlink = "rpm-manifest")
|
|
||||||
+ self.collectExtOutput("/usr/bin/rhn-schema-version", symlink = "database-schema-version")
|
|
||||||
+ self.collectExtOutput("/usr/bin/rhn-charsets", symlink = "database-character-sets")
|
|
||||||
|
|
||||||
if self.satellite:
|
|
||||||
self.addCopySpec("/etc/tnsnames.ora")
|
|
||||||
diff -up sos-2.2/sos/plugins/rpm.py.orig sos-2.2/sos/plugins/rpm.py
|
|
||||||
--- sos-2.2/sos/plugins/rpm.py.orig 2012-03-06 14:23:24.385570691 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/rpm.py 2012-03-06 14:23:27.540570760 +0000
|
|
||||||
@@ -24,9 +24,9 @@ class rpm(sos.plugintools.PluginBase):
|
|
||||||
self.addCopySpec("/var/log/rpmpkgs")
|
|
||||||
|
|
||||||
if self.getOption("rpmq"):
|
|
||||||
- self.collectExtOutput("/bin/rpm -qa --qf=\"%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}~~%{INSTALLTIME:date}\n\" --nosignature --nodigest|/bin/awk -F ~~ '{printf \"%-59s %s\\n\",$1,$2}'|sort", root_symlink = "installed-rpms")
|
|
||||||
+ self.collectExtOutput("/bin/rpm -qa --qf=\"%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}~~%{INSTALLTIME:date}\n\" --nosignature --nodigest|/bin/awk -F ~~ '{printf \"%-59s %s\\n\",$1,$2}'|sort", symlink = "installed-rpms")
|
|
||||||
|
|
||||||
if self.getOption("rpmva"):
|
|
||||||
- self.collectExtOutput("/bin/rpm -Va", root_symlink = "rpm-Va", timeout = 3600)
|
|
||||||
+ self.collectExtOutput("/bin/rpm -Va", symlink = "rpm-Va", timeout = 3600)
|
|
||||||
return
|
|
||||||
|
|
||||||
diff -up sos-2.2/sos/plugins/sar.py.orig sos-2.2/sos/plugins/sar.py
|
|
||||||
--- sos-2.2/sos/plugins/sar.py.orig 2012-03-06 14:23:24.387570691 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/sar.py 2012-03-06 14:23:27.540570760 +0000
|
|
||||||
@@ -27,7 +27,7 @@ class sar(sos.plugintools.PluginBase):
|
|
||||||
sar_filename = 'sar' + fname[2:4]
|
|
||||||
if sar_filename not in dirList:
|
|
||||||
sar_command = "/bin/sh -c \"LANG=C /usr/bin/sar -A -f /var/log/sa/" + fname + "\""
|
|
||||||
- self.collectOutputNow(sar_command, sar_filename, root_symlink=sar_filename)
|
|
||||||
+ self.collectOutputNow(sar_command, sar_filename, symlink=sar_filename)
|
|
||||||
return
|
|
||||||
|
|
||||||
def checkenabled(self):
|
|
||||||
diff -up sos-2.2/sos/plugins/selinux.py.orig sos-2.2/sos/plugins/selinux.py
|
|
||||||
--- sos-2.2/sos/plugins/selinux.py.orig 2012-03-06 14:23:24.389570691 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/selinux.py 2012-03-06 14:23:27.540570760 +0000
|
|
||||||
@@ -31,7 +31,7 @@ class selinux(sos.plugintools.PluginBase
|
|
||||||
def checkenabled(self):
|
|
||||||
# is selinux enabled ?
|
|
||||||
try:
|
|
||||||
- if self.collectOutputNow("/usr/sbin/sestatus", root_symlink = "sestatus").split(":")[1].strip() == "disabled":
|
|
||||||
+ if self.collectOutputNow("/usr/sbin/sestatus", symlink = "sestatus").split(":")[1].strip() == "disabled":
|
|
||||||
return False
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
diff -up sos-2.2/sos/plugins/startup.py.orig sos-2.2/sos/plugins/startup.py
|
|
||||||
--- sos-2.2/sos/plugins/startup.py.orig 2012-03-06 14:23:24.392570691 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/startup.py 2012-03-06 14:23:27.541570762 +0000
|
|
||||||
@@ -22,7 +22,7 @@ class startup(sos.plugintools.PluginBase
|
|
||||||
def setup(self):
|
|
||||||
self.addCopySpec("/etc/rc.d")
|
|
||||||
|
|
||||||
- self.collectExtOutput("/sbin/chkconfig --list", root_symlink = "chkconfig")
|
|
||||||
+ self.collectExtOutput("/sbin/chkconfig --list", symlink = "chkconfig")
|
|
||||||
if self.getOption('servicestatus'):
|
|
||||||
self.collectExtOutput("/sbin/service --status-all")
|
|
||||||
self.collectExtOutput("/sbin/runlevel")
|
|
||||||
diff -up sos-2.2/sos/plugintools.py.orig sos-2.2/sos/plugintools.py
|
|
||||||
--- sos-2.2/sos/plugintools.py.orig 2012-03-06 14:23:19.578570582 +0000
|
|
||||||
+++ sos-2.2/sos/plugintools.py 2012-03-06 14:23:27.541570762 +0000
|
|
||||||
@@ -302,7 +302,7 @@ class PluginBase:
|
|
||||||
# ensuring we get at least some logs
|
|
||||||
if flog == files[0] and limit_reached:
|
|
||||||
self.collectExtOutput("tail -c%d %s" % (sizelimit, flog),
|
|
||||||
- "tail_" + os.path.basename(flog))
|
|
||||||
+ "tail_" + os.path.basename(flog), flog[1:])
|
|
||||||
|
|
||||||
def addCopySpec(self, copyspec):
|
|
||||||
""" Add a file specification (can be file, dir,or shell glob) to be
|
|
||||||
@@ -324,11 +324,11 @@ class PluginBase:
|
|
||||||
status, shout, runtime = sosGetCommandOutput(prog)
|
|
||||||
return (status, shout, runtime)
|
|
||||||
|
|
||||||
- def collectExtOutput(self, exe, suggest_filename = None, root_symlink = None, timeout = 300):
|
|
||||||
+ def collectExtOutput(self, exe, suggest_filename = None, symlink = None, timeout = 300):
|
|
||||||
"""
|
|
||||||
Run a program and collect the output
|
|
||||||
"""
|
|
||||||
- self.collectProgs.append( (exe, suggest_filename, root_symlink, timeout) )
|
|
||||||
+ self.collectProgs.append( (exe, suggest_filename, symlink, timeout) )
|
|
||||||
|
|
||||||
def fileGrep(self, regexp, fname):
|
|
||||||
try:
|
|
||||||
@@ -360,7 +360,7 @@ class PluginBase:
|
|
||||||
|
|
||||||
return outfn
|
|
||||||
|
|
||||||
- def collectOutputNow(self, exe, suggest_filename = None, root_symlink = False, timeout = 300):
|
|
||||||
+ def collectOutputNow(self, exe, suggest_filename = None, symlink = False, timeout = 300):
|
|
||||||
""" Execute a command and save the output to a file for inclusion in
|
|
||||||
the report
|
|
||||||
"""
|
|
||||||
@@ -385,11 +385,13 @@ class PluginBase:
|
|
||||||
outfd.write(shout+"\n")
|
|
||||||
outfd.close()
|
|
||||||
|
|
||||||
- if root_symlink:
|
|
||||||
+ if symlink:
|
|
||||||
+ dst_from_root = outfn[len(self.cInfo['dstroot'])+1:]
|
|
||||||
+ target = ("../" * string.count(symlink, "/")) + dst_from_root
|
|
||||||
curdir = os.getcwd()
|
|
||||||
os.chdir(self.cInfo['dstroot'])
|
|
||||||
try:
|
|
||||||
- os.symlink(outfn[len(self.cInfo['dstroot'])+1:], root_symlink.strip("/."))
|
|
||||||
+ os.symlink(target, symlink.strip("/."))
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
os.chdir(curdir)
|
|
@ -1,12 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/rpm.py.orig sos-2.2/sos/plugins/rpm.py
|
|
||||||
--- sos-2.2/sos/plugins/rpm.py.orig 2012-03-06 13:13:42.455475271 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/rpm.py 2012-03-06 13:13:43.919475297 +0000
|
|
||||||
@@ -24,7 +24,7 @@ class rpm(sos.plugintools.PluginBase):
|
|
||||||
self.addCopySpec("/var/log/rpmpkgs")
|
|
||||||
|
|
||||||
if self.getOption("rpmq"):
|
|
||||||
- self.collectExtOutput("/bin/rpm -qa --qf=\"%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}~~%{INSTALLTIME:date}\n\" --nosignature --nodigest|/bin/awk -F ~~ '{printf \"%-60s%s\\n\",$1,$2}'|sort", root_symlink = "installed-rpms")
|
|
||||||
+ self.collectExtOutput("/bin/rpm -qa --qf=\"%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}~~%{INSTALLTIME:date}\n\" --nosignature --nodigest|/bin/awk -F ~~ '{printf \"%-59s %s\\n\",$1,$2}'|sort", root_symlink = "installed-rpms")
|
|
||||||
|
|
||||||
if self.getOption("rpmva"):
|
|
||||||
self.collectExtOutput("/bin/rpm -Va", root_symlink = "rpm-Va", timeout = 3600)
|
|
@ -1,42 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/policyredhat.py.orig sos-2.2/sos/policyredhat.py
|
|
||||||
--- sos-2.2/sos/policyredhat.py.orig 2012-03-06 21:40:00.126168412 +0000
|
|
||||||
+++ sos-2.2/sos/policyredhat.py 2012-03-06 21:46:14.875176961 +0000
|
|
||||||
@@ -60,6 +60,12 @@ def memoized(function):
|
|
||||||
return result
|
|
||||||
return f
|
|
||||||
|
|
||||||
+def sanitizeReportName(report_name):
|
|
||||||
+ return re.sub(r"[^-a-zA-Z.0-9]", "", report_name)
|
|
||||||
+
|
|
||||||
+def sanitizeTicketNumber(ticket_number):
|
|
||||||
+ return re.sub(r"[^0-9]", "", ticket_number)
|
|
||||||
+
|
|
||||||
class SosPolicy:
|
|
||||||
"This class implements various policies for sos"
|
|
||||||
def __init__(self):
|
|
||||||
@@ -208,10 +214,7 @@ class SosPolicy:
|
|
||||||
if not self.cInfo['cmdlineopts'].batch:
|
|
||||||
try:
|
|
||||||
self.reportName = raw_input(_("Please enter your first initial and last name [%s]: ") % localname)
|
|
||||||
- self.reportName = re.sub(r"[^a-zA-Z.0-9]", "", self.reportName)
|
|
||||||
-
|
|
||||||
self.ticketNumber = raw_input(_("Please enter the case number that you are generating this report for: "))
|
|
||||||
- self.ticketNumber = re.sub(r"[^0-9]", "", self.ticketNumber)
|
|
||||||
print
|
|
||||||
except:
|
|
||||||
print
|
|
||||||
@@ -222,11 +225,12 @@ class SosPolicy:
|
|
||||||
|
|
||||||
if self.cInfo['cmdlineopts'].customerName:
|
|
||||||
self.reportName = self.cInfo['cmdlineopts'].customerName
|
|
||||||
- self.reportName = re.sub(r"[^a-zA-Z.0-9]", "", self.reportName)
|
|
||||||
|
|
||||||
if self.cInfo['cmdlineopts'].ticketNumber:
|
|
||||||
self.ticketNumber = self.cInfo['cmdlineopts'].ticketNumber
|
|
||||||
- self.ticketNumber = re.sub(r"[^0-9]", "", self.ticketNumber)
|
|
||||||
+
|
|
||||||
+ self.reportName = sanitizeReportName(self.reportName)
|
|
||||||
+ self.ticketNumber = sanitizeTicketNumber(self.ticketNumber)
|
|
||||||
|
|
||||||
return
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/general.py.orig sos-2.2/sos/plugins/general.py
|
|
||||||
--- sos-2.2/sos/plugins/general.py.orig 2012-03-06 13:16:08.835478612 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/general.py 2012-03-06 13:16:12.151478685 +0000
|
|
||||||
@@ -61,18 +61,14 @@ class general(sos.plugintools.PluginBase
|
|
||||||
self.addForbiddenPath("/etc/pki/entitlement/*-key.pem")
|
|
||||||
|
|
||||||
if self.getOption('all_logs'):
|
|
||||||
- if rhelver == 5 or rhelver == 4:
|
|
||||||
- logs=self.doRegexFindAll(r"^\S+\s+(\/.*log.*)\s+$", "/etc/syslog.conf")
|
|
||||||
- for i in logs:
|
|
||||||
- if not os.path.isfile(i): continue
|
|
||||||
- self.addCopySpec(i)
|
|
||||||
-
|
|
||||||
- if rhelver == 6:
|
|
||||||
- logs=self.doRegexFindAll(r"^\S+\s+(\/.*log.*)\s+$", "/etc/rsyslog.conf")
|
|
||||||
- for i in logs:
|
|
||||||
- if not os.path.isfile(i): continue
|
|
||||||
- self.addCopySpec(i)
|
|
||||||
-
|
|
||||||
+ logs = self.doRegexFindAll("^\S+\s+(-?\/.*$)\s+", "/etc/syslog.conf")
|
|
||||||
+ if self.cInfo["policy"].pkgByName("rsyslog") or os.path.exists("/etc/rsyslog.conf"):
|
|
||||||
+ logs += self.doRegexFindAll("^\S+\s+(-?\/.*$)\s+", "/etc/rsyslog.conf")
|
|
||||||
+ for i in logs:
|
|
||||||
+ if i.startswith("-"):
|
|
||||||
+ i = i[1:]
|
|
||||||
+ if os.path.isfile(i):
|
|
||||||
+ self.addCopySpecLimit(i, sizelimit = self.isOptionEnabled("syslogsize"))
|
|
||||||
return
|
|
||||||
|
|
||||||
def postproc(self):
|
|
@ -1,182 +0,0 @@
|
|||||||
diff -up ./sos/plugintools.py.orig ./sos/plugintools.py
|
|
||||||
--- ./sos/plugintools.py.orig 2012-03-06 21:26:16.048149609 +0000
|
|
||||||
+++ ./sos/plugintools.py 2012-03-06 21:26:22.901149765 +0000
|
|
||||||
@@ -67,8 +67,8 @@ class PluginBase:
|
|
||||||
|
|
||||||
self.must_exit = False
|
|
||||||
|
|
||||||
- self.soslog = logging.getLogger('sos')
|
|
||||||
- self.proflog = logging.getLogger('sosprofile')
|
|
||||||
+ self.soslog = self.cInfo['soslog']
|
|
||||||
+ self.proflog = self.cInfo['proflog']
|
|
||||||
|
|
||||||
# get the option list into a dictionary
|
|
||||||
for opt in self.optionList:
|
|
||||||
@@ -105,7 +105,7 @@ class PluginBase:
|
|
||||||
except KeyboardInterrupt:
|
|
||||||
raise KeyboardInterrupt
|
|
||||||
except Exception, e:
|
|
||||||
- # self.soslog.debug("problem at path %s (%s)" % (abspath,e))
|
|
||||||
+ self.soslog.info("could not apply regex substitution at path %s (%s)" % (abspath,e))
|
|
||||||
break
|
|
||||||
return False
|
|
||||||
|
|
||||||
@@ -137,7 +137,7 @@ class PluginBase:
|
|
||||||
return ''
|
|
||||||
|
|
||||||
if not os.path.exists(srcpath):
|
|
||||||
- # self.soslog.debug("file or directory %s does not exist" % srcpath)
|
|
||||||
+ self.soslog.info("file or directory %s does not exist" % srcpath)
|
|
||||||
return
|
|
||||||
|
|
||||||
if os.path.islink(srcpath):
|
|
||||||
@@ -162,19 +162,19 @@ class PluginBase:
|
|
||||||
|
|
||||||
# make sure the link doesn't already exists
|
|
||||||
if os.path.exists(dstslname):
|
|
||||||
- # self.soslog.debug("skipping symlink creation: already exists (%s)" % dstslname)
|
|
||||||
+ self.soslog.info("skipping symlink creation: already exists (%s)" % dstslname)
|
|
||||||
return
|
|
||||||
|
|
||||||
# make sure the dst dir exists
|
|
||||||
if not (os.path.exists(os.path.dirname(dstslname)) and os.path.isdir(os.path.dirname(dstslname))):
|
|
||||||
os.makedirs(os.path.dirname(dstslname))
|
|
||||||
|
|
||||||
- # self.soslog.debug("creating symlink %s -> %s" % (dstslname, rpth))
|
|
||||||
+ self.soslog.debug("creating symlink %s -> %s" % (dstslname, rpth))
|
|
||||||
|
|
||||||
try:
|
|
||||||
os.symlink(rpth, dstslname)
|
|
||||||
except OSError:
|
|
||||||
- # self.soslog.debug("skipping symlink creation: already exists (%s)" % dstslname)
|
|
||||||
+ self.soslog.info("skipping symlink creation: already exists (%s)" % dstslname)
|
|
||||||
return
|
|
||||||
if os.path.isabs(link):
|
|
||||||
self.doCopyFileOrDir(link)
|
|
||||||
@@ -195,17 +195,17 @@ class PluginBase:
|
|
||||||
|
|
||||||
# if we get here, it's definitely a regular file (not a symlink or dir)
|
|
||||||
|
|
||||||
- # self.soslog.debug("copying file %s" % srcpath)
|
|
||||||
+ self.soslog.debug("copying file %s" % srcpath)
|
|
||||||
try:
|
|
||||||
tdstpath, abspath = self.__copyFile(srcpath)
|
|
||||||
- except EnvironmentError:
|
|
||||||
- # self.soslog.debug("error copying file %s (already exists)" % (srcpath))
|
|
||||||
+ except PluginException:
|
|
||||||
+ self.soslog.debug("error copying file %s (already exists)" % (srcpath))
|
|
||||||
return
|
|
||||||
except IOError:
|
|
||||||
- # self.soslog.debug("error copying file %s (IOError)" % (srcpath))
|
|
||||||
+ self.soslog.info("error copying file %s (IOError)" % (srcpath))
|
|
||||||
return
|
|
||||||
except:
|
|
||||||
- # self.soslog.debug("error copying file %s (SOMETHING HAPPENED)" % (srcpath))
|
|
||||||
+ self.soslog.exception("error copying file %s" % (srcpath))
|
|
||||||
return
|
|
||||||
|
|
||||||
self.copiedFiles.append({'srcpath':srcpath, 'dstpath':tdstpath, 'symlink':"no"}) # save in our list
|
|
||||||
@@ -285,7 +285,7 @@ class PluginBase:
|
|
||||||
"""Add a file specification (with limits)
|
|
||||||
"""
|
|
||||||
if not ( fname and len(fname) ):
|
|
||||||
- # self.soslog.warning("invalid file path")
|
|
||||||
+ self.soslog.warning("invalid file path")
|
|
||||||
return False
|
|
||||||
files = glob.glob(fname)
|
|
||||||
files.sort()
|
|
||||||
@@ -309,7 +309,7 @@ class PluginBase:
|
|
||||||
copied into the sosreport by this module
|
|
||||||
"""
|
|
||||||
if not ( copyspec and len(copyspec) ):
|
|
||||||
- # self.soslog.warning("invalid file path")
|
|
||||||
+ self.soslog.warning("invalid file path")
|
|
||||||
return False
|
|
||||||
# Glob case handling is such that a valid non-glob is a reduced glob
|
|
||||||
for filespec in glob.glob(copyspec):
|
|
||||||
@@ -399,7 +399,7 @@ class PluginBase:
|
|
||||||
outfn_strip = outfn[len(self.cInfo['cmddir'])+1:]
|
|
||||||
|
|
||||||
else:
|
|
||||||
- # self.soslog.debug("could not run command: %s" % exe)
|
|
||||||
+ self.soslog.info("could not run command: %s" % exe)
|
|
||||||
outfn = None
|
|
||||||
outfn_strip = None
|
|
||||||
|
|
||||||
@@ -463,11 +463,11 @@ class PluginBase:
|
|
||||||
|
|
||||||
for progs in izip(self.collectProgs):
|
|
||||||
prog, suggest_filename, root_symlink, timeout = progs[0]
|
|
||||||
- # self.soslog.debug("collecting output of '%s'" % prog)
|
|
||||||
+ self.soslog.debug("collecting output of '%s'" % prog)
|
|
||||||
try:
|
|
||||||
self.collectOutputNow(prog, suggest_filename, root_symlink, timeout)
|
|
||||||
except Exception, e:
|
|
||||||
- self.soslog.debug("error collection output of '%s', traceback follows:" % prog)
|
|
||||||
+ self.soslog.info("error collection output of '%s', traceback follows:" % prog)
|
|
||||||
|
|
||||||
def exit_please(self):
|
|
||||||
""" This function tells the plugin that it should exit ASAP"""
|
|
||||||
diff -up ./sos/sosreport.py.orig ./sos/sosreport.py
|
|
||||||
--- ./sos/sosreport.py.orig 2012-03-06 21:26:16.051149609 +0000
|
|
||||||
+++ ./sos/sosreport.py 2012-03-06 21:26:22.902149765 +0000
|
|
||||||
@@ -361,17 +361,16 @@ def sosreport(opts):
|
|
||||||
soslog = logging.getLogger('sos')
|
|
||||||
soslog.setLevel(logging.DEBUG)
|
|
||||||
|
|
||||||
- logging.VERBOSE = logging.INFO - 1
|
|
||||||
- logging.VERBOSE2 = logging.INFO - 2
|
|
||||||
- logging.VERBOSE3 = logging.INFO - 3
|
|
||||||
- logging.addLevelName(logging.VERBOSE, "verbose")
|
|
||||||
- logging.addLevelName(logging.VERBOSE2,"verbose2")
|
|
||||||
- logging.addLevelName(logging.VERBOSE3,"verbose3")
|
|
||||||
-
|
|
||||||
if GlobalVars.__cmdLineOpts__.profiler:
|
|
||||||
proflog = logging.getLogger('sosprofile')
|
|
||||||
proflog.setLevel(logging.DEBUG)
|
|
||||||
-
|
|
||||||
+ else:
|
|
||||||
+ proflog = None
|
|
||||||
+
|
|
||||||
+ # limit verbosity to DEBUG
|
|
||||||
+ if GlobalVars.__cmdLineOpts__.verbosity > 3:
|
|
||||||
+ GlobalVars.__cmdLineOpts__.verbosity = 3
|
|
||||||
+
|
|
||||||
# if stdin is not a tty, disable colors and don't ask questions
|
|
||||||
if not sys.stdin.isatty():
|
|
||||||
GlobalVars.__cmdLineOpts__.nocolors = True
|
|
||||||
@@ -380,7 +379,11 @@ def sosreport(opts):
|
|
||||||
# log to a file
|
|
||||||
flog = logging.FileHandler(logdir + "/sos.log")
|
|
||||||
flog.setFormatter(logging.Formatter('%(asctime)s %(levelname)s: %(message)s'))
|
|
||||||
- flog.setLevel(logging.VERBOSE3)
|
|
||||||
+ if GlobalVars.__cmdLineOpts__.verbosity > 0:
|
|
||||||
+ # standard log levels have a step of 10
|
|
||||||
+ flog.setLevel(logging.INFO - (GlobalVars.__cmdLineOpts__.verbosity * 10))
|
|
||||||
+ else:
|
|
||||||
+ flog.setLevel(logging.INFO)
|
|
||||||
soslog.addHandler(flog)
|
|
||||||
|
|
||||||
if GlobalVars.__cmdLineOpts__.profiler:
|
|
||||||
@@ -393,9 +396,10 @@ def sosreport(opts):
|
|
||||||
# define a Handler which writes INFO messages or higher to the sys.stderr
|
|
||||||
console = logging.StreamHandler(sys.stderr)
|
|
||||||
if GlobalVars.__cmdLineOpts__.verbosity > 0:
|
|
||||||
- console.setLevel(20 - GlobalVars.__cmdLineOpts__.verbosity)
|
|
||||||
+ # standard log levels have a step of 10
|
|
||||||
+ console.setLevel(logging.WARNING - (GlobalVars.__cmdLineOpts__.verbosity * 10))
|
|
||||||
else:
|
|
||||||
- console.setLevel(logging.INFO)
|
|
||||||
+ console.setLevel(logging.WARNING)
|
|
||||||
console.setFormatter(logging.Formatter('%(message)s'))
|
|
||||||
soslog.addHandler(console)
|
|
||||||
|
|
||||||
@@ -403,7 +407,7 @@ def sosreport(opts):
|
|
||||||
|
|
||||||
# set up dict so everyone can share the following
|
|
||||||
commons = {'dstroot': GlobalVars.dstroot, 'cmddir': cmddir, 'logdir': logdir, 'rptdir': rptdir,
|
|
||||||
- 'soslog': soslog, 'policy': GlobalVars.policy, 'verbosity' : GlobalVars.__cmdLineOpts__.verbosity,
|
|
||||||
+ 'soslog': soslog, 'proflog': proflog, 'policy': GlobalVars.policy, 'verbosity' : GlobalVars.__cmdLineOpts__.verbosity,
|
|
||||||
'xmlreport' : xmlrep, 'cmdlineopts':GlobalVars.__cmdLineOpts__, 'config':config }
|
|
||||||
|
|
||||||
# Make policy aware of the commons
|
|
@ -1,14 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugintools.py.orig sos-2.2/sos/plugintools.py
|
|
||||||
--- sos-2.2/sos/plugintools.py.orig 2012-03-06 11:21:31.658321690 +0000
|
|
||||||
+++ sos-2.2/sos/plugintools.py 2012-03-06 11:21:35.126321769 +0000
|
|
||||||
@@ -176,6 +176,10 @@ class PluginBase:
|
|
||||||
except OSError:
|
|
||||||
# self.soslog.debug("skipping symlink creation: already exists (%s)" % dstslname)
|
|
||||||
return
|
|
||||||
+ if os.path.isabs(link):
|
|
||||||
+ self.doCopyFileOrDir(link)
|
|
||||||
+ else:
|
|
||||||
+ self.doCopyFileOrDir(os.path.join(os.path.dirname(srcpath), link))
|
|
||||||
|
|
||||||
self.copiedFiles.append({'srcpath':srcpath, 'dstpath':rpth, 'symlink':"yes", 'pointsto':link})
|
|
||||||
return
|
|
@ -1,34 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/sunrpc.py.orig sos-2.2/sos/plugins/sunrpc.py
|
|
||||||
--- sos-2.2/sos/plugins/sunrpc.py.orig 2012-03-06 16:55:25.004778800 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/sunrpc.py 2012-03-06 16:55:27.598778861 +0000
|
|
||||||
@@ -0,0 +1,30 @@
|
|
||||||
+## Copyright (C) 2012 Red Hat, Inc., Bryn M. Reeves <bmr@redhat.com>
|
|
||||||
+
|
|
||||||
+### This program is free software; you can redistribute it and/or modify
|
|
||||||
+## it under the terms of the GNU General Public License as published by
|
|
||||||
+## the Free Software Foundation; either version 2 of the License, or
|
|
||||||
+## (at your option) any later version.
|
|
||||||
+
|
|
||||||
+## This program is distributed in the hope that it will be useful,
|
|
||||||
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
+## GNU General Public License for more details.
|
|
||||||
+
|
|
||||||
+## You should have received a copy of the GNU General Public License
|
|
||||||
+## along with this program; if not, write to the Free Software
|
|
||||||
+## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
||||||
+
|
|
||||||
+import sos.plugintools
|
|
||||||
+
|
|
||||||
+class sunrpc(sos.plugintools.PluginBase):
|
|
||||||
+ """Sun RPC related information
|
|
||||||
+ """
|
|
||||||
+ def checkenabled(self):
|
|
||||||
+ if self.policy().runlevelDefault() in self.policy().runlevelByService("rpcbind"):
|
|
||||||
+ return True
|
|
||||||
+ return False
|
|
||||||
+
|
|
||||||
+ def setup(self):
|
|
||||||
+ self.collectExtOutput("/usr/sbin/rpcinfo -p localhost")
|
|
||||||
+ return
|
|
||||||
+
|
|
@ -1,11 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/kernel.py.orig sos-2.2/sos/plugins/kernel.py
|
|
||||||
--- sos-2.2/sos/plugins/kernel.py.orig 2012-03-06 13:01:19.000000000 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/kernel.py 2012-03-06 13:10:38.638471077 +0000
|
|
||||||
@@ -65,6 +65,7 @@ class kernel(sos.plugintools.PluginBase)
|
|
||||||
self.addCopySpec("/etc/modules.conf")
|
|
||||||
self.addCopySpec("/etc/modprobe.conf")
|
|
||||||
self.addCopySpec("/etc/modprobe.d/")
|
|
||||||
+ self.addCopySpec("/proc/irq/")
|
|
||||||
self.collectExtOutput("/usr/sbin/dkms status")
|
|
||||||
self.addCopySpec("/proc/cmdline")
|
|
||||||
self.addCopySpec("/proc/driver")
|
|
@ -1,11 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/cgroups.py.orig sos-2.2/sos/plugins/cgroups.py
|
|
||||||
--- sos-2.2/sos/plugins/cgroups.py.orig 2012-03-06 13:08:55.774468733 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/cgroups.py 2012-03-06 13:08:58.710468796 +0000
|
|
||||||
@@ -19,6 +19,7 @@ class cgroups(sos.plugintools.PluginBase
|
|
||||||
"""
|
|
||||||
|
|
||||||
def setup(self):
|
|
||||||
+ self.addCopySpec("/proc/cgroups")
|
|
||||||
self.addCopySpec("/etc/sysconfig/cgconfig")
|
|
||||||
self.addCopySpec("/etc/sysconfig/cgred.conf")
|
|
||||||
self.addCopySpec("/etc/cgsnapshot_blacklist.conf")
|
|
@ -1,51 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/kernel.py.orig sos-2.2/sos/plugins/kernel.py
|
|
||||||
--- sos-2.2/sos/plugins/kernel.py.orig 2012-03-06 11:22:54.880323589 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/kernel.py 2012-03-06 11:23:17.034324094 +0000
|
|
||||||
@@ -71,6 +71,11 @@ class kernel(sos.plugintools.PluginBase)
|
|
||||||
self.addCopySpec("/proc/zoneinfo")
|
|
||||||
self.addCopySpec("/proc/sys/kernel/tainted")
|
|
||||||
self.addCopySpec("/proc/buddyinfo")
|
|
||||||
+ self.addCopySpec("/proc/softirqs")
|
|
||||||
+ self.addCopySpec("/proc/timer*")
|
|
||||||
+ self.addCopySpec("/proc/lock*")
|
|
||||||
+ self.addCopySpec("/sys/devices/system/clocksource/clocksource0/available_clocksource")
|
|
||||||
+ self.addCopySpec("/sys/devices/system/clocksource/clocksource0/current_clocksource")
|
|
||||||
|
|
||||||
return
|
|
||||||
|
|
||||||
diff -up sos-2.2/sos/plugins/kernel_realtime.py.orig sos-2.2/sos/plugins/kernel_realtime.py
|
|
||||||
--- sos-2.2/sos/plugins/kernel_realtime.py.orig 2012-03-06 11:23:54.319324945 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/kernel_realtime.py 2012-03-06 11:23:17.034324094 +0000
|
|
||||||
@@ -0,0 +1,32 @@
|
|
||||||
+# Copyright 2012 Red Hat Inc.
|
|
||||||
+# Guy Streeter <streeter redhat com>
|
|
||||||
+# Bryn M. Reeves <bmr@redhat.com>
|
|
||||||
+#
|
|
||||||
+# This program is free software; you can redistribute it and/or
|
|
||||||
+# modify it under the terms of the GNU General Public License
|
|
||||||
+# as published by the Free Software Foundation; version 2.
|
|
||||||
+#
|
|
||||||
+# This application is distributed in the hope that it will be useful,
|
|
||||||
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
||||||
+# General Public License for more details.
|
|
||||||
+
|
|
||||||
+import sos.plugintools
|
|
||||||
+import os
|
|
||||||
+
|
|
||||||
+class kernel_realtime(sos.plugintools.PluginBase):
|
|
||||||
+ '''Information specific to the realtime kernel
|
|
||||||
+ '''
|
|
||||||
+
|
|
||||||
+ def checkenabled(self):
|
|
||||||
+ if os.path.exists('/sys/kernel/realtime'):
|
|
||||||
+ return True
|
|
||||||
+ return False
|
|
||||||
+
|
|
||||||
+ def setup(self):
|
|
||||||
+ self.addCopySpec('/etc/rtgroups')
|
|
||||||
+ self.addCopySpec('/proc/sys/kernel/sched_rt_period_us')
|
|
||||||
+ self.addCopySpec('/proc/sys/kernel/sched_rt_runtime_us')
|
|
||||||
+ self.addCopySpec('/sys/kernel/realtime')
|
|
||||||
+ if self.isInstalled('tuna'):
|
|
||||||
+ self.collectExtOutput('/usr/bin/tuna -CP')
|
|
@ -1,21 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/anaconda.py.orig sos-2.2/sos/plugins/anaconda.py
|
|
||||||
--- sos-2.2/sos/plugins/anaconda.py.orig 2012-03-06 16:34:44.673750500 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/anaconda.py 2012-03-06 16:34:57.638750796 +0000
|
|
||||||
@@ -32,3 +32,6 @@ class anaconda(sos.plugintools.PluginBas
|
|
||||||
self.addCopySpec("/var/log/anaconda.xlog")
|
|
||||||
return
|
|
||||||
|
|
||||||
+ def postproc(self):
|
|
||||||
+ self.doRegexSub("/root/anaconda-ks.cfg", r"(\s*rootpw\s*).*", r"\1*** PASSWORD ELIDED ***")
|
|
||||||
+ return
|
|
||||||
diff -up sos-2.2/sos/plugins/general.py.orig sos-2.2/sos/plugins/general.py
|
|
||||||
--- sos-2.2/sos/plugins/general.py.orig 2012-03-06 16:34:54.774750731 +0000
|
|
||||||
+++ sos-2.2/sos/plugins/general.py 2012-03-06 16:34:57.638750796 +0000
|
|
||||||
@@ -47,7 +47,6 @@ class general(sos.plugintools.PluginBase
|
|
||||||
self.collectExtOutput("/bin/date", symlink = "date")
|
|
||||||
self.collectExtOutput("/usr/bin/uptime", symlink = "uptime")
|
|
||||||
self.collectExtOutput("/bin/dmesg")
|
|
||||||
- self.addCopySpec("/root/anaconda-ks.cfg")
|
|
||||||
self.collectExtOutput("/usr/sbin/alternatives --display java", symlink = "java")
|
|
||||||
self.collectExtOutput("/usr/bin/readlink -f /usr/bin/java")
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/hardware.py.orig sos-2.2/sos/plugins/hardware.py
|
|
||||||
--- sos-2.2/sos/plugins/hardware.py.orig 2012-05-18 11:32:58.359804933 +0100
|
|
||||||
+++ sos-2.2/sos/plugins/hardware.py 2012-05-18 11:33:17.075915442 +0100
|
|
||||||
@@ -37,6 +37,7 @@ class hardware(sos.plugintools.PluginBas
|
|
||||||
self.addCopySpec("/proc/s390dbf/tape")
|
|
||||||
self.addCopySpec("/sys/bus/scsi")
|
|
||||||
self.addCopySpec("/sys/state")
|
|
||||||
+ self.addCopySpec("/var/log/mcelog")
|
|
||||||
self.collectExtOutput("python /usr/share/rhn/up2date_client/hardware.py", suggest_filename="hardware.py")
|
|
||||||
self.collectExtOutput("""/bin/echo -e "lspci:\n" ; /sbin/lspci ; /bin/echo -e "\nlspci -nvv:\n" ; /sbin/lspci -nvv ; /bin/echo -e "\nlspci -tv:\n" ; /sbin/lspci -tv""", suggest_filename = "lspci", symlink = "lspci")
|
|
||||||
|
|
@ -1,108 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/apache.py.orig sos-2.2/sos/plugins/apache.py
|
|
||||||
--- sos-2.2/sos/plugins/apache.py.orig 2012-05-15 18:27:52.822404631 +0100
|
|
||||||
+++ sos-2.2/sos/plugins/apache.py 2012-05-15 18:28:03.005464754 +0100
|
|
||||||
@@ -18,10 +18,16 @@ class apache(sos.plugintools.PluginBase)
|
|
||||||
"""Apache related information
|
|
||||||
"""
|
|
||||||
optionList = [("log", "gathers all apache logs", "slow", False)]
|
|
||||||
+
|
|
||||||
+ def checkenabled(self):
|
|
||||||
+ if self.isInstalled("httpd"):
|
|
||||||
+ return True
|
|
||||||
+ return False
|
|
||||||
|
|
||||||
def setup(self):
|
|
||||||
self.addCopySpec("/etc/httpd/conf/httpd.conf")
|
|
||||||
self.addCopySpec("/etc/httpd/conf.d/*.conf")
|
|
||||||
+ self.addForbiddenPath("/etc/httpd/conf/password.conf")
|
|
||||||
if self.getOption("log"):
|
|
||||||
self.addCopySpec("/var/log/httpd/*")
|
|
||||||
return
|
|
||||||
diff -up sos-2.2/sos/plugins/ipa.py.orig sos-2.2/sos/plugins/ipa.py
|
|
||||||
--- sos-2.2/sos/plugins/ipa.py.orig 2012-05-15 18:27:52.823404637 +0100
|
|
||||||
+++ sos-2.2/sos/plugins/ipa.py 2012-05-15 18:28:03.006464760 +0100
|
|
||||||
@@ -20,18 +20,56 @@ import os
|
|
||||||
class ipa(sos.plugintools.PluginBase):
|
|
||||||
"""IPA diagnostic information
|
|
||||||
"""
|
|
||||||
- # ntp and dirserver stuff are covered in existing sos plugins, so we really only
|
|
||||||
- # need to get kerberos and ipa specific addons.
|
|
||||||
+
|
|
||||||
+ ipa_server = False
|
|
||||||
+ ipa_client = False
|
|
||||||
|
|
||||||
def checkenabled(self):
|
|
||||||
- if self.isInstalled("ipa-server") or os.path.exists("/etc/ipa"):
|
|
||||||
- return True
|
|
||||||
- return False
|
|
||||||
+ self.ipa_server = self.isInstalled("ipa-server")
|
|
||||||
+ self.ipa_client = self.isInstalled("ipa-client")
|
|
||||||
+ if self.ipa_server or self.ipa_client:
|
|
||||||
+ return True
|
|
||||||
+ return False
|
|
||||||
|
|
||||||
def setup(self):
|
|
||||||
- self.addCopySpec("/etc/dirsrv/ds.keytab")
|
|
||||||
- self.addCopySpec("/etc/ipa/ipa.conf")
|
|
||||||
- self.addCopySpec("/etc/krb5.conf")
|
|
||||||
- self.addCopySpec("/etc/krb5.keytab")
|
|
||||||
+ self.addCopySpec("/etc/hosts")
|
|
||||||
+ if self.ipa_server:
|
|
||||||
+ self.addCopySpec("/var/log/ipaserver-install.log")
|
|
||||||
+ self.addCopySpec("/var/log/ipareplica-install.log")
|
|
||||||
+ if self.ipa_client:
|
|
||||||
+ self.addCopySpec("/var/log/ipaclient-install.log")
|
|
||||||
+
|
|
||||||
+ self.addCopySpec("/var/log/ipaupgrade.log")
|
|
||||||
+
|
|
||||||
+ self.addCopySpec("/var/log/krb5kdc.log")
|
|
||||||
+
|
|
||||||
+ self.addCopySpec("/var/log/pki-ca/debug")
|
|
||||||
+ self.addCopySpec("/var/log/pki-ca/catalina.out")
|
|
||||||
+ self.addCopySpec("/var/log/pki-ca/system")
|
|
||||||
+ self.addCopySpec("/var/log/pki-ca/transactions")
|
|
||||||
+ self.addForbiddenPath("/etc/pki/nssdb/key*")
|
|
||||||
+ self.addForbiddenPath("/etc/pki-ca/flatfile.txt")
|
|
||||||
+ self.addForbiddenPath("/etc/pki-ca/password.conf")
|
|
||||||
+ self.addForbiddenPath("/var/lib/pki-ca/alias/key*")
|
|
||||||
+
|
|
||||||
+ self.addCopySpec("/var/log/dirsrv/slapd-*/logs/access")
|
|
||||||
+ self.addCopySpec("/var/log/dirsrv/slapd-*/logs/errors")
|
|
||||||
+ self.addCopySpec("/etc/dirsrv/slapd-*/dse.ldif")
|
|
||||||
+ self.addCopySpec("/etc/dirsrv/slapd-*/schema/99user.ldif")
|
|
||||||
+ self.addForbiddenPath("/etc/dirsrv/slapd-*/key*")
|
|
||||||
+ self.addForbiddenPath("/etc/dirsrv/slapd-*/pin.txt")
|
|
||||||
+ self.addForbiddenPath("/etc/dirsrv/slapd-*/pwdfile.txt")
|
|
||||||
+
|
|
||||||
+ self.collectExtOutput("ls -la /etc/dirsrv/slapd-*/schema/")
|
|
||||||
+
|
|
||||||
+ self.collectExtOutput("ipa-getcert list")
|
|
||||||
+
|
|
||||||
+ self.collectExtOutput("certutil -L -d /etc/httpd/alias/")
|
|
||||||
+ self.collectExtOutput("certutil -L -d /etc/dirsrv/slapd-*/")
|
|
||||||
+
|
|
||||||
+ self.collectExtOutput("klist -ket /etc/dirsrv/ds.keytab")
|
|
||||||
+ self.collectExtOutput("klist -ket /etc/httpd/conf/ipa.keytab")
|
|
||||||
+ self.collectExtOutput("klist -ket /etc/krb5.keytab")
|
|
||||||
+
|
|
||||||
return
|
|
||||||
|
|
||||||
diff -up sos-2.2/sos/plugins/named.py.orig sos-2.2/sos/plugins/named.py
|
|
||||||
--- sos-2.2/sos/plugins/named.py.orig 2012-05-15 18:27:52.825404648 +0100
|
|
||||||
+++ sos-2.2/sos/plugins/named.py 2012-05-15 18:28:03.006464760 +0100
|
|
||||||
@@ -40,5 +40,15 @@ class named(sos.plugintools.PluginBase):
|
|
||||||
self.addCopySpec(self.getDnsDir(cfg))
|
|
||||||
self.addForbiddenPath(join(self.getDnsDir(cfg),"chroot/dev"))
|
|
||||||
self.addForbiddenPath(join(self.getDnsDir(cfg),"chroot/proc"))
|
|
||||||
+
|
|
||||||
+ self.addCopySpec("/etc/named/")
|
|
||||||
self.addCopySpec("/etc/sysconfig/named")
|
|
||||||
+ self.collectExtOutput("klist -ket /etc/named.keytab")
|
|
||||||
+ self.addForbiddenPath("/etc/named.keytab")
|
|
||||||
return
|
|
||||||
+
|
|
||||||
+ def postproc(self):
|
|
||||||
+ match = r"(\s*arg \"password )[^\"]*"
|
|
||||||
+ subst = r"\1*** PASSWORD REDACTED ***"
|
|
||||||
+ self.doRegexSub("/etc/named.conf", match, subst)
|
|
||||||
+
|
|
@ -1,9 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/libvirt.py.orig sos-2.2/sos/plugins/libvirt.py
|
|
||||||
--- sos-2.2/sos/plugins/libvirt.py.orig 2012-05-01 18:33:36.212641798 +0100
|
|
||||||
+++ sos-2.2/sos/plugins/libvirt.py 2012-05-01 18:37:09.736902492 +0100
|
|
||||||
@@ -18,4 +18,4 @@ class libvirt(sos.plugintools.PluginBase
|
|
||||||
"""
|
|
||||||
def setup(self):
|
|
||||||
self.addCopySpec("/etc/libvirt/")
|
|
||||||
- self.addCopySpec("/var/log/libvirt/")
|
|
||||||
+ self.addCopySpec("/var/log/libvirt*")
|
|
@ -1,13 +0,0 @@
|
|||||||
diff -up sos-2.2/sos/plugins/gluster.py.orig sos-2.2/sos/plugins/gluster.py
|
|
||||||
--- sos-2.2/sos/plugins/gluster.py.orig 2012-05-23 13:48:59.093154956 +0100
|
|
||||||
+++ sos-2.2/sos/plugins/gluster.py 2012-05-23 13:53:17.685160857 +0100
|
|
||||||
@@ -61,6 +61,9 @@ class gluster(sos.plugintools.PluginBase
|
|
||||||
self.addCopySpec("/var/lib/glusterd/")
|
|
||||||
self.addForbiddenPath("/var/lib/glusterd/geo-replication/secret.pem")
|
|
||||||
|
|
||||||
+ # collect unified file and object storage configuration
|
|
||||||
+ self.addCopySpec("/etc/swift/")
|
|
||||||
+
|
|
||||||
# glusterfs-server rpm scripts stash this on migration to 3.3.x
|
|
||||||
self.addCopySpec("/etc/glusterd.rpmsave")
|
|
||||||
|
|
239
sos.spec
239
sos.spec
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
Summary: A set of tools to gather troubleshooting information from a system
|
Summary: A set of tools to gather troubleshooting information from a system
|
||||||
Name: sos
|
Name: sos
|
||||||
Version: 2.2
|
Version: 3.0
|
||||||
Release: 31%{?dist}
|
Release: 1%{?dist}
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
Source0: https://fedorahosted.org/releases/s/o/sos/%{name}-%{version}.tar.gz
|
Source0: https://people.redhat.com/breeves/sos/releases/sos-3.0.tar.gz
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
@ -13,75 +13,10 @@ Url: http://fedorahosted.org/sos
|
|||||||
BuildRequires: python-devel
|
BuildRequires: python-devel
|
||||||
BuildRequires: gettext
|
BuildRequires: gettext
|
||||||
Requires: libxml2-python
|
Requires: libxml2-python
|
||||||
|
Requires: rpm-python
|
||||||
Requires: tar
|
Requires: tar
|
||||||
Requires: bzip2
|
Requires: bzip2
|
||||||
Requires: xz
|
Requires: xz
|
||||||
Requires: rpm-python
|
|
||||||
Provides: sysreport = 1.4.3-13
|
|
||||||
Obsoletes: sysreport
|
|
||||||
|
|
||||||
Patch0: sos-bz582259.patch
|
|
||||||
Patch1: sos-bz584253.patch
|
|
||||||
Patch2: sos-bz585942.patch
|
|
||||||
Patch3: sos-bz622527-add-anacrontab.patch
|
|
||||||
Patch4: sos-bz622528-redhat-release-6-fixes.patch
|
|
||||||
Patch5: sos-bz622784-parted-dumpe2fs-s390.patch
|
|
||||||
Patch6: sos-bz624162-add-sssd.patch
|
|
||||||
Patch7: sos-bz622407-cluster-el6-fixes.patch
|
|
||||||
Patch8: sos-bz678665-collect-entitlement-certs.patch
|
|
||||||
Patch9: sos-bz659467-startup-drop-LC_ALL.patch
|
|
||||||
Patch10: sos-bz676522-collect-etc-dhcp.patch
|
|
||||||
Patch11: sos-bz675559-devicemapper-collect-ls-tree.patch
|
|
||||||
Patch12: sos-bz679433-filesys-add-lsblk-output.patch
|
|
||||||
Patch13: sos-bz622784-filesys-no-print-regex-debug.patch
|
|
||||||
Patch14: sos-bz689387-use-sha256-in-fips-mode.patch
|
|
||||||
Patch15: sos-bz600813-collect-repolist-by-default.patch
|
|
||||||
Patch16: sos-bz673244-add-infiniband-plugin.patch
|
|
||||||
patch17: sos-bz676656-add-iscsi-target-plugin.patch
|
|
||||||
Patch18: sos-bz682124-add-nslcd-conf-to-ldap-plugin.patch
|
|
||||||
Patch19: sos-bz683404-fix-autofs-LC_ALL-usage.patch
|
|
||||||
Patch20: sos-bz691477-fix-lsusb-and-add-t-and-v.patch
|
|
||||||
Patch21: sos-bz726360-qpidd-extend.patch
|
|
||||||
Patch22: sos-bz726427-add-ethtool-acg.patch
|
|
||||||
Patch23: sos-2.2-bz704383-fix-lvm-data-collection.patch
|
|
||||||
Patch24: sos-2.2-bz709491-add-vmmemctl-to-vmware-plugin.patch
|
|
||||||
Patch25: sos-bz694813-general-collect-etc-init-and-fix-whitespace.patch
|
|
||||||
Patch26: sos-bz713449-dont-strip-command-output.patch
|
|
||||||
Patch27: sos-bz721163-add-ipv6-neighbour-table-to-networking-plugin.patch
|
|
||||||
Patch28: sos-bz729455-collect-basic-cgroups-data.patch
|
|
||||||
Patch29: sos-bz714293-collect-etc-rhsm.patch
|
|
||||||
Patch30: sos-bz683219-truncate-large-files.patch
|
|
||||||
Patch31: sos-bz697899-collect-brctl-output.patch
|
|
||||||
Patch32: sos-bz736718-fix-hardware-plugin-paths.patch
|
|
||||||
Patch33: sos-bz736718-fix-hardware.py-exec.patch
|
|
||||||
Patch34: sos-bz691477-support-new-usbutils.patch
|
|
||||||
Patch35: sos-bz750607-forbid-more-pki-paths.patch
|
|
||||||
Patch36: sos-bz760995-fence_virt-conf.patch
|
|
||||||
Patch37: sos-bz730641-fix-prox-net.patch
|
|
||||||
Patch38: sos-bz760424-gather-cpufreq-info.patch
|
|
||||||
Patch39: sos-bz751273-fix-brctl-showstp.patch
|
|
||||||
Patch40: sos-bz749919-add-modprobe-dot-d.patch
|
|
||||||
Patch41: sos-bz782589-fix-symlink-target-collection.patch
|
|
||||||
Patch42: sos-bz749262-fix-sat-proxy-package-detection.patch
|
|
||||||
Patch43: sos-bz739080-collect-stderr.patch
|
|
||||||
Patch44: sos-bz784874-collect-proc-cgroups.patch
|
|
||||||
Patch45: sos-bz784862-collect-proc-irq.patch
|
|
||||||
Patch46: sos-bz767827-fix-rpm-qa-for-long-pkg-name.patch
|
|
||||||
Patch47: sos-bz766583-allow-nonroot-symlinks.patch
|
|
||||||
Patch48: sos-bz771501-fix-rsyslog-collection-and-size-limit.patch
|
|
||||||
Patch49: sos-bz749279-fix-rhn-el6-tomcat.patch
|
|
||||||
Patch50: sos-bz790402-obscure-anaconda-ks-passwords.patch
|
|
||||||
Patch51: sos-bz784061-gluster-sunrpc.patch
|
|
||||||
Patch52: sos-bz752666-cloudforms-debug.patch
|
|
||||||
Patch53: sos-bz782339-unbreak-logging.patch
|
|
||||||
Patch54: sos-bz771393-improve-report-name-sanitization.patch
|
|
||||||
Patch55: sos-bz789096-kernel_realtime.patch
|
|
||||||
Patch56: sos-bz752549-add-gluster-module.patch
|
|
||||||
Patch57: sos-bz752549-gluster-forbid-more-pem-paths.patch
|
|
||||||
Patch58: sos-bz814474-libvirt-wildcard-logs.patch
|
|
||||||
Patch59: sos-bz810702-hw-collect-mcelog.patch
|
|
||||||
Patch60: sos-bz822442-collect-etc-swift-in-gluster.patch
|
|
||||||
Patch61: sos-bz812395-ipa-updates.patch
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Sos is a set of tools that gathers information about system
|
Sos is a set of tools that gathers information about system
|
||||||
@ -91,69 +26,6 @@ support technicians and developers.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1
|
|
||||||
%patch1 -p1
|
|
||||||
%patch2 -p1
|
|
||||||
%patch3 -p1
|
|
||||||
%patch4 -p1
|
|
||||||
%patch5 -p1
|
|
||||||
%patch6 -p1
|
|
||||||
%patch7 -p1
|
|
||||||
%patch8 -p1
|
|
||||||
%patch9 -p1
|
|
||||||
%patch10 -p1
|
|
||||||
%patch11 -p1
|
|
||||||
%patch12 -p1
|
|
||||||
%patch13 -p1
|
|
||||||
%patch14 -p1
|
|
||||||
%patch15 -p1
|
|
||||||
%patch16 -p1
|
|
||||||
%patch17 -p1
|
|
||||||
%patch17 -p1
|
|
||||||
%patch18 -p1
|
|
||||||
%patch19 -p1
|
|
||||||
%patch20 -p1
|
|
||||||
%patch21 -p1
|
|
||||||
%patch22 -p1
|
|
||||||
%patch23 -p1
|
|
||||||
%patch24 -p1
|
|
||||||
%patch25 -p1
|
|
||||||
%patch26 -p1
|
|
||||||
%patch27 -p1
|
|
||||||
%patch28 -p1
|
|
||||||
%patch29 -p1
|
|
||||||
%patch30 -p1
|
|
||||||
%patch31 -p1
|
|
||||||
%patch32 -p1
|
|
||||||
%patch33 -p1
|
|
||||||
%patch34 -p1
|
|
||||||
%patch35 -p1
|
|
||||||
%patch36 -p1
|
|
||||||
%patch37 -p1
|
|
||||||
%patch38 -p1
|
|
||||||
%patch39 -p1
|
|
||||||
%patch40 -p1
|
|
||||||
%patch41 -p1
|
|
||||||
%patch42 -p1
|
|
||||||
%patch43 -p1
|
|
||||||
%patch44 -p1
|
|
||||||
%patch45 -p1
|
|
||||||
%patch46 -p1
|
|
||||||
%patch47 -p1
|
|
||||||
%patch48 -p1
|
|
||||||
%patch49 -p1
|
|
||||||
%patch50 -p1
|
|
||||||
%patch51 -p1
|
|
||||||
%patch52 -p1
|
|
||||||
%patch53 -p1
|
|
||||||
%patch54 -p1
|
|
||||||
%patch55 -p1
|
|
||||||
%patch56 -p1
|
|
||||||
%patch57 -p1
|
|
||||||
%patch58 -p1
|
|
||||||
%patch59 -p1
|
|
||||||
%patch60 -p1
|
|
||||||
%patch61 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make
|
make
|
||||||
@ -173,45 +45,120 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
%{python_sitelib}/*
|
%{python_sitelib}/*
|
||||||
%{_mandir}/man1/*
|
%{_mandir}/man1/*
|
||||||
%{_mandir}/man5/*
|
%{_mandir}/man5/*
|
||||||
%doc README TODO LICENSE ChangeLog doc/*
|
%doc AUTHORS README.md LICENSE
|
||||||
%config(noreplace) %{_sysconfdir}/sos.conf
|
%config(noreplace) %{_sysconfdir}/sos.conf
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2-31
|
* Mon Jun 10 2013 Bryn M. Reeves <bmr@redhat.com> = 3.0-1
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
- New upstream release
|
||||||
|
|
||||||
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2-30
|
* Thu May 23 2013 Bryn M. Reeves <bmr@redhat.com> = 2.2-39
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
- Always invoke tar with '-f-' option
|
||||||
|
Resolves: bz966602
|
||||||
|
|
||||||
* Wed May 23 2012 Bryn M. Reeves <bmr@redhat.com> = 2.2-29.el6
|
* Mon Jan 21 2013 Bryn M. Reeves <bmr@redhat.com> = 2.2-38
|
||||||
|
- Fix interactive mode regression when --ticket unspecified
|
||||||
|
Resolves: bz822113
|
||||||
|
|
||||||
|
* Fri Jan 18 2013 Bryn M. Reeves <bmr@redhat.com> = 2.2-37
|
||||||
|
- Fix propagation of --ticket parameter in interactive mode
|
||||||
|
Resolves: bz822113
|
||||||
|
|
||||||
|
* Thu Jan 17 2013 Bryn M. Reeves <bmr@redhat.com> = 2.2-36
|
||||||
|
- Revert OpenStack patch
|
||||||
|
Resolves: bz840057
|
||||||
|
|
||||||
|
* Wed Jan 9 2013 Bryn M. Reeves <bmr@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@redhat.com> = 2.2-34
|
||||||
|
- Add support for content delivery hosts to RHUI module
|
||||||
|
Resolves: bz821323
|
||||||
|
|
||||||
|
* Thu Oct 18 2012 Bryn M. Reeves <bmr@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@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@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@redhat.com> = 2.2-29
|
||||||
- Collect the swift configuration directory in gluster module
|
- Collect the swift configuration directory in gluster module
|
||||||
Resolves: bz822442
|
Resolves: bz822442
|
||||||
- Update IPA module and related plug-ins
|
- Update IPA module and related plug-ins
|
||||||
Resolves: bz812395
|
Resolves: bz812395
|
||||||
|
|
||||||
* Fri May 18 2012 Bryn M. Reeves <bmr@redhat.com> = 2.2-28.el6
|
* Fri May 18 2012 Bryn M. Reeves <bmr@redhat.com> = 2.2-28
|
||||||
- Collect mcelog files in the hardware module
|
- Collect mcelog files in the hardware module
|
||||||
Resolves: bz810702
|
Resolves: bz810702
|
||||||
|
|
||||||
* Wed May 02 2012 Bryn M. Reeves <bmr@redhat.com> = 2.2-27.el6
|
* Wed May 02 2012 Bryn M. Reeves <bmr@redhat.com> = 2.2-27
|
||||||
- Add nfs statedump collection to gluster module
|
- Add nfs statedump collection to gluster module
|
||||||
Resolves: bz752549
|
Resolves: bz752549
|
||||||
|
|
||||||
* Tue May 01 2012 Bryn M. Reeves <bmr@redhat.com> = 2.2-26.el6
|
* Tue May 01 2012 Bryn M. Reeves <bmr@redhat.com> = 2.2-26
|
||||||
- Use wildcard to match possible libvirt log paths
|
- Use wildcard to match possible libvirt log paths
|
||||||
Resolves: bz814474
|
Resolves: bz814474
|
||||||
|
|
||||||
* Mon Apr 23 2012 Bryn M. Reeves <bmr@redhat.com> = 2.2-25.el6
|
* Mon Apr 23 2012 Bryn M. Reeves <bmr@redhat.com> = 2.2-25
|
||||||
- Add forbidden paths for new location of gluster private keys
|
- Add forbidden paths for new location of gluster private keys
|
||||||
Resolves: bz752549
|
Resolves: bz752549
|
||||||
|
|
||||||
* Fri Mar 9 2012 Bryn M. Reeves <bmr@redhat.com> = 2.2-24.el6
|
* Fri Mar 9 2012 Bryn M. Reeves <bmr@redhat.com> = 2.2-24
|
||||||
- Fix katello and aeolus command string syntax
|
- Fix katello and aeolus command string syntax
|
||||||
Resolves: bz752666
|
Resolves: bz752666
|
||||||
- Remove stray hunk from gluster module patch
|
- Remove stray hunk from gluster module patch
|
||||||
Resolves: bz784061
|
Resolves: bz784061
|
||||||
|
|
||||||
* Thu Mar 8 2012 Bryn M. Reeves <bmr@redhat.com> = 2.2-22.el6
|
* Thu Mar 8 2012 Bryn M. Reeves <bmr@redhat.com> = 2.2-22
|
||||||
- Correct aeolus debug invocation in CloudForms module
|
- Correct aeolus debug invocation in CloudForms module
|
||||||
Resolves: bz752666
|
Resolves: bz752666
|
||||||
- Update gluster module for gluster-3.3
|
- Update gluster module for gluster-3.3
|
||||||
@ -221,7 +168,7 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
- Add support for collecting gluster configuration and logs
|
- Add support for collecting gluster configuration and logs
|
||||||
Resolves: bz752549
|
Resolves: bz752549
|
||||||
|
|
||||||
* Wed Mar 7 2012 Bryn M. Reeves <bmr@redhat.com> = 2.2-19.el6
|
* Wed Mar 7 2012 Bryn M. Reeves <bmr@redhat.com> = 2.2-19
|
||||||
- Collect additional diagnostic information for realtime systems
|
- Collect additional diagnostic information for realtime systems
|
||||||
Resolves: bz789096
|
Resolves: bz789096
|
||||||
- Improve sanitization of RHN user and case number in report name
|
- Improve sanitization of RHN user and case number in report name
|
||||||
@ -233,7 +180,7 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
- Add support for Subscription Asset Manager diagnostics
|
- Add support for Subscription Asset Manager diagnostics
|
||||||
Resolves: bz752670
|
Resolves: bz752670
|
||||||
|
|
||||||
* Tue Mar 6 2012 Bryn M. Reeves <bmr@redhat.com> = 2.2-18.el6
|
* Tue Mar 6 2012 Bryn M. Reeves <bmr@redhat.com> = 2.2-18
|
||||||
- Collect fence_virt.conf in cluster module
|
- Collect fence_virt.conf in cluster module
|
||||||
Resolves: bz760995
|
Resolves: bz760995
|
||||||
- Fix collection of /proc/net directory tree
|
- Fix collection of /proc/net directory tree
|
||||||
|
Loading…
Reference in New Issue
Block a user