cluster: RHEL6 - library: Metadata are not correct if agent does not support on/off

Marek Grác marx at fedoraproject.org
Thu Jan 20 09:41:58 UTC 2011


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=679d1f0a1e95bae746d22889fd731fee979676ee
Commit:        679d1f0a1e95bae746d22889fd731fee979676ee
Parent:        810b997550ff8390876eebfe86835ac26661a78b
Author:        Marek 'marx' Grac <mgrac at redhat.com>
AuthorDate:    Mon Oct 25 16:57:00 2010 +0200
Committer:     Marek 'marx' Grac <mgrac at redhat.com>
CommitterDate: Thu Jan 20 10:22:35 2011 +0100

library: Metadata are not correct if agent does not support on/off

Metadata actions are generated according to option io_fencing. Currently
only fence_sanbox is affected as fence_ifmib accepts both enable/disable
and on/off (so io_fencing is not used)

Resolves: rhbz#623266
---
 fence/agents/lib/fencing.py.py |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index da4b222..93756cc 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -483,9 +483,14 @@ def metadata(avail_opt, options, docs):
 			print "\t</parameter>"
 	print "</parameters>"
 	print "<actions>"
-	print "\t<action name=\"on\" />"
-	print "\t<action name=\"off\" />"
-	print "\t<action name=\"reboot\" />"
+	if avail_opt.count("io_fencing") == 0:
+		print "\t<action name=\"on\" />"
+		print "\t<action name=\"off\" />"
+		print "\t<action name=\"reboot\" />"
+	else:
+		print "\t<action name=\"enable\" />"
+		print "\t<action name=\"disable\" />"	
+
 	print "\t<action name=\"status\" />"
 	print "\t<action name=\"list\" />"
 	print "\t<action name=\"monitor\" />"


More information about the cluster-commits mailing list