diff options
author | shnavid <shnavid@ef72aa8b-4018-0410-8976-d6e080ef94d8> | 2007-07-18 09:51:14 +0000 |
---|---|---|
committer | shnavid <shnavid@ef72aa8b-4018-0410-8976-d6e080ef94d8> | 2007-07-18 09:51:14 +0000 |
commit | 1528a2010cb81a11f255cdb7865855ae4741e8e8 (patch) | |
tree | b7483546ab943532318e534ab8b23f1b33a00ca3 /src/lib | |
parent | c49d8206f8954221d327af391c1cc1bfeaa0534c (diff) | |
download | sos-1528a2010cb81a11f255cdb7865855ae4741e8e8.tar.gz |
* initial diagnose() support for cluster plugin
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@218 ef72aa8b-4018-0410-8976-d6e080ef94d8
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/sos/plugins/cluster.py | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/lib/sos/plugins/cluster.py b/src/lib/sos/plugins/cluster.py index 1cead720..5ace5620 100644 --- a/src/lib/sos/plugins/cluster.py +++ b/src/lib/sos/plugins/cluster.py @@ -13,10 +13,34 @@ ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. import sos.plugintools +import commands class cluster(sos.plugintools.PluginBase): - """cluster related information + """cluster suite and GFS related information """ + def diagnose(self): + rhelver = self.cInfo["policy"].pkgDictByName("fedora-release")[0] + if rhelver == "6": + # 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) + for pkg in [ "ccs", "cman", "cman-kernel", "magma", "magma-plugins", "perl-Net-Telnet", "rgmanager", "fence" ]: + if self.cInfo["policy"].pkgByName(pkg) == None: + self.addDiagnose("required package is missing: %s" % pkg) + + # 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 [ "cman", "ccsd", "rgmanager", "fence" ]: + if commands.getstatus("/sbin/service %s status" % service): + self.addDiagnose("service %s is not running" % service) + + if not self.cInfo["policy"].runlevelDefault() in self.cInfo["policy"].runlevelByService(service): + self.addDiagnose("service %s is not started in default runlevel" % service) + + # FIXME: what locking are we using ? check if packages exist +# if self.cInfo["policy"].pkgByName(pkg) and self.cInfo["policy"].pkgByName(pkg) and not self.cInfo["policy"].pkgByName(pkg) + def setup(self): self.collectExtOutput("/sbin/fdisk -l") self.addCopySpec("/etc/cluster.conf") |