diff options
Diffstat (limited to 'trunk/src/lib/sos/plugins/cluster.py')
-rw-r--r-- | trunk/src/lib/sos/plugins/cluster.py | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/trunk/src/lib/sos/plugins/cluster.py b/trunk/src/lib/sos/plugins/cluster.py deleted file mode 100644 index 595d940a..00000000 --- a/trunk/src/lib/sos/plugins/cluster.py +++ /dev/null @@ -1,78 +0,0 @@ -### 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 commands, os - -class cluster(sos.plugintools.PluginBase): - """cluster suite and GFS related information - """ - def checkenabled(self): - # enable if any related package is installed - for pkg in [ "ccs", "cman", "cman-kernel", "magma", "magma-plugins", - "rgmanager", "fence", "dlm", "dlm-kernel", "gulm", - "GFS", "GFS-kernel", "lvm2-cluster" ]: - if self.cInfo["policy"].pkgByName(pkg) != None: - return True - - # enable if any related file is present - for fname in [ "/etc/cluster/cluster.conf" ]: - try: os.stat(fname) - except:pass - else: return True - - # no data related to RHCS/GFS exists - return False - - 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") - self.addCopySpec("/etc/cluster.xml") - self.addCopySpec("/etc/cluster") - self.collectExtOutput("/usr/sbin/rg_test test /etc/cluster/cluster.conf") - self.addCopySpec("/proc/cluster") - self.collectExtOutput("/usr/bin/cman_tool status") - self.collectExtOutput("/usr/bin/cman_tool services") - self.collectExtOutput("/usr/bin/cman_tool -af nodes") - self.collectExtOutput("/usr/bin/ccs_tool lsnode") - self.collectExtOutput("/usr/bin/openais-cfgtool -s") - self.collectExtOutput("/usr/bin/clustat") - return - - def postproc(self): - self.doRegexSub("/etc/cluster/cluster.conf", r"(\s*\<fencedevice\s*.*\s*passwd\s*=\s*)\S+(\")", r"\1***") - return |