diff options
author | astokes <astokes@ef72aa8b-4018-0410-8976-d6e080ef94d8> | 2009-09-08 16:14:49 +0000 |
---|---|---|
committer | astokes <astokes@ef72aa8b-4018-0410-8976-d6e080ef94d8> | 2009-09-08 16:14:49 +0000 |
commit | 4c63b0eb6c3e63c18a046fee95b8b444dfc3043b (patch) | |
tree | 16ceab3ceb472297127cebab254080e3200be5e5 /src/lib | |
parent | 07d4ddc84db47d4ff7aa80e15f854e078a879d1e (diff) | |
download | sos-4c63b0eb6c3e63c18a046fee95b8b444dfc3043b.tar.gz |
cluster.py - detect invalid fence id, state, and add proper xml validation when replacing cluster pwd in cluster.conf
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@631 ef72aa8b-4018-0410-8976-d6e080ef94d8
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/sos/plugins/cluster.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/sos/plugins/cluster.py b/src/lib/sos/plugins/cluster.py index adeec620..35d05948 100644 --- a/src/lib/sos/plugins/cluster.py +++ b/src/lib/sos/plugins/cluster.py @@ -246,7 +246,7 @@ class cluster(sos.plugintools.PluginBase): return def postproc(self): - self.doRegexSub("/etc/cluster/cluster.conf", r"(\s*\<fencedevice\s*.*\s*passwd\s*=\s*)\S+(\")", r"\1***") + self.doRegexSub("/etc/cluster/cluster.conf", r"(\s*\<fencedevice\s*.*\s*passwd\s*=\s*)\S+(\")", r"\1\"***\"") return def is_cluster_quorate(self): @@ -267,8 +267,11 @@ class cluster(sos.plugintools.PluginBase): # Diagnostic testing functions def test_fence_id(self): # resolves rhbz 499468 and 499472 - for line in commands.getoutput("/sbin/gfs_tool -v").split("\n")[1:]: + for line in commands.getoutput("/sbin/group_tool ls | grep -v '^\['").split("\n")[1:]: for a in line.split(): + # we can do this since fence id is a fix field if re.match('00000000', a): self.addDiagnose('Invalid fence id: %s' % (line,)) + if line.split()[-1] != 'none': + self.addDiagnose("Possible incorrect state: %s, for group: %s" % (line.split()[-1], line)) return |