cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH 0/2] indirectly simplify cluster.rng
@ 2013-02-28 21:37 Jan Pokorný
  2013-02-28 21:37 ` [Cluster-devel] [PATCH 1/2] Node Assassin: add support for metadata Jan Pokorný
  2013-02-28 21:37 ` [Cluster-devel] [PATCH 2/2] lib: remove static metadata from fence.rng.head Jan Pokorný
  0 siblings, 2 replies; 3+ messages in thread
From: Jan Pokorný @ 2013-02-28 21:37 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Hello,

I've noticed how stale some parts in resulting cluster.rng schema are.
Following patches aim to solve the FA part;  first we enable native
metadata generating for Node Assassin agent, then nothing prevents us
to drop static non-generated FA part of schema completely.

Jan Pokorn? (2):
  Node Assassin: add support for metadata
  lib: remove static metadata from fence.rng.head

 fence/agents/lib/fence.rng.head            | 129 -----------------------------
 fence/agents/node_assassin/fence_na.lib.in |  50 +++++++++++
 fence/agents/node_assassin/fence_na.pl     |   9 +-
 3 files changed, 58 insertions(+), 130 deletions(-)

-- 
1.7.11.7



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Cluster-devel] [PATCH 1/2] Node Assassin: add support for metadata
  2013-02-28 21:37 [Cluster-devel] [PATCH 0/2] indirectly simplify cluster.rng Jan Pokorný
@ 2013-02-28 21:37 ` Jan Pokorný
  2013-02-28 21:37 ` [Cluster-devel] [PATCH 2/2] lib: remove static metadata from fence.rng.head Jan Pokorný
  1 sibling, 0 replies; 3+ messages in thread
From: Jan Pokorný @ 2013-02-28 21:37 UTC (permalink / raw)
  To: cluster-devel.redhat.com

To be honest, untested.

Signed-off-by: Jan Pokorn? <jpokorny@redhat.com>
---
 fence/agents/node_assassin/fence_na.lib.in | 50 ++++++++++++++++++++++++++++++
 fence/agents/node_assassin/fence_na.pl     |  9 +++++-
 2 files changed, 58 insertions(+), 1 deletion(-)

diff --git a/fence/agents/node_assassin/fence_na.lib.in b/fence/agents/node_assassin/fence_na.lib.in
index 67d5367..84d3bf2 100644
--- a/fence/agents/node_assassin/fence_na.lib.in
+++ b/fence/agents/node_assassin/fence_na.lib.in
@@ -918,4 +918,54 @@ sub _make_hash_reference
 	_add_hash_reference($href, $_href);
 }
 
+
+sub print_metadata
+{
+print '<?xml version="1.0" ?>
+<resource-agent name="fence_na" shortdesc="I/O Fencing agent for Node Assassin." >
+<longdesc>
+fence_na is an I/O Fencing agent for Node Assassin, open hardware, open source cluster fence device.
+</longdesc>
+<vendor-url>http://nodeassassin.org</vendor-url>
+<parameters>
+        <parameter name="action" unique="1" required="1">
+                <content type="string" />
+		<shortdesc lang="en">Operation to perform. Valid operations: on, off, reboot, status, list, metadata, release, boot or shutdown</shortdesc>
+        </parameter>
+        <parameter name="ipaddr" unique="1" required="1">
+                <content type="string" />
+                <shortdesc lang="en">Node Assassin IP or name to talk to</shortdesc>
+        </parameter>
+        <parameter name="login" unique="1" required="1">
+                <content type="string" />
+                <shortdesc lang="en">Login name used to log into the Node Assassin(s)</shortdesc>
+        </parameter>
+        <parameter name="passwd" unique="1" required="0">
+                <content type="string" />
+                <shortdesc lang="en">Password needed to access the Node Assassin(s)</shortdesc>
+        </parameter>
+        <parameter name="passwd_script" unique="1" required="0">
+                <content type="string" />
+                <shortdesc lang="en">Script to retrieve password (not implemented)</shortdesc>
+        </parameter>
+        <parameter name="quiet" unique="0" required="0">
+                <content type="boolean" />
+                <shortdesc lang="en">Suppress output</shortdesc>
+        </parameter>
+</parameters>
+<actions>
+        <action name="on" />
+        <action name="off" />
+	<action name="reboot" />
+        <action name="status" />
+        <action name="metadata" />
+        <action name="list" />
+        <action name="release" />
+        <action name="boot" />
+        <action name="shutdown" />
+</actions>
+</resource-agent>
+';
+}
+
 1;
diff --git a/fence/agents/node_assassin/fence_na.pl b/fence/agents/node_assassin/fence_na.pl
index bc7fb00..249bc55 100644
--- a/fence/agents/node_assassin/fence_na.pl
+++ b/fence/agents/node_assassin/fence_na.pl
@@ -140,9 +140,16 @@ if (($conf->{na}{login} ne $conf->{'system'}{username}) or ($conf->{na}{passwd}
 # What do?                                                                    #
 ###############################################################################
 
+record($conf, $log, "Action: ........ [$conf->{na}{action}].\n") if $conf->{'system'}{debug};
+
+if ($conf->{na}{action} eq "metadata")
+{
+	print_metadata();
+	do_exit($conf, $log, 0);
+}
+
 # When asked to 'monitor' or 'list'. being multi-port, this will return a CSV
 # of nodes and their aliases where found in the config file.
-record($conf, $log, "Action: ........ [$conf->{na}{action}].\n") if $conf->{'system'}{debug};
 if (($conf->{na}{action} eq "monitor") or ($conf->{na}{action} eq "list"))
 {
 	record($conf, $log, "Calling the 'show_list' function.\n") if $conf->{'system'}{debug};
-- 
1.7.11.7



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Cluster-devel] [PATCH 2/2] lib: remove static metadata from fence.rng.head
  2013-02-28 21:37 [Cluster-devel] [PATCH 0/2] indirectly simplify cluster.rng Jan Pokorný
  2013-02-28 21:37 ` [Cluster-devel] [PATCH 1/2] Node Assassin: add support for metadata Jan Pokorný
@ 2013-02-28 21:37 ` Jan Pokorný
  1 sibling, 0 replies; 3+ messages in thread
From: Jan Pokorný @ 2013-02-28 21:37 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Possible as:
- rps10: droped in aa905c0bf7a717648b44069e4a192f7afe0cda61
  (4 years back)
- brocade, mcdata, sanbox2, bladecenter, bullpap, ipmilan:
  generate metadata natively
- vixel, egenera, xcat: ditto
- na (Node Assassin): metadata enabled by previous commit

Signed-off-by: Jan Pokorn? <jpokorny@redhat.com>
---
 fence/agents/lib/fence.rng.head | 129 ----------------------------------------
 1 file changed, 129 deletions(-)

diff --git a/fence/agents/lib/fence.rng.head b/fence/agents/lib/fence.rng.head
index 632bb53..22f4452 100644
--- a/fence/agents/lib/fence.rng.head
+++ b/fence/agents/lib/fence.rng.head
@@ -3,134 +3,5 @@
   <optional>
    <choice>
     <!-- begin specific fence devices -->
-       <!-- begin non-generated device definitions -->
-       <!-- RPS10 -->
-       <group rha:name="fence_rps10" rha:description="RPS10 Serial Switch" >
-        <attribute name="device" rha:description="The device the switch
-            is connected to on the controlling host."
-            rha:sample="/dev/ttys2"/>
-        <attribute name="port" rha:description="The switch outlet
-            number." rha:sample="2"/>
-       </group>
-       <!--FIXME: Determine if the following group should exclude
-       the auth and lanplus attributes. Those attributes apply only to
-       the impilan fence device.-->
-       <!-- Brocade, McData, SANBox2, Bladecenter,bullpap, ipmilan -->
-       <!-- FIXME split apart and add rha:name hints for
-            configuration utilities -->
-       <group>
-        <attribute name="ipaddr" rha:description="IP address or the name
-            of the device." rha:sample="rack007"/>
-        <optional>
-        <attribute name="login" rha:description="The login name used to
-            access the device. " rha:sample="admin"/>
-        </optional>
-        <optional>
-        <attribute name="passwd" rha:description="The password used to
-            authenticate the connection to the
-            device." rha:sample="pa$$word"/>
-        </optional>
-        <optional>
-        <attribute name="passwd_script" rha:description="The script that
-            supplies a password for access to the fence device. Using
-            this supersedes the Password parameter." rha:sample=""/>
-        </optional>
-        <optional>
-         <attribute name="auth" rha:description="For IPMI LAN
-             only. Authentication Type: none, password,
-             md2, or md5" rha:sample=""/>
-        </optional>
-        <optional>
-         <attribute name="lanplus" rha:description="For IPMI LAN only.
-             Set value to either True or 1; leave out for false."
-             rha:sample="True"/>
-        </optional>
-       </group>
-       <!-- Vixel -->
-       <group rha:name="fence_vixel">
-        <optional>
-         <attribute name="ipaddr" rha:description="IP address or the
-             name of the device." rha:sample="10.1.0.1"/>
-        </optional>
-        <optional>
-        <attribute name="passwd" rha:description="The password used to
-            authenticate the connection to the
-            device." rha:sample="pa$$word"/>
-        </optional>
-        <optional>
-         <attribute name="passwd_script" rha:description="The script
-             that supplies a password for access to the
-             fence device. Using this supersedes the Password
-             parameter." rha:sample=""/>
-        </optional>
-       </group>
-       <!-- Egenera -->
-       <!-- FIXME: Note that in the schema web page each is listed as a
-       parameter. Likewise for Conga. In addition, Conga shows Ipan
-       and pserver parameters. Also, in Conga, the esh parameter is
-       an optional ESH path. Presumably those should be attributes in
-       the schema. We need more invormation on this. -->
-       <group rha:name="fence_egenera">
-        <optional>
-         <attribute name="cserver" rha:description="The hostname (and
-            optionally the username in the form of username@hostname)
-            assigned to the device. Refer to the fence_egenera(8) man
-            page for more information." rha:sample=""/>
-        </optional>
-        <optional>
-         <attribute name="pserver" rha:description="The pserver to operate on.  fence_egenera(8)" />
-        </optional>
-        <optional>
-         <attribute name="lpan" rha:description="The lpan to operate on.  fence_egenera(8)" />
-        </optional>
-        <optional>
-         <attribute name="action" rha:description="The action to perform (reboot, off, on, or status).  fence_egenera(8)" />
-        </optional>
-        <optional>
-         <attribute name="esh" rha:description="Path to the esh command on the cserver.  fence_egenera(8)" />
-        </optional>
-        <optional>
-         <attribute name="user" rha:description="See fence_egenera(8)" />
-        </optional>
-        <optional>
-         <attribute name="delay" rha:description="Wait this many seconds before fencing is started.  fence_egenera(8)" />
-        </optional>
-       </group>
-       <!-- FIXME: It appears that xCat is no longer supported. Found no
-       fence agents for x Cat in RHEL 5.3. -->
-       <!-- xCAT -->
-       <group rha:name="fence_xcat">
-        <attribute name="rpowerpath" rha:description="" rha:sample=""/>
-       </group>
-       <group rha:name="fence_na" rha:description="Node Assassin">
-         <optional>
-           <attribute name="option"/> <!-- deprecated; for compatibility.  use "action" -->
-         </optional>
-        <!-- I don't think I need this yet.
-         <optional>
-           <attribute name="auth" rha:description="Node Assassin Auth type (password or none)" />
-         </optional>
-        -->
-         <optional>
-           <attribute name="ipaddr" rha:description="Node Assassin IP or name to talk to" />
-         </optional>
-         <optional>
-           <attribute name="passwd" rha:description="Password needed to access the Node Assassin(s)" />
-         </optional>
-         <optional>
-           <attribute name="passwd_script" rha:description="Script to retrieve password (not implemented)" />
-         </optional>
-         <optional>
-           <attribute name="login" rha:description="Login name used to log into the Node Assassin(s)" />
-         </optional>
-         <optional>
-           <attribute name="action" rha:description="Operation to perform. Valid operations: on, off, reboot, status, list, release, boot or shutdown" />
-         </optional>
-         <optional>
-           <attribute name="quiet" rha:description="Supress output" />
-         </optional>
-       </group>
-
-       <!-- end non-generated device definitions -->
 
        <!-- begin auto-generated device definitions -->
-- 
1.7.11.7



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-02-28 21:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-28 21:37 [Cluster-devel] [PATCH 0/2] indirectly simplify cluster.rng Jan Pokorný
2013-02-28 21:37 ` [Cluster-devel] [PATCH 1/2] Node Assassin: add support for metadata Jan Pokorný
2013-02-28 21:37 ` [Cluster-devel] [PATCH 2/2] lib: remove static metadata from fence.rng.head Jan Pokorný

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).