cluster: RHEL6 - doc: update cluster_conf.html
by Christine Caulfield
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=5c24c7c155e...
Commit: 5c24c7c155e0f06f8ad9ca739835eefcda0d6106
Parent: a3d1207e71f8b10a844e39dfd4908a3128d9a0f6
Author: Christine Caulfield <ccaulfie(a)redhat.com>
AuthorDate: Mon Jun 16 15:01:10 2014 +0100
Committer: Christine Caulfield <ccaulfie(a)redhat.com>
CommitterDate: Mon Jun 16 15:01:10 2014 +0100
doc: update cluster_conf.html
Signed-off-by: Christine Caulfield <ccaulfie(a)redhat.com>
---
doc/cluster_conf.html | 389 ++++++++++++++++++++++++++++---------------------
1 files changed, 223 insertions(+), 166 deletions(-)
diff --git a/doc/cluster_conf.html b/doc/cluster_conf.html
index 5bfafac..15a7ae8 100644
--- a/doc/cluster_conf.html
+++ b/doc/cluster_conf.html
@@ -3,8 +3,14 @@
<small><a href="#toc_tag_reference">Jump to Tag Reference</a></small><br/><br/>
<<a href="#tag_cluster">cluster</a> ...><br/>
<<a href="#tag_cman">cman</a> ...><br/>
- <<a href="#tag_multicast">multicast</a> .../><br/>
+ <<a href="#tag_multicast">multicast</a> ...><br/>
+ <a href="#ref_MULTICASTOPTS">MULTICASTOPTS</a><br/>
+ <<a href="#tag_multicast">/multicast</a>><br/>
+ <<a href="#tag_altmulticast">altmulticast</a> ...><br/>
+ <a href="#ref_MULTICASTOPTS">MULTICASTOPTS</a><br/>
+ <<a href="#tag_altmulticast">/altmulticast</a>><br/>
<<a href="#tag_cman">/cman</a>><br/>
+ <<a href="#tag_uidgid">uidgid</a> .../><br/>
<<a href="#tag_totem">totem</a> ...><br/>
<<a href="#tag_interface">interface</a> .../><br/>
<<a href="#tag_totem">/totem</a>><br/>
@@ -25,7 +31,7 @@
<<a href="#tag_logging">/logging</a>><br/>
<<a href="#tag_clusternodes">clusternodes</a>><br/>
<<a href="#tag_clusternode">clusternode</a> ...><br/>
- <<a href="#tag_altname">altname</a> .../><br/>
+ <a href="#ref_ALTNAME">ALTNAME</a><br/>
<a href="#ref_FENCE">FENCE</a><br/>
<a href="#ref_UNFENCE">UNFENCE</a><br/>
<<a href="#tag_clusternode">/clusternode</a>><br/>
@@ -47,91 +53,99 @@
<<a href="#tag_resources">resources</a>><br/>
<a href="#ref_CHILDREN">CHILDREN</a><br/>
<<a href="#tag_resources">/resources</a>><br/>
+ <<a href="#tag_resource-defaults">resource-defaults</a>><br/>
+ <a href="#ref_CHILDREN">CHILDREN</a><br/>
+ <<a href="#tag_resource-defaults">/resource-defaults</a>><br/>
<a href="#ref_SERVICE">SERVICE</a><br/>
<a href="#ref_VM">VM</a><br/>
<<a href="#tag_rm">/rm</a>><br/>
<<a href="#tag_clvmd">clvmd</a> .../><br/>
<<a href="#tag_cluster">/cluster</a>><br/>
+<br/><a name="ref_MULTICASTOPTS"/>MULTICASTOPTS definition<br/>
+<br/><a name="ref_ALTNAME"/>ALTNAME definition<br/>
+ <<a href="#tag_altname">altname</a> .../><br/>
+<br/><a name="ref_FENCE"/>FENCE definition<br/>
+ <<a href="#tag_fence">fence</a>><br/>
+ <<a href="#tag_method">method</a> ...><br/>
+ <a href="#ref_DEVICE">DEVICE</a><br/>
+ <<a href="#tag_method">/method</a>><br/>
+ <<a href="#tag_fence">/fence</a>><br/>
+<br/><a name="ref_UNFENCE"/>UNFENCE definition<br/>
+ <<a href="#tag_unfence">unfence</a>><br/>
+ <a href="#ref_DEVICE">DEVICE</a><br/>
+ <<a href="#tag_unfence">/unfence</a>><br/>
+<br/><a name="ref_DEVICE"/>DEVICE definition<br/>
+ <<a href="#tag_device">device</a> ...><br/>
+ <a href="#ref_FENCEDEVICEOPTIONS">FENCEDEVICEOPTIONS</a><br/>
+ <<a href="#tag_device">/device</a>><br/>
<br/><a name="ref_SERVICE"/>SERVICE definition<br/>
<<a href="#tag_service">service</a> ...><br/>
<a href="#ref_CHILDREN">CHILDREN</a><br/>
<<a href="#tag_service">/service</a>><br/>
-<br/><a name="ref_IP"/>IP definition<br/>
- <<a href="#tag_ip">ip</a> ...><br/>
- <a href="#ref_CHILDREN">CHILDREN</a><br/>
- <<a href="#tag_ip">/ip</a>><br/>
-<br/><a name="ref_NFSCLIENT"/>NFSCLIENT definition<br/>
- <<a href="#tag_nfsclient">nfsclient</a> ...><br/>
- <a href="#ref_CHILDREN">CHILDREN</a><br/>
- <<a href="#tag_nfsclient">/nfsclient</a>><br/>
-<br/><a name="ref_NFSEXPORT"/>NFSEXPORT definition<br/>
- <<a href="#tag_nfsexport">nfsexport</a> ...><br/>
- <a href="#ref_CHILDREN">CHILDREN</a><br/>
- <<a href="#tag_nfsexport">/nfsexport</a>><br/>
-<br/><a name="ref_SCRIPT"/>SCRIPT definition<br/>
- <<a href="#tag_script">script</a> ...><br/>
+<br/><a name="ref_ASEHAAGENT"/>ASEHAAGENT definition<br/>
+ <<a href="#tag_ASEHAagent">ASEHAagent</a> ...><br/>
<a href="#ref_CHILDREN">CHILDREN</a><br/>
- <<a href="#tag_script">/script</a>><br/>
-<br/><a name="ref_NETFS"/>NETFS definition<br/>
- <<a href="#tag_netfs">netfs</a> ...><br/>
+ <<a href="#tag_ASEHAagent">/ASEHAagent</a>><br/>
+<br/><a name="ref_SAPDATABASE"/>SAPDATABASE definition<br/>
+ <<a href="#tag_SAPDatabase">SAPDatabase</a> ...><br/>
<a href="#ref_CHILDREN">CHILDREN</a><br/>
- <<a href="#tag_netfs">/netfs</a>><br/>
-<br/><a name="ref_CLUSTERFS"/>CLUSTERFS definition<br/>
- <<a href="#tag_clusterfs">clusterfs</a> ...><br/>
+ <<a href="#tag_SAPDatabase">/SAPDatabase</a>><br/>
+<br/><a name="ref_SAPINSTANCE"/>SAPINSTANCE definition<br/>
+ <<a href="#tag_SAPInstance">SAPInstance</a> ...><br/>
<a href="#ref_CHILDREN">CHILDREN</a><br/>
- <<a href="#tag_clusterfs">/clusterfs</a>><br/>
+ <<a href="#tag_SAPInstance">/SAPInstance</a>><br/>
<br/><a name="ref_APACHE"/>APACHE definition<br/>
<<a href="#tag_apache">apache</a> ...><br/>
<a href="#ref_CHILDREN">CHILDREN</a><br/>
<<a href="#tag_apache">/apache</a>><br/>
-<br/><a name="ref_OPENLDAP"/>OPENLDAP definition<br/>
- <<a href="#tag_openldap">openldap</a> ...><br/>
- <a href="#ref_CHILDREN">CHILDREN</a><br/>
- <<a href="#tag_openldap">/openldap</a>><br/>
-<br/><a name="ref_SAMBA"/>SAMBA definition<br/>
- <<a href="#tag_samba">samba</a> ...><br/>
- <a href="#ref_CHILDREN">CHILDREN</a><br/>
- <<a href="#tag_samba">/samba</a>><br/>
-<br/><a name="ref_MYSQL"/>MYSQL definition<br/>
- <<a href="#tag_mysql">mysql</a> ...><br/>
+<br/><a name="ref_CLUSTERFS"/>CLUSTERFS definition<br/>
+ <<a href="#tag_clusterfs">clusterfs</a> ...><br/>
<a href="#ref_CHILDREN">CHILDREN</a><br/>
- <<a href="#tag_mysql">/mysql</a>><br/>
-<br/><a name="ref_POSTGRES-8"/>POSTGRES-8 definition<br/>
- <<a href="#tag_postgres-8">postgres-8</a> ...><br/>
+ <<a href="#tag_clusterfs">/clusterfs</a>><br/>
+<br/><a name="ref_FS"/>FS definition<br/>
+ <<a href="#tag_fs">fs</a> ...><br/>
<a href="#ref_CHILDREN">CHILDREN</a><br/>
- <<a href="#tag_postgres-8">/postgres-8</a>><br/>
-<br/><a name="ref_TOMCAT-6"/>TOMCAT-6 definition<br/>
- <<a href="#tag_tomcat-6">tomcat-6</a> ...><br/>
+ <<a href="#tag_fs">/fs</a>><br/>
+<br/><a name="ref_IP"/>IP definition<br/>
+ <<a href="#tag_ip">ip</a> ...><br/>
<a href="#ref_CHILDREN">CHILDREN</a><br/>
- <<a href="#tag_tomcat-6">/tomcat-6</a>><br/>
+ <<a href="#tag_ip">/ip</a>><br/>
<br/><a name="ref_LVM"/>LVM definition<br/>
<<a href="#tag_lvm">lvm</a> ...><br/>
<a href="#ref_CHILDREN">CHILDREN</a><br/>
<<a href="#tag_lvm">/lvm</a>><br/>
-<br/><a name="ref_VM"/>VM definition<br/>
- <<a href="#tag_vm">vm</a> ...><br/>
- <a href="#ref_CHILDREN">CHILDREN</a><br/>
- <<a href="#tag_vm">/vm</a>><br/>
-<br/><a name="ref_SAPINSTANCE"/>SAPINSTANCE definition<br/>
- <<a href="#tag_SAPInstance">SAPInstance</a> ...><br/>
- <a href="#ref_CHILDREN">CHILDREN</a><br/>
- <<a href="#tag_SAPInstance">/SAPInstance</a>><br/>
-<br/><a name="ref_SAPDATABASE"/>SAPDATABASE definition<br/>
- <<a href="#tag_SAPDatabase">SAPDatabase</a> ...><br/>
+<br/><a name="ref_MYSQL"/>MYSQL definition<br/>
+ <<a href="#tag_mysql">mysql</a> ...><br/>
<a href="#ref_CHILDREN">CHILDREN</a><br/>
- <<a href="#tag_SAPDatabase">/SAPDatabase</a>><br/>
+ <<a href="#tag_mysql">/mysql</a>><br/>
<br/><a name="ref_NAMED"/>NAMED definition<br/>
<<a href="#tag_named">named</a> ...><br/>
<a href="#ref_CHILDREN">CHILDREN</a><br/>
<<a href="#tag_named">/named</a>><br/>
-<br/><a name="ref_ASEHAAGENT"/>ASEHAAGENT definition<br/>
- <<a href="#tag_ASEHAagent">ASEHAagent</a> ...><br/>
+<br/><a name="ref_NETFS"/>NETFS definition<br/>
+ <<a href="#tag_netfs">netfs</a> ...><br/>
<a href="#ref_CHILDREN">CHILDREN</a><br/>
- <<a href="#tag_ASEHAagent">/ASEHAagent</a>><br/>
+ <<a href="#tag_netfs">/netfs</a>><br/>
+<br/><a name="ref_NFSCLIENT"/>NFSCLIENT definition<br/>
+ <<a href="#tag_nfsclient">nfsclient</a> ...><br/>
+ <a href="#ref_CHILDREN">CHILDREN</a><br/>
+ <<a href="#tag_nfsclient">/nfsclient</a>><br/>
+<br/><a name="ref_NFSEXPORT"/>NFSEXPORT definition<br/>
+ <<a href="#tag_nfsexport">nfsexport</a> ...><br/>
+ <a href="#ref_CHILDREN">CHILDREN</a><br/>
+ <<a href="#tag_nfsexport">/nfsexport</a>><br/>
<br/><a name="ref_NFSSERVER"/>NFSSERVER definition<br/>
<<a href="#tag_nfsserver">nfsserver</a> ...><br/>
<a href="#ref_CHILDREN">CHILDREN</a><br/>
<<a href="#tag_nfsserver">/nfsserver</a>><br/>
+<br/><a name="ref_OPENLDAP"/>OPENLDAP definition<br/>
+ <<a href="#tag_openldap">openldap</a> ...><br/>
+ <a href="#ref_CHILDREN">CHILDREN</a><br/>
+ <<a href="#tag_openldap">/openldap</a>><br/>
+<br/><a name="ref_ORACLEDB"/>ORACLEDB definition<br/>
+ <<a href="#tag_oracledb">oracledb</a> ...><br/>
+ <a href="#ref_CHILDREN">CHILDREN</a><br/>
+ <<a href="#tag_oracledb">/oracledb</a>><br/>
<br/><a name="ref_ORAINSTANCE"/>ORAINSTANCE definition<br/>
<<a href="#tag_orainstance">orainstance</a> ...><br/>
<a href="#ref_CHILDREN">CHILDREN</a><br/>
@@ -140,60 +154,59 @@
<<a href="#tag_oralistener">oralistener</a> ...><br/>
<a href="#ref_CHILDREN">CHILDREN</a><br/>
<<a href="#tag_oralistener">/oralistener</a>><br/>
-<br/><a name="ref_FS"/>FS definition<br/>
- <<a href="#tag_fs">fs</a> ...><br/>
+<br/><a name="ref_POSTGRES-8"/>POSTGRES-8 definition<br/>
+ <<a href="#tag_postgres-8">postgres-8</a> ...><br/>
<a href="#ref_CHILDREN">CHILDREN</a><br/>
- <<a href="#tag_fs">/fs</a>><br/>
-<br/><a name="ref_ORACLEDB"/>ORACLEDB definition<br/>
- <<a href="#tag_oracledb">oracledb</a> ...><br/>
+ <<a href="#tag_postgres-8">/postgres-8</a>><br/>
+<br/><a name="ref_SAMBA"/>SAMBA definition<br/>
+ <<a href="#tag_samba">samba</a> ...><br/>
<a href="#ref_CHILDREN">CHILDREN</a><br/>
- <<a href="#tag_oracledb">/oracledb</a>><br/>
+ <<a href="#tag_samba">/samba</a>><br/>
+<br/><a name="ref_SCRIPT"/>SCRIPT definition<br/>
+ <<a href="#tag_script">script</a> ...><br/>
+ <a href="#ref_CHILDREN">CHILDREN</a><br/>
+ <<a href="#tag_script">/script</a>><br/>
+<br/><a name="ref_TOMCAT-6"/>TOMCAT-6 definition<br/>
+ <<a href="#tag_tomcat-6">tomcat-6</a> ...><br/>
+ <a href="#ref_CHILDREN">CHILDREN</a><br/>
+ <<a href="#tag_tomcat-6">/tomcat-6</a>><br/>
+<br/><a name="ref_VM"/>VM definition<br/>
+ <<a href="#tag_vm">vm</a> ...><br/>
+ <a href="#ref_CHILDREN">CHILDREN</a><br/>
+ <<a href="#tag_vm">/vm</a>><br/>
<br/><a name="ref_CHILDREN"/>CHILDREN definition<br/>
<a href="#ref_SERVICE">SERVICE</a><br/>
+ <a href="#ref_ASEHAAGENT">ASEHAAGENT</a><br/>
+ <a href="#ref_SAPDATABASE">SAPDATABASE</a><br/>
+ <a href="#ref_SAPINSTANCE">SAPINSTANCE</a><br/>
+ <a href="#ref_APACHE">APACHE</a><br/>
+ <a href="#ref_CLUSTERFS">CLUSTERFS</a><br/>
+ <a href="#ref_FS">FS</a><br/>
<a href="#ref_IP">IP</a><br/>
+ <a href="#ref_LVM">LVM</a><br/>
+ <a href="#ref_MYSQL">MYSQL</a><br/>
+ <a href="#ref_NAMED">NAMED</a><br/>
+ <a href="#ref_NETFS">NETFS</a><br/>
<a href="#ref_NFSCLIENT">NFSCLIENT</a><br/>
<a href="#ref_NFSEXPORT">NFSEXPORT</a><br/>
- <a href="#ref_SCRIPT">SCRIPT</a><br/>
- <a href="#ref_NETFS">NETFS</a><br/>
- <a href="#ref_CLUSTERFS">CLUSTERFS</a><br/>
- <a href="#ref_APACHE">APACHE</a><br/>
+ <a href="#ref_NFSSERVER">NFSSERVER</a><br/>
<a href="#ref_OPENLDAP">OPENLDAP</a><br/>
- <a href="#ref_SAMBA">SAMBA</a><br/>
- <a href="#ref_MYSQL">MYSQL</a><br/>
+ <a href="#ref_ORACLEDB">ORACLEDB</a><br/>
+ <a href="#ref_ORAINSTANCE">ORAINSTANCE</a><br/>
+ <a href="#ref_ORALISTENER">ORALISTENER</a><br/>
<a href="#ref_POSTGRES-8">POSTGRES-8</a><br/>
+ <a href="#ref_SAMBA">SAMBA</a><br/>
+ <a href="#ref_SCRIPT">SCRIPT</a><br/>
<a href="#ref_TOMCAT-6">TOMCAT-6</a><br/>
- <a href="#ref_LVM">LVM</a><br/>
<a href="#ref_VM">VM</a><br/>
- <a href="#ref_SAPINSTANCE">SAPINSTANCE</a><br/>
- <a href="#ref_SAPDATABASE">SAPDATABASE</a><br/>
- <a href="#ref_NAMED">NAMED</a><br/>
- <a href="#ref_ASEHAAGENT">ASEHAAGENT</a><br/>
- <a href="#ref_NFSSERVER">NFSSERVER</a><br/>
- <a href="#ref_ORAINSTANCE">ORAINSTANCE</a><br/>
- <a href="#ref_ORALISTENER">ORALISTENER</a><br/>
- <a href="#ref_FS">FS</a><br/>
- <a href="#ref_ORACLEDB">ORACLEDB</a><br/>
<a href="#ref_RESOURCEACTION">RESOURCEACTION</a><br/>
<br/><a name="ref_RESOURCEACTION"/>RESOURCEACTION definition<br/>
<<a href="#tag_action">action</a> .../><br/>
-<br/><a name="ref_FENCE"/>FENCE definition<br/>
- <<a href="#tag_fence">fence</a>><br/>
- <<a href="#tag_method">method</a> ...><br/>
- <a href="#ref_DEVICE">DEVICE</a><br/>
- <<a href="#tag_method">/method</a>><br/>
- <<a href="#tag_fence">/fence</a>><br/>
-<br/><a name="ref_UNFENCE"/>UNFENCE definition<br/>
- <<a href="#tag_unfence">unfence</a>><br/>
- <a href="#ref_DEVICE">DEVICE</a><br/>
- <<a href="#tag_unfence">/unfence</a>><br/>
-<br/><a name="ref_DEVICE"/>DEVICE definition<br/>
- <<a href="#tag_device">device</a> ...><br/>
- <a href="#ref_FENCEDEVICEOPTIONS">FENCEDEVICEOPTIONS</a><br/>
- <<a href="#tag_device">/device</a>><br/>
<br/><a name="ref_FENCEDEVICEOPTIONS"/>FENCEDEVICEOPTIONS definition<br/>
<h2>Tag Reference<a name="toc_tag_reference"/></h2><small><a href="#toc_tree_reference">Jump to Tree Structure Reference</a></small><br/><br/>
<table>
<tr valign="top"><td><a href="#tag_action"><b>action</b></a></td><td>Overrides resource action timings for a resource instance.</td></tr>
+<tr valign="top"><td><a href="#tag_altmulticast"><b>altmulticast</b></a></td><td>The altmulticast element provides the ability for a user to specify a multicast address, port and TTL (Time To Live) instead of using cman defaults for the alternate communication channel (RRP). If a user does not specify an alternate multicast address, cman creates one. It forms the upper 16 bits of the multicast address with 239.192 for IPv4 and ff15:: for IPv6 and forms the lower 16 bits based on the cluster ID + 1.</td></tr>
<tr valign="top"><td><a href="#tag_altname"><b>altname</b></a></td><td>Defines a second network interface to use for corosync redundant ring mode. cman(5)</td></tr>
<tr valign="top"><td><a href="#tag_apache"><b>apache</b></a></td><td>Defines an Apache web server</td></tr>
<tr valign="top"><td><a href="#tag_ASEHAagent"><b>ASEHAagent</b></a></td><td>Sybase ASE Failover Instance</td></tr>
@@ -227,7 +240,7 @@
<tr valign="top"><td><a href="#tag_lvm"><b>lvm</b></a></td><td>LVM Failover script</td></tr>
<tr valign="top"><td><a href="#tag_master"><b>master</b></a></td><td>Defines a master node. dlm_controld(8)</td></tr>
<tr valign="top"><td><a href="#tag_method"><b>method</b></a></td><td>Contains one or more devices for fencing the node a single way. fenced(8)</td></tr>
-<tr valign="top"><td><a href="#tag_multicast"><b>multicast</b></a></td><td>The multicast element provides the ability for a user to specify a multicast address instead of using the multicast address generated by cman. If a user does not specify a multicast address, cman creates one. It forms the upper 16 bits of the multicast address with 239.192 and forms the lower 16 bits based on the cluster ID.</td></tr>
+<tr valign="top"><td><a href="#tag_multicast"><b>multicast</b></a></td><td>The multicast element provides the ability for a user to specify a multicast address, port and TTL (Time To Live) instead of using cman defaults. If a user does not specify a multicast address, cman creates one. It forms the upper 16 bits of the multicast address with 239.192 for IPv4 and ff15:: for IPv6 and forms the lower 16 bits based on the cluster ID.</td></tr>
<tr valign="top"><td><a href="#tag_mysql"><b>mysql</b></a></td><td>Defines a MySQL database server</td></tr>
<tr valign="top"><td><a href="#tag_named"><b>named</b></a></td><td>Defines an instance of named server</td></tr>
<tr valign="top"><td><a href="#tag_netfs"><b>netfs</b></a></td><td>Defines an NFS/CIFS file system mount.</td></tr>
@@ -235,20 +248,22 @@
<tr valign="top"><td><a href="#tag_nfsexport"><b>nfsexport</b></a></td><td>This defines an NFS export.</td></tr>
<tr valign="top"><td><a href="#tag_nfsserver"><b>nfsserver</b></a></td><td>This defines an NFS server resource.</td></tr>
<tr valign="top"><td><a href="#tag_openldap"><b>openldap</b></a></td><td>Defines an Open LDAP server</td></tr>
-<tr valign="top"><td><a href="#tag_oracledb"><b>oracledb</b></a></td><td>Oracle 10g Failover Instance</td></tr>
+<tr valign="top"><td><a href="#tag_oracledb"><b>oracledb</b></a></td><td>Oracle 10g/11g Failover Instance</td></tr>
<tr valign="top"><td><a href="#tag_orainstance"><b>orainstance</b></a></td><td>Oracle 10g Failover Instance</td></tr>
<tr valign="top"><td><a href="#tag_oralistener"><b>oralistener</b></a></td><td>Oracle 10g Listener Instance</td></tr>
<tr valign="top"><td><a href="#tag_postgres-8"><b>postgres-8</b></a></td><td>Defines a PostgreSQL server</td></tr>
<tr valign="top"><td><a href="#tag_quorumd"><b>quorumd</b></a></td><td>This element and its attributes define parameters for the quorum disk daemon, quorumd. qdisk(5).</td></tr>
<tr valign="top"><td><a href="#tag_resources"><b>resources</b></a></td><td>Defines global resources which may be referenced in services. You may redefine actions for resources here, but child resource definitions are ignored in this section.</td></tr>
+<tr valign="top"><td><a href="#tag_resource-defaults"><b>resource-defaults</b></a></td><td>This section allows the administrator to change defaults for resource agents. Overriding parameters which must be unique is not allowed. Overriding a value which, by default, inherits a value from a parent resource will disable inheritance for that resource type.</td></tr>
<tr valign="top"><td><a href="#tag_rm"><b>rm</b></a></td><td>This element and its attributes define resources (for example an IP address) required to create HA cluster services, the HA cluster services themselves, and failover domains for the HA cluster services.</td></tr>
<tr valign="top"><td><a href="#tag_samba"><b>samba</b></a></td><td>Dynamic smbd/nmbd resource agent</td></tr>
-<tr valign="top"><td><a href="#tag_SAPDatabase"><b>SAPDatabase</b></a></td><td>SAP database resource agent</td></tr>
+<tr valign="top"><td><a href="#tag_SAPDatabase"><b>SAPDatabase</b></a></td><td>Manages any SAP database (based on Oracle, MaxDB, or DB2)</td></tr>
<tr valign="top"><td><a href="#tag_SAPInstance"><b>SAPInstance</b></a></td><td>SAP instance resource agent</td></tr>
<tr valign="top"><td><a href="#tag_script"><b>script</b></a></td><td>LSB-compliant init script as a clustered resource.</td></tr>
<tr valign="top"><td><a href="#tag_service"><b>service</b></a></td><td>Defines a service (resource group).</td></tr>
<tr valign="top"><td><a href="#tag_tomcat-6"><b>tomcat-6</b></a></td><td>Defines a Tomcat server</td></tr>
<tr valign="top"><td><a href="#tag_totem"><b>totem</b></a></td><td>OpenAIS msg transport protocol</td></tr>
+<tr valign="top"><td><a href="#tag_uidgid"><b>uidgid</b></a></td><td>Access control to corosync IPC</td></tr>
<tr valign="top"><td><a href="#tag_unfence"><b>unfence</b></a></td><td>Contains devices for unfencing the node. fence_node(8)</td></tr>
<tr valign="top"><td><a href="#tag_vm"><b>vm</b></a></td><td>Defines a Virtual Machine</td></tr>
</table>
@@ -263,6 +278,15 @@ Overrides resource action timings for a resource instance.<br/>
<tr><td><b>timeout</b></td><td>Action timeout. Meaningless unless __enforce_timeouts is set for this resource.</td></tr>
</table><br/>
<a href="#" onClick="history.go(-1)" />Back</a> | <a href="#toc_tag_reference">Contents</a>
+<h3><a name="tag_altmulticast"/>altmulticast</h3>
+The altmulticast element provides the ability for a user to specify a multicast address, port and TTL (Time To Live) instead of using cman defaults for the alternate communication channel (RRP). If a user does not specify an alternate multicast address, cman creates one. It forms the upper 16 bits of the multicast address with 239.192 for IPv4 and ff15:: for IPv6 and forms the lower 16 bits based on the cluster ID + 1.<br/>
+<br/>
+<table><tr valign="top"><td>Attribute</td><td>Description</td></tr>
+ <tr><td><b>addr</b></td><td>A multicast address specified by a user. If you do specify a multicast address, you should use the 239.192.x.x series that cman uses. Otherwise, using a multicast address outside that range may cause unpredictable results. For example, using 224.0.0.x (All hosts on the network) may not be routed correctly, or even routed at all by some hardware.</td></tr>
+ <tr><td><b>port</b></td><td> </td></tr>
+ <tr><td><b>ttl</b></td><td>Define the TTL (time to live) of a multicast packets. Useful only if nodes are on different subnets and a multicast router is available in between.</td></tr>
+</table><br/>
+Children: <a href="#ref_MULTICASTOPTS">MULTICASTOPTS</a> <br/><a href="#" onClick="history.go(-1)" />Back</a> | <a href="#toc_tag_reference">Contents</a>
<h3><a name="tag_altname"/>altname</h3>
Defines a second network interface to use for corosync redundant ring mode. cman(5)<br/>
<br/>
@@ -270,6 +294,7 @@ Defines a second network interface to use for corosync redundant ring mode. cman
<tr><td><b>name</b></td><td>Required. A second hostname or IP address of the node. cman(5)</td></tr>
<tr><td><b>mcast</b></td><td>The multicast address to use on the second interface. cman(5)</td></tr>
<tr><td><b>port</b></td><td>The network port to use on the second interface. cman(5)</td></tr>
+ <tr><td><b>ttl</b></td><td>The multicast TTL to use on the second interface. cman(5)</td></tr>
</table><br/>
<a href="#" onClick="history.go(-1)" />Back</a> | <a href="#toc_tag_reference">Contents</a>
<h3><a name="tag_apache"/>apache</h3>
@@ -322,7 +347,7 @@ Defines cluster properties, and contains all other configuration. cluster.conf(5
<tr><td><b>config_version</b></td><td>Required. Revision level of cluster.conf file. cluster.conf(5)</td></tr>
<tr><td><b>name</b></td><td>Required. Name of the cluster. cluster.conf(5)</td></tr>
</table><br/>
-Children: <a href="#tag_cman">cman</a> <a href="#tag_totem">totem</a> <a href="#tag_quorumd">quorumd</a> <a href="#tag_fence_daemon">fence_daemon</a> <a href="#tag_fence_xvmd">fence_xvmd</a> <a href="#tag_dlm">dlm</a> <a href="#tag_gfs_controld">gfs_controld</a> <a href="#tag_group">group</a> <a href="#tag_logging">logging</a> <a href="#tag_clusternodes">clusternodes</a> <a href="#tag_fencedevices">fencedevices</a> <a href="#tag_rm">rm</a> <a href="#tag_clvmd">clvmd</a> <br/><a href="#" onClick="history.go(-1)" />Back</a> | <a href="#toc_tag_reference">Contents</a>
+Children: <a href="#tag_cman">cman</a> <a href="#tag_uidgid">uidgid</a> <a href="#tag_totem">totem</a> <a href="#tag_quorumd">quorumd</a> <a href="#tag_fence_daemon">fence_daemon</a> <a href="#tag_fence_xvmd">fence_xvmd</a> <a href="#tag_dlm">dlm</a> <a href="#tag_gfs_controld">gfs_controld</a> <a href="#tag_group">group</a> <a href="#tag_logging">logging</a> <a href="#tag_clusternodes">clusternodes</a> <a href="#tag_fencedevices">fencedevices</a> <a href="#tag_rm">rm</a> <a href="#tag_clvmd">clvmd</a> <br/><a href="#" onClick="history.go(-1)" />Back</a> | <a href="#toc_tag_reference">Contents</a>
<h3><a name="tag_clusterfs"/>clusterfs</h3>
Defines a cluster file system mount.<br/>
<br/>
@@ -334,9 +359,11 @@ Defines a cluster file system mount.<br/>
<tr><td><b>mountpoint</b></td><td>Mount Point</td></tr>
<tr><td><b>name</b></td><td>File System Name</td></tr>
<tr><td><b>nfslock</b></td><td>Enable NFS lock workarounds</td></tr>
+ <tr><td><b>nfsrestart</b></td><td>Enable NFS daemon and lockd workaround</td></tr>
<tr><td><b>options</b></td><td>Mount Options</td></tr>
<tr><td><b>ref</b></td><td>Reference to existing clusterfs resource in the resources section.</td></tr>
<tr><td><b>self_fence</b></td><td>Seppuku Unmount</td></tr>
+ <tr><td><b>use_findmnt</b></td><td>Utilize findmnt to detect if and where filesystems are mounted</td></tr>
<tr><td><b>__enforce_timeouts</b></td><td>Consider a timeout for operations as fatal.</td></tr>
<tr><td><b>__failure_expire_time</b></td><td>Amount of time before a failure is forgotten.</td></tr>
<tr><td><b>__independent_subtree</b></td><td>Treat this and all children as an independent subtree.</td></tr>
@@ -354,7 +381,7 @@ Defines cluster node properties, and contains other node specific configuration.
<tr><td><b>votes</b></td><td>The number of votes the node contributes to quorum. cman(5)</td></tr>
<tr><td><b>weight</b></td><td>The dlm locking weight. dlm_controld(8)</td></tr>
</table><br/>
-Children: <a href="#tag_altname">altname</a> <a href="#ref_FENCE">FENCE</a> <a href="#ref_UNFENCE">UNFENCE</a> <br/><a href="#" onClick="history.go(-1)" />Back</a> | <a href="#toc_tag_reference">Contents</a>
+Children: <a href="#ref_ALTNAME">ALTNAME</a> <a href="#ref_FENCE">FENCE</a> <a href="#ref_UNFENCE">UNFENCE</a> <br/><a href="#" onClick="history.go(-1)" />Back</a> | <a href="#toc_tag_reference">Contents</a>
<h3><a name="tag_clusternodes"/>clusternodes</h3>
Contains all cluster node definitions. cluster.conf(5)<br/>
<br/>
@@ -387,69 +414,64 @@ The cman element contains attributes that define the following cluster-wide para
<tr><td><b>two_node</b></td><td>The two_node attribute allows you to configure a cluster with only two nodes. Ordinarily, the loss of quorum after one of two nodes fails prevents the remaining node from continuing (if both nodes have one vote.) To enable a two-node cluster, set the two_node value equal to 1. If the two_node value is enabled, the expected_votes value must be set to 1.</td></tr>
<tr><td><b>upgrading</b></td><td>Set this if you are performing a rolling upgrade of the cluster between major releases.</td></tr>
</table><br/>
-Children: <a href="#tag_multicast">multicast</a> <br/><a href="#" onClick="history.go(-1)" />Back</a> | <a href="#toc_tag_reference">Contents</a>
+Children: <a href="#tag_multicast">multicast</a> <a href="#tag_altmulticast">altmulticast</a> <br/><a href="#" onClick="history.go(-1)" />Back</a> | <a href="#toc_tag_reference">Contents</a>
<h3><a name="tag_device"/>device</h3>
Defines the properties of a device used for fencing or unfencing a node. fenced(8)<br/>
<br/>
<table><tr valign="top"><td>Attribute</td><td>Description</td></tr>
<tr><td><b>name</b></td><td>Required. The name of a fencedevice defined in the fencedevices section. fenced(8)</td></tr>
- <tr><td><b>action</b></td><td>Fencing action to take (off or on).</td></tr>
- <tr><td><b>aptpl</b></td><td></td></tr>
- <tr><td><b>auth</b></td><td>For IPMI LAN only. Authentication Type: none, password, md2, or md5</td></tr>
+ <tr><td><b>action</b></td><td>Fencing Action</td></tr>
+ <tr><td><b>aptpl</b></td><td>Use APTPL flag for registrations</td></tr>
+ <tr><td><b>auth</b></td><td>IPMI Lan Auth type (md5, password, or none)</td></tr>
<tr><td><b>channel_address</b></td><td>VM Channel IP address (default=10.0.2.179)</td></tr>
<tr><td><b>cipher</b></td><td>Ciphersuite to use (same as ipmitool -C parameter)</td></tr>
<tr><td><b>cmd_prompt</b></td><td>Force command prompt</td></tr>
<tr><td><b>community</b></td><td>Set the community string</td></tr>
- <tr><td><b>cserver</b></td><td>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.</td></tr>
- <tr><td><b>debug</b></td><td>Specify (stdin) or increment (command line) debug level</td></tr>
- <tr><td><b>delay</b></td><td>Wait this many seconds before fencing is started. fence_egenera(8)</td></tr>
- <tr><td><b>device</b></td><td>The device the switch is connected to on the controlling host.</td></tr>
- <tr><td><b>devices</b></td><td>List of devices to fence (separated by commas).</td></tr>
- <tr><td><b>domain</b></td><td>Virtual Machine (domain name) to fence (deprecated)</td></tr>
- <tr><td><b>drac_version</b></td><td>Force DRAC version to use</td></tr>
- <tr><td><b>esh</b></td><td>Path to the esh command on the cserver. fence_egenera(8)</td></tr>
+ <tr><td><b>cserver</b></td><td>The cserver to ssh to. cserver can be in the form user@hostname to specify a different user to login as.</td></tr>
+ <tr><td><b>debug</b></td><td>Write debug information to given file</td></tr>
+ <tr><td><b>delay</b></td><td>Wait X seconds before fencing is started</td></tr>
+ <tr><td><b>devices</b></td><td>List of devices to be used for fencing action</td></tr>
+ <tr><td><b>domain</b></td><td>Virtual Machine (domain name) to fence (deprecated; use port)</td></tr>
+ <tr><td><b>drac_version</b></td><td>Force fence_drac to treat the device as though it was for the specified drac version</td></tr>
<tr><td><b>exec</b></td><td>Command to execute</td></tr>
+ <tr><td><b>family</b></td><td>Network family</td></tr>
<tr><td><b>hash</b></td><td>Packet hash strength (none, sha1, [sha256], sha512)</td></tr>
<tr><td><b>help</b></td><td>Display help and exit</td></tr>
<tr><td><b>hidden_page</b></td><td>Name of hidden page</td></tr>
- <tr><td><b>hmc_version</b></td><td>Force HMC version to use (3 or 4)</td></tr>
<tr><td><b>identity_file</b></td><td>Identity file for ssh</td></tr>
<tr><td><b>inet4_only</b></td><td>Forces agent to use IPv4 addresses only</td></tr>
<tr><td><b>inet6_only</b></td><td>Forces agent to use IPv6 addresses only</td></tr>
<tr><td><b>io_fencing</b></td><td>Fencing Action</td></tr>
- <tr><td><b>ipaddr</b></td><td>IP address or the name of the device.</td></tr>
- <tr><td><b>ipport</b></td><td>Multicast or VMChannel IP port (default=1229)</td></tr>
+ <tr><td><b>ipaddr</b></td><td>IP Address or Hostname</td></tr>
+ <tr><td><b>ipport</b></td><td>TCP port to use for connection with device</td></tr>
<tr><td><b>ip_family</b></td><td>IP Family ([auto], ipv4, ipv6)</td></tr>
- <tr><td><b>key</b></td><td></td></tr>
+ <tr><td><b>key</b></td><td>Key value to be used for fencing action</td></tr>
<tr><td><b>key_file</b></td><td>Shared key file (default=/etc/cluster/fence_xvm.key)</td></tr>
- <tr><td><b>lanplus</b></td><td>For IPMI LAN only. Set value to either True or 1; leave out for false.</td></tr>
- <tr><td><b>logfile</b></td><td>Location to output logs from fence_scsi.</td></tr>
- <tr><td><b>login</b></td><td>The login name used to access the device. </td></tr>
+ <tr><td><b>lanplus</b></td><td>Use Lanplus to improve security of connection</td></tr>
+ <tr><td><b>logfile</b></td><td>File to write error/debug messages</td></tr>
+ <tr><td><b>login</b></td><td>Login Name</td></tr>
<tr><td><b>login_timeout</b></td><td>Wait X seconds for cmd prompt after login</td></tr>
- <tr><td><b>lpan</b></td><td>The lpan to operate on. fence_egenera(8)</td></tr>
- <tr><td><b>managed</b></td><td>Managed system name</td></tr>
+ <tr><td><b>lpan</b></td><td>The lpan to operate on.</td></tr>
<tr><td><b>method</b></td><td>Method to fence (onoff or cycle)</td></tr>
<tr><td><b>missing_as_off</b></td><td>Missing port returns OFF instead of failure</td></tr>
- <tr><td><b>module_name</b></td><td>DRAC/MC module name</td></tr>
+ <tr><td><b>module_name</b></td><td>The module name of the blade when using DRAC/MC firmware.</td></tr>
<tr><td><b>multicast_address</b></td><td>Multicast address (default=225.0.0.12 / ff05::3:1)</td></tr>
- <tr><td><b>nodename</b></td><td>Name of the node to be fenced. Refer to fence_scsi(8) for more information.</td></tr>
+ <tr><td><b>nodename</b></td><td>Name or IP address of node to be fenced</td></tr>
<tr><td><b>option</b></td><td> </td></tr>
- <tr><td><b>partition</b></td><td>Partition name</td></tr>
- <tr><td><b>passwd</b></td><td>The password used to authenticate the connection to the device.</td></tr>
- <tr><td><b>passwd_script</b></td><td>The script that supplies a password for access to the fence device. Using this supersedes the Password parameter.</td></tr>
- <tr><td><b>port</b></td><td>The switch outlet number.</td></tr>
+ <tr><td><b>passwd</b></td><td>Login password or passphrase</td></tr>
+ <tr><td><b>passwd_script</b></td><td>Script to retrieve password</td></tr>
+ <tr><td><b>port</b></td><td>Physical plug number or name of virtual machine</td></tr>
<tr><td><b>power_timeout</b></td><td>Test X seconds for status change after ON/OFF</td></tr>
<tr><td><b>power_wait</b></td><td>Wait X seconds after issuing ON/OFF</td></tr>
- <tr><td><b>pserver</b></td><td>The pserver to operate on. fence_egenera(8)</td></tr>
+ <tr><td><b>privlvl</b></td><td>Privilege level on IPMI device</td></tr>
+ <tr><td><b>pserver</b></td><td>The pserver to operate on.</td></tr>
<tr><td><b>retrans</b></td><td>Multicast retransmit time (in 1/10sec; default=20)</td></tr>
<tr><td><b>retry_on</b></td><td>Count of attempts to retry power on</td></tr>
<tr><td><b>ribcl</b></td><td>Force ribcl version to use</td></tr>
- <tr><td><b>rpowerpath</b></td><td></td></tr>
<tr><td><b>secure</b></td><td>SSH connection</td></tr>
<tr><td><b>separator</b></td><td>Separator for CSV created by operation list</td></tr>
<tr><td><b>serial_device</b></td><td>Serial device (default=/dev/ttyS1)</td></tr>
<tr><td><b>serial_params</b></td><td>Serial Parameters (default=115200,8N1)</td></tr>
- <tr><td><b>servers</b></td><td>The hostname of each GNBD to disable. For multiple hostnames, separate each hostname with a space.</td></tr>
<tr><td><b>shell_timeout</b></td><td>Wait X seconds for cmd prompt after issuing command</td></tr>
<tr><td><b>snmp_auth_prot</b></td><td>Set authentication protocol (MD5|SHA)</td></tr>
<tr><td><b>snmp_priv_passwd</b></td><td>Set privacy protocol password</td></tr>
@@ -457,12 +479,17 @@ Defines the properties of a device used for fencing or unfencing a node. fenced(
<tr><td><b>snmp_priv_prot</b></td><td>Set privacy protocol (DES|AES)</td></tr>
<tr><td><b>snmp_sec_level</b></td><td>Set security level (noAuthNoPriv|authNoPriv|authPriv)</td></tr>
<tr><td><b>snmp_version</b></td><td>Specifies SNMP version to use (1,2c,3)</td></tr>
+ <tr><td><b>ssh_options</b></td><td>SSH options to use</td></tr>
<tr><td><b>ssl</b></td><td>SSL connection</td></tr>
+ <tr><td><b>suborg</b></td><td>Additional path needed to access suborganization</td></tr>
<tr><td><b>switch</b></td><td>Physical switch number on device</td></tr>
- <tr><td><b>timeout</b></td><td>Fencing timeout (in seconds; default=30)</td></tr>
+ <tr><td><b>telnet_port</b></td><td>TCP port to use for connection with device (default is 3172 for telnet)</td></tr>
+ <tr><td><b>timeout</b></td><td>Timeout (sec) for IPMI operation</td></tr>
<tr><td><b>udpport</b></td><td>UDP/TCP port to use for connection with device</td></tr>
- <tr><td><b>user</b></td><td>See fence_egenera(8)</td></tr>
+ <tr><td><b>usage</b></td><td>Print usage</td></tr>
+ <tr><td><b>user</b></td><td>Login Name</td></tr>
<tr><td><b>use_uuid</b></td><td>Treat [domain] as UUID instead of domain name. This is provided for compatibility with older fence_xvmd installations.</td></tr>
+ <tr><td><b>uuid</b></td><td>The UUID of the virtual machine to fence.</td></tr>
<tr><td><b>verbose</b></td><td>Verbose mode</td></tr>
<tr><td><b>version</b></td><td>Display version information and exit</td></tr>
<tr><td><b>vmware_datacenter</b></td><td>Show only machines in specified datacenter</td></tr>
@@ -542,63 +569,58 @@ Defines fence device properties. fenced(8)<br/>
<table><tr valign="top"><td>Attribute</td><td>Description</td></tr>
<tr><td><b>agent</b></td><td>Required. The fence agent to be used. fenced(8)</td></tr>
<tr><td><b>name</b></td><td>Required. A name that is used to reference this fence device from clusternode fence section. fenced(8)</td></tr>
- <tr><td><b>action</b></td><td>Fencing action to take (off or on).</td></tr>
- <tr><td><b>aptpl</b></td><td></td></tr>
- <tr><td><b>auth</b></td><td>For IPMI LAN only. Authentication Type: none, password, md2, or md5</td></tr>
+ <tr><td><b>action</b></td><td>Fencing Action</td></tr>
+ <tr><td><b>aptpl</b></td><td>Use APTPL flag for registrations</td></tr>
+ <tr><td><b>auth</b></td><td>IPMI Lan Auth type (md5, password, or none)</td></tr>
<tr><td><b>channel_address</b></td><td>VM Channel IP address (default=10.0.2.179)</td></tr>
<tr><td><b>cipher</b></td><td>Ciphersuite to use (same as ipmitool -C parameter)</td></tr>
<tr><td><b>cmd_prompt</b></td><td>Force command prompt</td></tr>
<tr><td><b>community</b></td><td>Set the community string</td></tr>
- <tr><td><b>cserver</b></td><td>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.</td></tr>
- <tr><td><b>debug</b></td><td>Specify (stdin) or increment (command line) debug level</td></tr>
- <tr><td><b>delay</b></td><td>Wait this many seconds before fencing is started. fence_egenera(8)</td></tr>
- <tr><td><b>device</b></td><td>The device the switch is connected to on the controlling host.</td></tr>
- <tr><td><b>devices</b></td><td>List of devices to fence (separated by commas).</td></tr>
- <tr><td><b>domain</b></td><td>Virtual Machine (domain name) to fence (deprecated)</td></tr>
- <tr><td><b>drac_version</b></td><td>Force DRAC version to use</td></tr>
- <tr><td><b>esh</b></td><td>Path to the esh command on the cserver. fence_egenera(8)</td></tr>
+ <tr><td><b>cserver</b></td><td>The cserver to ssh to. cserver can be in the form user@hostname to specify a different user to login as.</td></tr>
+ <tr><td><b>debug</b></td><td>Write debug information to given file</td></tr>
+ <tr><td><b>delay</b></td><td>Wait X seconds before fencing is started</td></tr>
+ <tr><td><b>devices</b></td><td>List of devices to be used for fencing action</td></tr>
+ <tr><td><b>domain</b></td><td>Virtual Machine (domain name) to fence (deprecated; use port)</td></tr>
+ <tr><td><b>drac_version</b></td><td>Force fence_drac to treat the device as though it was for the specified drac version</td></tr>
<tr><td><b>exec</b></td><td>Command to execute</td></tr>
+ <tr><td><b>family</b></td><td>Network family</td></tr>
<tr><td><b>hash</b></td><td>Packet hash strength (none, sha1, [sha256], sha512)</td></tr>
<tr><td><b>help</b></td><td>Display help and exit</td></tr>
<tr><td><b>hidden_page</b></td><td>Name of hidden page</td></tr>
- <tr><td><b>hmc_version</b></td><td>Force HMC version to use (3 or 4)</td></tr>
<tr><td><b>identity_file</b></td><td>Identity file for ssh</td></tr>
<tr><td><b>inet4_only</b></td><td>Forces agent to use IPv4 addresses only</td></tr>
<tr><td><b>inet6_only</b></td><td>Forces agent to use IPv6 addresses only</td></tr>
<tr><td><b>io_fencing</b></td><td>Fencing Action</td></tr>
- <tr><td><b>ipaddr</b></td><td>IP address or the name of the device.</td></tr>
- <tr><td><b>ipport</b></td><td>Multicast or VMChannel IP port (default=1229)</td></tr>
+ <tr><td><b>ipaddr</b></td><td>IP Address or Hostname</td></tr>
+ <tr><td><b>ipport</b></td><td>TCP port to use for connection with device</td></tr>
<tr><td><b>ip_family</b></td><td>IP Family ([auto], ipv4, ipv6)</td></tr>
- <tr><td><b>key</b></td><td></td></tr>
+ <tr><td><b>key</b></td><td>Key value to be used for fencing action</td></tr>
<tr><td><b>key_file</b></td><td>Shared key file (default=/etc/cluster/fence_xvm.key)</td></tr>
- <tr><td><b>lanplus</b></td><td>For IPMI LAN only. Set value to either True or 1; leave out for false.</td></tr>
- <tr><td><b>logfile</b></td><td>Location to output logs from fence_scsi.</td></tr>
- <tr><td><b>login</b></td><td>The login name used to access the device. </td></tr>
+ <tr><td><b>lanplus</b></td><td>Use Lanplus to improve security of connection</td></tr>
+ <tr><td><b>logfile</b></td><td>File to write error/debug messages</td></tr>
+ <tr><td><b>login</b></td><td>Login Name</td></tr>
<tr><td><b>login_timeout</b></td><td>Wait X seconds for cmd prompt after login</td></tr>
- <tr><td><b>lpan</b></td><td>The lpan to operate on. fence_egenera(8)</td></tr>
- <tr><td><b>managed</b></td><td>Managed system name</td></tr>
+ <tr><td><b>lpan</b></td><td>The lpan to operate on.</td></tr>
<tr><td><b>method</b></td><td>Method to fence (onoff or cycle)</td></tr>
<tr><td><b>missing_as_off</b></td><td>Missing port returns OFF instead of failure</td></tr>
- <tr><td><b>module_name</b></td><td>DRAC/MC module name</td></tr>
+ <tr><td><b>module_name</b></td><td>The module name of the blade when using DRAC/MC firmware.</td></tr>
<tr><td><b>multicast_address</b></td><td>Multicast address (default=225.0.0.12 / ff05::3:1)</td></tr>
- <tr><td><b>nodename</b></td><td>Name of the node to be fenced. Refer to fence_scsi(8) for more information.</td></tr>
+ <tr><td><b>nodename</b></td><td>Name or IP address of node to be fenced</td></tr>
<tr><td><b>option</b></td><td> </td></tr>
- <tr><td><b>partition</b></td><td>Partition name</td></tr>
- <tr><td><b>passwd</b></td><td>The password used to authenticate the connection to the device.</td></tr>
- <tr><td><b>passwd_script</b></td><td>The script that supplies a password for access to the fence device. Using this supersedes the Password parameter.</td></tr>
- <tr><td><b>port</b></td><td>The switch outlet number.</td></tr>
+ <tr><td><b>passwd</b></td><td>Login password or passphrase</td></tr>
+ <tr><td><b>passwd_script</b></td><td>Script to retrieve password</td></tr>
+ <tr><td><b>port</b></td><td>Physical plug number or name of virtual machine</td></tr>
<tr><td><b>power_timeout</b></td><td>Test X seconds for status change after ON/OFF</td></tr>
<tr><td><b>power_wait</b></td><td>Wait X seconds after issuing ON/OFF</td></tr>
- <tr><td><b>pserver</b></td><td>The pserver to operate on. fence_egenera(8)</td></tr>
+ <tr><td><b>privlvl</b></td><td>Privilege level on IPMI device</td></tr>
+ <tr><td><b>pserver</b></td><td>The pserver to operate on.</td></tr>
<tr><td><b>retrans</b></td><td>Multicast retransmit time (in 1/10sec; default=20)</td></tr>
<tr><td><b>retry_on</b></td><td>Count of attempts to retry power on</td></tr>
<tr><td><b>ribcl</b></td><td>Force ribcl version to use</td></tr>
- <tr><td><b>rpowerpath</b></td><td></td></tr>
<tr><td><b>secure</b></td><td>SSH connection</td></tr>
<tr><td><b>separator</b></td><td>Separator for CSV created by operation list</td></tr>
<tr><td><b>serial_device</b></td><td>Serial device (default=/dev/ttyS1)</td></tr>
<tr><td><b>serial_params</b></td><td>Serial Parameters (default=115200,8N1)</td></tr>
- <tr><td><b>servers</b></td><td>The hostname of each GNBD to disable. For multiple hostnames, separate each hostname with a space.</td></tr>
<tr><td><b>shell_timeout</b></td><td>Wait X seconds for cmd prompt after issuing command</td></tr>
<tr><td><b>snmp_auth_prot</b></td><td>Set authentication protocol (MD5|SHA)</td></tr>
<tr><td><b>snmp_priv_passwd</b></td><td>Set privacy protocol password</td></tr>
@@ -606,12 +628,17 @@ Defines fence device properties. fenced(8)<br/>
<tr><td><b>snmp_priv_prot</b></td><td>Set privacy protocol (DES|AES)</td></tr>
<tr><td><b>snmp_sec_level</b></td><td>Set security level (noAuthNoPriv|authNoPriv|authPriv)</td></tr>
<tr><td><b>snmp_version</b></td><td>Specifies SNMP version to use (1,2c,3)</td></tr>
+ <tr><td><b>ssh_options</b></td><td>SSH options to use</td></tr>
<tr><td><b>ssl</b></td><td>SSL connection</td></tr>
+ <tr><td><b>suborg</b></td><td>Additional path needed to access suborganization</td></tr>
<tr><td><b>switch</b></td><td>Physical switch number on device</td></tr>
- <tr><td><b>timeout</b></td><td>Fencing timeout (in seconds; default=30)</td></tr>
+ <tr><td><b>telnet_port</b></td><td>TCP port to use for connection with device (default is 3172 for telnet)</td></tr>
+ <tr><td><b>timeout</b></td><td>Timeout (sec) for IPMI operation</td></tr>
<tr><td><b>udpport</b></td><td>UDP/TCP port to use for connection with device</td></tr>
- <tr><td><b>user</b></td><td>See fence_egenera(8)</td></tr>
+ <tr><td><b>usage</b></td><td>Print usage</td></tr>
+ <tr><td><b>user</b></td><td>Login Name</td></tr>
<tr><td><b>use_uuid</b></td><td>Treat [domain] as UUID instead of domain name. This is provided for compatibility with older fence_xvmd installations.</td></tr>
+ <tr><td><b>uuid</b></td><td>The UUID of the virtual machine to fence.</td></tr>
<tr><td><b>verbose</b></td><td>Verbose mode</td></tr>
<tr><td><b>version</b></td><td>Display version information and exit</td></tr>
<tr><td><b>vmware_datacenter</b></td><td>Show only machines in specified datacenter</td></tr>
@@ -631,7 +658,6 @@ Configuration for fenced daemon. fenced(8)<br/>
<tr><td><b>override_time</b></td><td>Number of seconds to wait for a manual override after a failed fencing attempt before the next attempt. fenced(8)</td></tr>
<tr><td><b>post_fail_delay</b></td><td>Number of seconds the daemon will wait before fencing any victims after a node fails. fenced(8)</td></tr>
<tr><td><b>post_join_delay</b></td><td>Number of seconds the daemon will wait before fencing any victims after a node joins the fence domain. fenced(8)</td></tr>
- <tr><td><b>skip_undefined</b></td><td>Set to 1 to disable startup fencing of nodes with no fence methods defined. fenced(8)</td></tr>
</table><br/>
<a href="#" onClick="history.go(-1)" />Back</a> | <a href="#toc_tag_reference">Contents</a>
<h3><a name="tag_fence_xvmd"/>fence_xvmd</h3>
@@ -661,10 +687,12 @@ Defines a file system mount.<br/>
<tr><td><b>mountpoint</b></td><td>Mount Point</td></tr>
<tr><td><b>name</b></td><td>File System Name</td></tr>
<tr><td><b>nfslock</b></td><td>Enable NFS lock workarounds</td></tr>
+ <tr><td><b>nfsrestart</b></td><td>Enable NFS daemon and lockd workaround</td></tr>
<tr><td><b>options</b></td><td>Mount Options</td></tr>
<tr><td><b>quick_status</b></td><td>Quick/brief status checks.</td></tr>
<tr><td><b>ref</b></td><td>Reference to existing fs resource in the resources section.</td></tr>
<tr><td><b>self_fence</b></td><td>Seppuku Unmount</td></tr>
+ <tr><td><b>use_findmnt</b></td><td>Utilize findmnt to detect if and where filesystems are mounted</td></tr>
<tr><td><b>__enforce_timeouts</b></td><td>Consider a timeout for operations as fatal.</td></tr>
<tr><td><b>__failure_expire_time</b></td><td>Amount of time before a failure is forgotten.</td></tr>
<tr><td><b>__independent_subtree</b></td><td>Treat this and all children as an independent subtree.</td></tr>
@@ -724,6 +752,7 @@ This is an IP address.<br/>
<tr><td><b>family</b></td><td>Family</td></tr>
<tr><td><b>monitor_link</b></td><td>Monitor NIC Link</td></tr>
<tr><td><b>nfslock</b></td><td>Enable NFS lock workarounds</td></tr>
+ <tr><td><b>prefer_interface</b></td><td>Network interface</td></tr>
<tr><td><b>ref</b></td><td>Reference to existing ip resource in the resources section.</td></tr>
<tr><td><b>sleeptime</b></td><td>Amount of time (seconds) to sleep.</td></tr>
<tr><td><b>__enforce_timeouts</b></td><td>Consider a timeout for operations as fatal.</td></tr>
@@ -804,12 +833,14 @@ Contains one or more devices for fencing the node a single way. fenced(8)<br/>
</table><br/>
Children: <a href="#ref_DEVICE">DEVICE</a> <br/><a href="#" onClick="history.go(-1)" />Back</a> | <a href="#toc_tag_reference">Contents</a>
<h3><a name="tag_multicast"/>multicast</h3>
-The multicast element provides the ability for a user to specify a multicast address instead of using the multicast address generated by cman. If a user does not specify a multicast address, cman creates one. It forms the upper 16 bits of the multicast address with 239.192 and forms the lower 16 bits based on the cluster ID.<br/>
+The multicast element provides the ability for a user to specify a multicast address, port and TTL (Time To Live) instead of using cman defaults. If a user does not specify a multicast address, cman creates one. It forms the upper 16 bits of the multicast address with 239.192 for IPv4 and ff15:: for IPv6 and forms the lower 16 bits based on the cluster ID.<br/>
<br/>
<table><tr valign="top"><td>Attribute</td><td>Description</td></tr>
- <tr><td><b>addr</b></td><td>Required. A multicast address specified by a user. If you do specify a multicast address, you should use the 239.192.x.x series that cman uses. Otherwise, using a multicast address outside that range may cause unpredictable results. For example, using 224.0.0.x (All hosts on the network) may not be routed correctly, or even routed at all by some hardware.</td></tr>
+ <tr><td><b>addr</b></td><td>A multicast address specified by a user. If you do specify a multicast address, you should use the 239.192.x.x series that cman uses. Otherwise, using a multicast address outside that range may cause unpredictable results. For example, using 224.0.0.x (All hosts on the network) may not be routed correctly, or even routed at all by some hardware.</td></tr>
+ <tr><td><b>port</b></td><td> </td></tr>
+ <tr><td><b>ttl</b></td><td>Define the TTL (time to live) of a multicast packets. Useful only if nodes are on different subnets and a multicast router is available in between.</td></tr>
</table><br/>
-<a href="#" onClick="history.go(-1)" />Back</a> | <a href="#toc_tag_reference">Contents</a>
+Children: <a href="#ref_MULTICASTOPTS">MULTICASTOPTS</a> <br/><a href="#" onClick="history.go(-1)" />Back</a> | <a href="#toc_tag_reference">Contents</a>
<h3><a name="tag_mysql"/>mysql</h3>
Defines a MySQL database server<br/>
<br/>
@@ -842,6 +873,7 @@ Defines an instance of named server<br/>
<tr><td><b>ref</b></td><td>Reference to existing named resource in the resources section.</td></tr>
<tr><td><b>service_name</b></td><td>Inherit the service name.</td></tr>
<tr><td><b>shutdown_wait</b></td><td>Wait X seconds for correct end of service shutdown</td></tr>
+ <tr><td><b>update_source</b></td><td>Use cluster ip as source.</td></tr>
<tr><td><b>__enforce_timeouts</b></td><td>Consider a timeout for operations as fatal.</td></tr>
<tr><td><b>__failure_expire_time</b></td><td>Amount of time before a failure is forgotten.</td></tr>
<tr><td><b>__independent_subtree</b></td><td>Treat this and all children as an independent subtree.</td></tr>
@@ -863,6 +895,8 @@ Defines an NFS/CIFS file system mount.<br/>
<tr><td><b>no_unmount</b></td><td>Skip unmount opration</td></tr>
<tr><td><b>options</b></td><td>Mount Options</td></tr>
<tr><td><b>ref</b></td><td>Reference to existing netfs resource in the resources section.</td></tr>
+ <tr><td><b>self_fence</b></td><td>Seppuku Unmount</td></tr>
+ <tr><td><b>use_findmnt</b></td><td>Utilize findmnt to detect if and where filesystems are mounted</td></tr>
<tr><td><b>__enforce_timeouts</b></td><td>Consider a timeout for operations as fatal.</td></tr>
<tr><td><b>__failure_expire_time</b></td><td>Amount of time before a failure is forgotten.</td></tr>
<tr><td><b>__independent_subtree</b></td><td>Treat this and all children as an independent subtree.</td></tr>
@@ -946,13 +980,14 @@ Defines an Open LDAP server<br/>
</table><br/>
Children: <a href="#ref_CHILDREN">CHILDREN</a> <br/><a href="#" onClick="history.go(-1)" />Back</a> | <a href="#toc_tag_reference">Contents</a>
<h3><a name="tag_oracledb"/>oracledb</h3>
-Oracle 10g Failover Instance<br/>
+Oracle 10g/11g Failover Instance<br/>
<br/>
<table><tr valign="top"><td>Attribute</td><td>Description</td></tr>
<tr><td><b>home</b></td><td>Oracle Home Directory</td></tr>
<tr><td><b>listener_name</b></td><td>Oracle Listener Instance Name</td></tr>
<tr><td><b>name</b></td><td>Oracle SID</td></tr>
<tr><td><b>ref</b></td><td>Reference to existing oracledb resource in the resources section.</td></tr>
+ <tr><td><b>tns_admin</b></td><td>Full path to the directory containing tnsnames.ora</td></tr>
<tr><td><b>type</b></td><td>Oracle Installation Type</td></tr>
<tr><td><b>user</b></td><td>Oracle User Name</td></tr>
<tr><td><b>vhost</b></td><td>Virtual Hostname</td></tr>
@@ -973,6 +1008,7 @@ Oracle 10g Failover Instance<br/>
<tr><td><b>lockfile</b></td><td>Pathname for lockfile</td></tr>
<tr><td><b>name</b></td><td>Oracle SID</td></tr>
<tr><td><b>ref</b></td><td>Reference to existing orainstance resource in the resources section.</td></tr>
+ <tr><td><b>tns_admin</b></td><td>Full path to the directory containing tnsnames.ora</td></tr>
<tr><td><b>user</b></td><td>Oracle User Name</td></tr>
<tr><td><b>__enforce_timeouts</b></td><td>Consider a timeout for operations as fatal.</td></tr>
<tr><td><b>__failure_expire_time</b></td><td>Amount of time before a failure is forgotten.</td></tr>
@@ -989,6 +1025,7 @@ Oracle 10g Listener Instance<br/>
<tr><td><b>home</b></td><td>Oracle Home Directory</td></tr>
<tr><td><b>name</b></td><td>Listener name</td></tr>
<tr><td><b>ref</b></td><td>Reference to existing oralistener resource in the resources section.</td></tr>
+ <tr><td><b>tns_admin</b></td><td>Full path to the directory containing tnsnames.ora</td></tr>
<tr><td><b>user</b></td><td>Oracle User Name</td></tr>
<tr><td><b>__enforce_timeouts</b></td><td>Consider a timeout for operations as fatal.</td></tr>
<tr><td><b>__failure_expire_time</b></td><td>Amount of time before a failure is forgotten.</td></tr>
@@ -1008,7 +1045,7 @@ Defines a PostgreSQL server<br/>
<tr><td><b>postmaster_user</b></td><td>User who runs the database server</td></tr>
<tr><td><b>ref</b></td><td>Reference to existing postgres-8 resource in the resources section.</td></tr>
<tr><td><b>service_name</b></td><td>Inherit the service name.</td></tr>
- <tr><td><b>shutdown_wait</b></td><td>Wait X seconds for correct end of service shutdown</td></tr>
+ <tr><td><b>shutdown_wait</b></td><td>Wait X seconds for correct end of service shutdown This option is ignored in current release.</td></tr>
<tr><td><b>__enforce_timeouts</b></td><td>Consider a timeout for operations as fatal.</td></tr>
<tr><td><b>__failure_expire_time</b></td><td>Amount of time before a failure is forgotten.</td></tr>
<tr><td><b>__independent_subtree</b></td><td>Treat this and all children as an independent subtree.</td></tr>
@@ -1047,18 +1084,23 @@ Children: <a href="#tag_heuristic">heuristic</a> <br/><a href="#" onClick="histo
Defines global resources which may be referenced in services. You may redefine actions for resources here, but child resource definitions are ignored in this section.<br/>
<br/>
Children: <a href="#ref_CHILDREN">CHILDREN</a> <br/><a href="#" onClick="history.go(-1)" />Back</a> | <a href="#toc_tag_reference">Contents</a>
+<h3><a name="tag_resource-defaults"/>resource-defaults</h3>
+This section allows the administrator to change defaults for resource agents. Overriding parameters which must be unique is not allowed. Overriding a value which, by default, inherits a value from a parent resource will disable inheritance for that resource type.<br/>
+<br/>
+Children: <a href="#ref_CHILDREN">CHILDREN</a> <br/><a href="#" onClick="history.go(-1)" />Back</a> | <a href="#toc_tag_reference">Contents</a>
<h3><a name="tag_rm"/>rm</h3>
This element and its attributes define resources (for example an IP address) required to create HA cluster services, the HA cluster services themselves, and failover domains for the HA cluster services.<br/>
<br/>
<table><tr valign="top"><td>Attribute</td><td>Description</td></tr>
<tr><td><b>central_processing</b></td><td>Enable central processing mode (requires cluster-wide shut down and restart of rgmanager.).</td></tr>
+ <tr><td><b>disabled</b></td><td>Disables rgmanager entirely if set to 1. Do not set unless you really mean it.</td></tr>
<tr><td><b>log_facility</b></td><td>The facility is one of the following keywords: auth, authpriv, cron, daemon, kern, lpr, mail, news, syslog, user, uucp and local0 through local7</td></tr>
<tr><td><b>log_level</b></td><td>An integer 0-7, inclusive, for all levels less than the selected. 0, system is unusable, emergency; 1, action must be taken immediately; 2, critical conditions; 3, error conditions; 4, warning conditions; 5, normal but significant condition; 6, informational; 7, debug-level messages.</td></tr>
<tr><td><b>status_child_max</b></td><td>Maximum number of status child threads.</td></tr>
<tr><td><b>status_poll_interval</b></td><td>Scan the resource tree every X seconds for resources which need to be checked.</td></tr>
<tr><td><b>transition_throttling</b></td><td>During transitions, keep the event processor alive for this many seconds.</td></tr>
</table><br/>
-Children: <a href="#tag_failoverdomains">failoverdomains</a> <a href="#tag_events">events</a> <a href="#tag_resources">resources</a> <a href="#ref_SERVICE">SERVICE</a> <a href="#ref_VM">VM</a> <br/><a href="#" onClick="history.go(-1)" />Back</a> | <a href="#toc_tag_reference">Contents</a>
+Children: <a href="#tag_failoverdomains">failoverdomains</a> <a href="#tag_events">events</a> <a href="#tag_resources">resources</a> <a href="#tag_resource-defaults">resource-defaults</a> <a href="#ref_SERVICE">SERVICE</a> <a href="#ref_VM">VM</a> <br/><a href="#" onClick="history.go(-1)" />Back</a> | <a href="#toc_tag_reference">Contents</a>
<h3><a name="tag_samba"/>samba</h3>
Dynamic smbd/nmbd resource agent<br/>
<br/>
@@ -1079,7 +1121,7 @@ Dynamic smbd/nmbd resource agent<br/>
</table><br/>
Children: <a href="#ref_CHILDREN">CHILDREN</a> <br/><a href="#" onClick="history.go(-1)" />Back</a> | <a href="#toc_tag_reference">Contents</a>
<h3><a name="tag_SAPDatabase"/>SAPDatabase</h3>
-SAP database resource agent<br/>
+Manages any SAP database (based on Oracle, MaxDB, or DB2)<br/>
<br/>
<table><tr valign="top"><td>Attribute</td><td>Description</td></tr>
<tr><td><b>AUTOMATIC_RECOVER</b></td><td>Enable or disable automatic startup recovery</td></tr>
@@ -1195,12 +1237,26 @@ OpenAIS msg transport protocol<br/>
<tr><td><b>fail_recv_const</b></td><td> </td></tr>
<tr><td><b>join</b></td><td>This is a timeout value that specifies how many milliseconds to wait for join messages in the membership protocol.</td></tr>
<tr><td><b>keyfile</b></td><td></td></tr>
+ <tr><td><b>max_messages</b></td><td>Specifies the maximum number of messages that may be sent by one processor on receipt of the token. This parameter is limited to 256000 / netmtu to prevent overflow of the kernel transmit buffers</td></tr>
+ <tr><td><b>miss_count_const</b></td><td>This constant defines the maximum number of times on receipt of a token a message is checked for retransmission before retransmission occurs. This parameter is useful to modify for switches that delay multicast packets compared to unicast packets. The default setting works well for nearly all modern switches.</td></tr>
+ <tr><td><b>netmtu</b></td><td>Specifies the network maximum transmit unit. To set this value beyond 1500, the regular frame MTU, requires ethernet devices that support large, or also called jumbo, frames. If any device in the network does not support large frames, the protocol will not operate properly. The hosts must also have their mtu size set from 1500 to whatever frame size is specified here.</td></tr>
<tr><td><b>rrp_mode</b></td><td>This attribute specifies the redundant ring protocol mode. Its value can be set to active, passive, or none. Active replication offers slightly lower latency from transmit to delivery in faulty network environments but with less performance. Passive replication may nearly double the speed of the totem protocol if the protocol doesn't become cpu bound. The final option is none, in which case only one network interface is used to operate the totem protocol. If only one interface directive is specified, none is automatically chosen. If multiple interface directives are specified, only active or passive may be chosen.</td></tr>
+ <tr><td><b>rrp_problem_count_threshold</b></td><td>This specifies the number of times a problem is detected with a link before setting the link faulty. Once a link is set faulty, no more data is transmitted upon it. Corosync default is 10, cman default is 3</td></tr>
<tr><td><b>secauth</b></td><td>This attribute specifies that HMAC/SHA1 authentication should be used to authenticate all messages. It further specifies that all data should be encrypted with the sober128 encryption algorithm to protect data from eavesdropping. For more information setting this value, refer the the openais.conf man page.</td></tr>
+ <tr><td><b>seqno_unchanged_const</b></td><td>Specifies how many rotations of the token without any multicast traffic should occur before the merge detection timeout is started.</td></tr>
<tr><td><b>token</b></td><td>This is a timeout value that specifies how many milliseconds elapse before a token loss is declared after not receiving a token. This is the time spent detecting a failure of a processor in the current configuration. Reforming a new configuration takes about 50 milliseconds in addition to this timeout.</td></tr>
<tr><td><b>token_retransmits_before_loss_const</b></td><td>This value identifies how many token retransmits should be attempted before forming a new configuration. If this value is set, retransmit and hold will be automatically calculated from retransmits_before_loss and token.</td></tr>
+ <tr><td><b>window_size</b></td><td>Specifies the maximum number of messages that may be sent on one token rotation. window_size should be no larger then 256000 / netmtu to avoid overflow of the kernel receive buffers.</td></tr>
</table><br/>
Children: <a href="#tag_interface">interface</a> <br/><a href="#" onClick="history.go(-1)" />Back</a> | <a href="#toc_tag_reference">Contents</a>
+<h3><a name="tag_uidgid"/>uidgid</h3>
+Access control to corosync IPC<br/>
+<br/>
+<table><tr valign="top"><td>Attribute</td><td>Description</td></tr>
+ <tr><td><b>gid</b></td><td>This is an unprivileged group name, as globally available to the system via /etc/group, including nis/ldap, allowed to connect to corosync IPC. This value cannot be updated at runtime, a full cman restart is required.</td></tr>
+ <tr><td><b>uid</b></td><td>This is an unprivileged username, as globally available to the system via /etc/passwd, including nis/ldap, allowed to connect to corosync IPC. This value cannot be updated at runtime, a full cman restart is required.</td></tr>
+</table><br/>
+<a href="#" onClick="history.go(-1)" />Back</a> | <a href="#toc_tag_reference">Contents</a>
<h3><a name="tag_unfence"/>unfence</h3>
Contains devices for unfencing the node. fence_node(8)<br/>
<br/>
@@ -1227,6 +1283,7 @@ Defines a Virtual Machine<br/>
<tr><td><b>restart_expire_time</b></td><td>Restart expiration time; amount of time before a restart is forgotten.</td></tr>
<tr><td><b>snapshot</b></td><td>Path to the snapshot directory where the virtual machine image will be stored.</td></tr>
<tr><td><b>status_program</b></td><td>Additional status check program</td></tr>
+ <tr><td><b>tunnelled</b></td><td>Tunnel data over ssh to securely migrate virtual machines.</td></tr>
<tr><td><b>use_virsh</b></td><td>If set to 1, vm.sh will use the virsh command to manage virtual machines instead of xm. This is required when using non-Xen virtual machines (e.g. qemu / KVM).</td></tr>
<tr><td><b>xmlfile</b></td><td>Full path to libvirt XML file describing the domain.</td></tr>
<tr><td><b>__enforce_timeouts</b></td><td>Consider a timeout for operations as fatal.</td></tr>
9 years, 10 months
cluster: RHEL6 - fenced: Remove references to skip_undefined option
by Christine Caulfield
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=a3d1207e71f...
Commit: a3d1207e71f8b10a844e39dfd4908a3128d9a0f6
Parent: 7df55df9518bf6ffc2efa3577dfd8afb2551113b
Author: Christine Caulfield <ccaulfie(a)redhat.com>
AuthorDate: Mon Jun 16 13:40:07 2014 +0100
Committer: Christine Caulfield <ccaulfie(a)redhat.com>
CommitterDate: Mon Jun 16 13:40:07 2014 +0100
fenced: Remove references to skip_undefined option
The skip_undefined option is unsupported, remove all reference to it
to stop people trying to use it.
I've left the code in place for simplciity of the patch, this is mainly
a documentation issue.
Signed-off-by: Christine Caulfield <ccaulfie(a)redhat.com>
---
config/tools/xml/cluster.rng.in.head | 5 -----
fence/fenced/main.c | 2 +-
fence/man/fenced.8 | 3 ---
3 files changed, 1 insertions(+), 9 deletions(-)
diff --git a/config/tools/xml/cluster.rng.in.head b/config/tools/xml/cluster.rng.in.head
index 4e3d901..f42269c 100644
--- a/config/tools/xml/cluster.rng.in.head
+++ b/config/tools/xml/cluster.rng.in.head
@@ -460,11 +460,6 @@ To validate your cluster.conf against this schema, run:
startup fencing. fenced(8)"/>
</optional>
- <optional>
- <attribute name="skip_undefined" rha:description="Set to 1 to disable
- startup fencing of nodes with no fence methods defined.
- fenced(8)"/>
- </optional>
</element>
</optional>
<!-- end fence_daemon block -->
diff --git a/fence/fenced/main.c b/fence/fenced/main.c
index 924b8c9..ab860b7 100644
--- a/fence/fenced/main.c
+++ b/fence/fenced/main.c
@@ -911,7 +911,7 @@ static void print_usage(void)
printf(" the daemon to start. \"-\" to skip default directories\n");
printf(" /sys/fs/gfs, /sys/fs/gfs2, /sys/kernel/dlm\n");
printf(" -c All nodes are in a clean state to start; do no startup fencing\n");
- printf(" -s Skip startup fencing of nodes with no defined fence methods\n");
+// printf(" -s Skip startup fencing of nodes with no defined fence methods\n");
printf(" -j <secs> Post-join fencing delay (default %d)\n", DEFAULT_POST_JOIN_DELAY);
printf(" -f <secs> Post-fail fencing delay (default %d)\n", DEFAULT_POST_FAIL_DELAY);
printf(" -R <secs> Override time (default %d)\n", DEFAULT_OVERRIDE_TIME);
diff --git a/fence/man/fenced.8 b/fence/man/fenced.8
index b172151..1d5008b 100644
--- a/fence/man/fenced.8
+++ b/fence/man/fenced.8
@@ -139,9 +139,6 @@ a dash (\-) to skip default directories /sys/fs/gfs, /sys/fs/gfs2,
.B \-c
All nodes are in a clean state to start. Do no startup fencing.
.TP
-.B \-s
-Skip startup fencing of nodes with no defined fence methods.
-.TP
.B \-q
Disable dbus signals.
.TP
9 years, 10 months
cluster: RHEL6 - manpage: Mention cluster.conf.html scheme in cluster.conf man page
by Christine Caulfield
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=7df55df9518...
Commit: 7df55df9518bf6ffc2efa3577dfd8afb2551113b
Parent: 6c17bb97310890cb90e22ff204c8cd622c6196ce
Author: Christine Caulfield <ccaulfie(a)redhat.com>
AuthorDate: Mon Jun 16 12:58:25 2014 +0100
Committer: Christine Caulfield <ccaulfie(a)redhat.com>
CommitterDate: Mon Jun 16 12:58:25 2014 +0100
manpage: Mention cluster.conf.html scheme in cluster.conf man page
The cluster.conf.html file contains the current definitive list
of supported items in the cluster.conf file. Users should know
it is there.
Signed-off-by: Christine Caulfield <ccaulfie(a)redhat.com>
---
config/man/cluster.conf.5 | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/config/man/cluster.conf.5 b/config/man/cluster.conf.5
index ad2cfee..a134afd 100644
--- a/config/man/cluster.conf.5
+++ b/config/man/cluster.conf.5
@@ -31,6 +31,9 @@ structure will cause the cluster startup to fail. See
and
.BR ccs_config_dump (8).
+A list of the valid items for your installed cluster version is held in the file /usr/share/doc/cman-<version>/cluster.conf.html .
+
+
.SS Cluster
The top level
.B cluster
9 years, 10 months
cluster: RHEL6 - qdisk: Waits tko cycles to complete initialization instead of tko_up
by Christine Caulfield
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=6c17bb97310...
Commit: 6c17bb97310890cb90e22ff204c8cd622c6196ce
Parent: f501e3ddfbbb595e4df7fc0050ff77237c0f6b99
Author: Christine Caulfield <ccaulfie(a)redhat.com>
AuthorDate: Mon Jun 16 10:56:31 2014 +0100
Committer: Christine Caulfield <ccaulfie(a)redhat.com>
CommitterDate: Mon Jun 16 10:56:31 2014 +0100
qdisk: Waits tko cycles to complete initialization instead of tko_up
Resolves rhbz#1029210
Signed-off-by: Christine Caulfield <ccaulfie(a)redhat.com>
---
cman/qdisk/main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cman/qdisk/main.c b/cman/qdisk/main.c
index 49ea3da..e84e788 100644
--- a/cman/qdisk/main.c
+++ b/cman/qdisk/main.c
@@ -553,7 +553,7 @@ quorum_init(qd_ctx *ctx, node_info_t *ni, int max, struct h_data *h, int maxh)
return -1;
}
- while (++x <= ctx->qc_tko && _running) {
+ while (++x <= ctx->qc_tko_up && _running) {
read_node_blocks(ctx, ni, max);
check_transitions(ctx, ni, max, NULL);
9 years, 10 months
gfs2-utils: master - gfs2_edit: Print block types with log descriptors
by Bob Peterson
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=1553db15...
Commit: 1553db15e45dcf3d06a881fe369f32cef80a4356
Parent: 19601f7889e2ff68f9c91af63322e519ff456e6e
Author: Bob Peterson <rpeterso(a)redhat.com>
AuthorDate: Wed Jun 11 12:07:46 2014 -0500
Committer: Bob Peterson <rpeterso(a)redhat.com>
CommitterDate: Wed Jun 11 12:25:11 2014 -0500
gfs2_edit: Print block types with log descriptors
This patch makes gfs2_edit's journal print function print the metadata
block type along side the block number in its log descriptor output.
For example: In the past, when a log descriptor was printed, it looked
like this:
0x8200 (j+ 163): Log descriptor, type 300 (Metadata) len:504, data1: 503 (503)
0x70eb772 0x70df987 0x70dc7a1 0x70eb574
0x70dc5a3 0x70eb376 0x70dc3a5 0x70eb178
0x70dc1a7 0x70eaf7a 0x70dbfa9 0x70ead7c
With this patch, the output is more useful:
0x8200 (j+ 163): Log descriptor, type 300 (Metadata) len:504, data1: 503 (503)
0x70eb772 in 0x70df987 rb 0x70dc7a1 in 0x70eb574 in
0x70dc5a3 in 0x70eb376 in 0x70dc3a5 in 0x70eb178 in
0x70dc1a7 in 0x70eaf7a in 0x70dbfa9 in 0x70ead7c in
In this case, "in" indicates indirect blocks, and "rb" indicates a rgrp bitmap.
This is useful for getting a bigger picture of what that journal descriptor
contains and represents.
---
gfs2/edit/hexedit.h | 1 +
gfs2/edit/journal.c | 15 ++++++++++++---
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/gfs2/edit/hexedit.h b/gfs2/edit/hexedit.h
index 541684a..f23c581 100644
--- a/gfs2/edit/hexedit.h
+++ b/gfs2/edit/hexedit.h
@@ -27,6 +27,7 @@ enum dsp_mode { HEX_MODE = 0, GFS2_MODE = 1, EXTENDED_MODE = 2, INIT_MODE = 3 };
#define RGLIST_DUMMY_BLOCK -2
#define JOURNALS_DUMMY_BLOCK -3
+extern const char *mtypes[];
extern struct gfs2_sb sb;
extern uint64_t block;
extern int blockhist;
diff --git a/gfs2/edit/journal.c b/gfs2/edit/journal.c
index bb56649..a72a044 100644
--- a/gfs2/edit/journal.c
+++ b/gfs2/edit/journal.c
@@ -202,6 +202,7 @@ static int print_ld_blks(const uint64_t *b, const char *end, int start_line,
{
int bcount = 0, found_tblk = 0, found_bblk = 0;
static char str[256];
+ struct gfs2_buffer_head *j_bmap_bh;
if (tblk_off)
*tblk_off = 0;
@@ -218,8 +219,17 @@ static int print_ld_blks(const uint64_t *b, const char *end, int start_line,
}
bcount++;
if (prnt) {
- sprintf(str, "0x%llx",
- (unsigned long long)be64_to_cpu(*b));
+ if (is_meta_ld) {
+ j_bmap_bh = bread(&sbd, abs_block +
+ bcount);
+ sprintf(str, "0x%llx %2s",
+ (unsigned long long)be64_to_cpu(*b),
+ mtypes[lgfs2_get_block_type(j_bmap_bh)]);
+ brelse(j_bmap_bh);
+ } else {
+ sprintf(str, "0x%llx",
+ (unsigned long long)be64_to_cpu(*b));
+ }
print_gfs2("%-18.18s ", str);
}
if (!found_tblk && tblk_off)
@@ -237,7 +247,6 @@ static int print_ld_blks(const uint64_t *b, const char *end, int start_line,
int type, bmap = 0;
uint64_t o;
struct gfs2_buffer_head *save_bh;
- struct gfs2_buffer_head *j_bmap_bh;
found_bblk = 1;
print_gfs2("<-------------------------");
9 years, 10 months
gfs2-utils: master - gfs2_edit: print LB (log descriptor continuation blocks) for GFS2
by Bob Peterson
Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=19601f78...
Commit: 19601f7889e2ff68f9c91af63322e519ff456e6e
Parent: f4fc86b28a551252bd3b8fc1f7e19bf161c600b2
Author: Bob Peterson <rpeterso(a)redhat.com>
AuthorDate: Tue Jun 10 11:32:29 2014 -0500
Committer: Bob Peterson <rpeterso(a)redhat.com>
CommitterDate: Wed Jun 11 12:17:51 2014 -0500
gfs2_edit: print LB (log descriptor continuation blocks) for GFS2
This patch allows gfs2_edit to print metadata blocks of type LB
(log descriptor continuation blocks) for GFS2. Prior to this, only
GFS1's continuation blocks would print.
---
gfs2/edit/journal.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/gfs2/edit/journal.c b/gfs2/edit/journal.c
index e012bc3..bb56649 100644
--- a/gfs2/edit/journal.c
+++ b/gfs2/edit/journal.c
@@ -582,12 +582,15 @@ void dump_journal(const char *journal, int tblk)
" [UNMOUNTED]" : "");
}
eol(0);
- } else if (sbd.gfs1 && ld_blocks > 0) {
- print_gfs2("0x%llx (j+%4llx): GFS log descriptor"
+ } else if ((ld_blocks > 0) &&
+ (sbd.gfs1 || block_type == GFS2_METATYPE_LB)) {
+ print_gfs2("0x%llx (j+%4llx): Log descriptor"
" continuation block", abs_block, jb);
eol(0);
print_gfs2(" ");
- ld_blocks -= print_ld_blks((uint64_t *)dummy_bh.b_data,
+ ld_blocks -= print_ld_blks((uint64_t *)dummy_bh.b_data +
+ (sbd.gfs1 ? 0 :
+ sizeof(struct gfs2_meta_header)),
(dummy_bh.b_data +
sbd.bsize), start_line,
tblk, &tblk_off, 0, rgd,
9 years, 10 months
cluster: RHEL6 - gfs2_edit: Reinstate a check for system dinodes
by Andrew Price
Gitweb: http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=f501e3ddfbb...
Commit: f501e3ddfbbb595e4df7fc0050ff77237c0f6b99
Parent: 84b78a126085a34fc4b7bf39911431b5993bb221
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Mon Jun 9 18:58:28 2014 +0100
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Mon Jun 9 19:21:40 2014 +0100
gfs2_edit: Reinstate a check for system dinodes
In both RHEL6 and upstream, the commit "fsck.gfs2: can't repair rgrps
resulting from gfs_grow->gfs2_convert" added a check for GFS2_DIF_SYSTEM
dinodes before reducing the dinode metadata save height.
Later, a commit entitled "gfs2_edit savemeta doesn't save all leaf
blocks for large dirs" was pushed to both branches, only there were
differences between them which left the GFS2_DIF_SYSTEM check in place
upstream and removed from the RHEL6 branch. Thus, the previous commit to
the RHEL6 branch uncovered a bug which meant that quota change files
would be saved incomplete.
This commit adds back that check as it is required to avoid truncating
the metadata tree for quota change files. This brings the RHEL6 branch a
little closer to upstream.
Resolves: rhbz#1081523
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/edit/savemeta.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gfs2/edit/savemeta.c b/gfs2/edit/savemeta.c
index b06d164..5aa498c 100644
--- a/gfs2/edit/savemeta.c
+++ b/gfs2/edit/savemeta.c
@@ -482,8 +482,8 @@ static void save_inode_data(struct metafd *mfd)
(S_ISDIR(inode->i_di.di_mode) ||
(sbd.gfs1 && inode->i_di.__pad1 == GFS_FILE_DIR)))
height++;
- else if (height && !block_is_systemfile() &&
- !S_ISDIR(inode->i_di.di_mode))
+ else if (height && !(inode->i_di.di_flags & GFS2_DIF_SYSTEM) &&
+ !block_is_systemfile() && !S_ISDIR(inode->i_di.di_mode))
height--;
osi_list_add(&metabh->b_altlist, &metalist[0]);
for (i = 1; i <= height; i++){
9 years, 11 months
fence-agents: master - fencing: Remove unmaintained fence agents
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=9caf5a...
Commit: 9caf5a23e58b52e05042674260eb1f1aa6d22558
Parent: 77c8c858a41da9e593f5f630ff42924211248a9b
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Mon Jun 9 15:47:09 2014 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Mon Jun 9 15:47:09 2014 +0200
fencing: Remove unmaintained fence agents
Following agents were removed:
fence_baytech
fence_bullpap
fence_cpint
fence_mcdata
fence_rackswitch
fence_vixel
fence_xcat
---
configure.ac | 9 -
fence/agents/baytech/Makefile.am | 17 -
fence/agents/baytech/fence_baytech.pl | 746 ---------------------------
fence/agents/bullpap/Makefile.am | 17 -
fence/agents/bullpap/fence_bullpap.pl | 433 ----------------
fence/agents/cpint/Makefile.am | 17 -
fence/agents/cpint/fence_cpint.pl | 188 -------
fence/agents/egenera/Makefile.am | 17 -
fence/agents/egenera/fence_egenera.pl | 501 ------------------
fence/agents/mcdata/Makefile.am | 17 -
fence/agents/mcdata/fence_mcdata.pl | 361 -------------
fence/agents/rackswitch/Makefile.am | 17 -
fence/agents/rackswitch/do_rack.c | 807 ------------------------------
fence/agents/rackswitch/do_rack.h | 27 -
fence/agents/vixel/Makefile.am | 17 -
fence/agents/vixel/fence_vixel.pl | 267 ----------
fence/agents/xcat/Makefile.am | 17 -
fence/agents/xcat/fence_xcat.pl | 250 ---------
tests/data/metadata/fence_rackswitch.xml | 30 --
19 files changed, 0 insertions(+), 3755 deletions(-)
diff --git a/configure.ac b/configure.ac
index f208bef..4d0aa6a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,7 +12,6 @@ LT_PREREQ([2.2.6])
LT_INIT
AC_CONFIG_MACRO_DIR([m4])
-AC_CONFIG_SRCDIR([fence/agents/rackswitch/do_rack.h])
AC_CONFIG_HEADERS([make/clusterautoconfig.h])
AC_CANONICAL_HOST
@@ -261,18 +260,14 @@ AC_CONFIG_FILES([Makefile
fence/agents/apc/Makefile
fence/agents/apc_snmp/Makefile
fence/agents/amt/Makefile
- fence/agents/baytech/Makefile
fence/agents/bladecenter/Makefile
fence/agents/brocade/Makefile
- fence/agents/bullpap/Makefile
fence/agents/cisco_mds/Makefile
fence/agents/cisco_ucs/Makefile
- fence/agents/cpint/Makefile
fence/agents/drac/Makefile
fence/agents/drac5/Makefile
fence/agents/dummy/Makefile
fence/agents/eaton_snmp/Makefile
- fence/agents/egenera/Makefile
fence/agents/eps/Makefile
fence/agents/hpblade/Makefile
fence/agents/ibmblade/Makefile
@@ -287,9 +282,7 @@ AC_CONFIG_FILES([Makefile
fence/agents/lib/Makefile
fence/agents/lpar/Makefile
fence/agents/manual/Makefile
- fence/agents/mcdata/Makefile
fence/agents/netio/Makefile
- fence/agents/rackswitch/Makefile
fence/agents/ovh/Makefile
fence/agents/pve/Makefile
fence/agents/raritan/Makefile
@@ -299,11 +292,9 @@ AC_CONFIG_FILES([Makefile
fence/agents/sanbox2/Makefile
fence/agents/scsi/Makefile
fence/agents/virsh/Makefile
- fence/agents/vixel/Makefile
fence/agents/vmware/Makefile
fence/agents/vmware_soap/Makefile
fence/agents/wti/Makefile
- fence/agents/xcat/Makefile
fence/agents/xenapi/Makefile
fence/agents/hds_cb/Makefile
fence/agents/zvm/Makefile
diff --git a/fence/agents/baytech/Makefile.am b/fence/agents/baytech/Makefile.am
deleted file mode 100644
index c0b0b84..0000000
--- a/fence/agents/baytech/Makefile.am
+++ /dev/null
@@ -1,17 +0,0 @@
-MAINTAINERCLEANFILES = Makefile.in
-
-TARGET = fence_baytech
-
-SRC = $(TARGET).pl
-
-EXTRA_DIST = $(SRC)
-
-sbin_SCRIPTS = $(TARGET)
-
-man_MANS = $(TARGET).8
-
-include $(top_srcdir)/make/fencebuild.mk
-include $(top_srcdir)/make/fencemanperl.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/baytech/fence_baytech.pl b/fence/agents/baytech/fence_baytech.pl
deleted file mode 100644
index bb7f42e..0000000
--- a/fence/agents/baytech/fence_baytech.pl
+++ /dev/null
@@ -1,746 +0,0 @@
-#!/usr/bin/perl
-
-# This fencing agent is written for the Baytech RPC27-20nc in conjunction with
-# a Cyclades terminal server. The Cyclades TS exports the RPC's serial port
-# via a Telnet interface. Other interfaces, such as SSH, are possible.
-# However, this script relys upon the assumption that Telnet is used. Future
-# features to this agent would allow the agent to work with a mulitude of
-# different communication protocols such as Telnet, SSH or Kermit.
-#
-# The other assumption that is made is that Outlet names do not end in space.
-# The name "Foo" and "Foo " are identical when the RPC prints them with
-# the status command.
-
-use Net::Telnet;
-use Getopt::Std;
-
-my $ME = $0;
-
-END {
- defined fileno STDOUT or return;
- close STDOUT and return;
- warn "$ME: failed to close standard output: $!\n";
- $? ||= 1;
-}
-
-# WARNING!! Do not add code bewteen "#BEGIN_VERSION_GENERATION" and
-# "#END_VERSION_GENERATION" It is generated by the Makefile
-
-#BEGIN_VERSION_GENERATION
-$RELEASE_VERSION="";
-$REDHAT_COPYRIGHT="";
-$BUILD_DATE="";
-#END_VERSION_GENERATION
-
-# Get the program name from $0 and strip directory names
-$_=$0;
-s/.*\///;
-my $pname = $_;
-
-
-sub rpc_error
-{
- if (defined $error_message && $error_message ne "")
- {
- chomp $error_message;
- die "$error_message\n";
- }
- else
- {
- die "read timed-out\n"
- }
-}
-
-sub usage
-{
-
- print "Usage:\n";
- print "\n";
- print "$pname [options]\n";
- print "\n";
- print "Options:\n";
- print " -a host host to connect to\n";
- print " -D debugging output\n";
- print " -h usage\n";
- print " -l string user name\n";
- print " -o string action: on,off,status, reboot (default) or metadata\n";
- print " -n string outlet name\n";
- print " -p string password\n";
- print " -S path script to run to retrieve password\n";
- print " -V version\n";
-
- exit 0;
-}
-
-sub fail
-{
- ($msg)=@_;
- print $msg."\n" unless defined $quiet;
- $t->close if defined $t;
- exit 1;
-}
-
-sub fail_usage
-{
- ($msg)=@_;
- print STDERR $msg."\n" if $msg;
- print STDERR "Please use '-h' for usage.\n";
- exit 1;
-}
-
-sub version
-{
- print "$pname $RELEASE_VERSION $BUILD_DATE\n";
- print "$REDHAT_COPYRIGHT\n" if ( $REDHAT_COPYRIGHT );
-
- exit 0;
-}
-
-sub print_metadata
-{
-print '<?xml version="1.0" ?>
-<resource-agent name="fence_baytech" shortdesc="I/O Fencing agent for Baytech RPC switches in combination with a Cyclades Terminal Server" >
-<longdesc>
-This fencing agent is written for the Baytech RPC27-20nc in combination with a Cyclades terminal server. The Cyclades TS exports the RPC\'s serial port via a Telnet interface. Other interfaces, such as SSH, are possible. However, this script relies upon the assumption that Telnet is used.
-
-The other assumption that is made is that Outlet names do not end in space. The name "Foo" and "Foo " are identical when the RPC prints them with the status command.
-</longdesc>
-<vendor-url>http://www.baytech.net</vendor-url>
-<parameters>
- <parameter name="action" unique="1" required="1">
- <getopt mixed="-o [action]" />
- <content type="string" default="disable" />
- <shortdesc lang="en">Fencing Action</shortdesc>
- </parameter>
- <parameter name="ipaddr" unique="1" required="1">
- <getopt mixed="-a [ip]" />
- <content type="string" />
- <shortdesc lang="en">IP Address or Hostname</shortdesc>
- </parameter>
- <parameter name="login" unique="1" required="1">
- <getopt mixed="-l [name]" />
- <content type="string" />
- <shortdesc lang="en">Login Name</shortdesc>
- </parameter>
- <parameter name="passwd" unique="1" required="0">
- <getopt mixed="-p [password]" />
- <content type="string" />
- <shortdesc lang="en">Login password or passphrase</shortdesc>
- </parameter>
- <parameter name="passwd_script" unique="1" required="0">
- <getopt mixed="-S [script]" />
- <content type="string" />
- <shortdesc lang="en">Script to retrieve password</shortdesc>
- </parameter>
- <parameter name="port" unique="1" required="1">
- <getopt mixed="-n [id]" />
- <content type="string" />
- <shortdesc lang="en">Physical plug number or name of virtual machine</shortdesc>
- </parameter>
- <parameter name="help" unique="1" required="0">
- <getopt mixed="-h" />
- <content type="string" />
- <shortdesc lang="en">Display help and exit</shortdesc>
- </parameter>
-</parameters>
-<actions>
- <action name="enable" />
- <action name="disable" />
- <action name="status" />
- <action name="metadata" />
-</actions>
-</resource-agent>
-';
-}
-
-
-# Get operating paramters, either with getopts or from STDIN
-sub get_options
-{
- $action = "Reboot";
- if (@ARGV > 0) {
- getopts("n:l:p:S:o:a:VhD") || fail_usage ;
-
- usage if defined $opt_h;
- version if defined $opt_V;
-
- fail_usage "Unkown parameter." if (@ARGV > 0);
-
- } else {
- get_options_stdin();
- }
-
- if ((defined $opt_o) && ($opt_o =~ /metadata/i)) {
- print_metadata();
- exit 0;
- }
-
- fail "failed: must specify hostname" unless defined $opt_a;
- $host=$opt_a;
- $port=23 unless ($opt_a =~ /:/);
-
- $action = $opt_o if defined $opt_o;
- fail "failed: unrecognised action: $action"
- unless $action=~ /^(Off|On|Reboot|status)$/i;
-
- fail "failed: no outletname" unless defined $opt_n;
- $outlet = $opt_n;
-
- $debug=$opt_D if defined $opt_D;
- $quiet=$opt_q if defined $opt_q;
- $user=$opt_l if defined $opt_l;
- $passwd=$opt_p if defined $opt_p;
- if (defined $opt_S) {
- $pwd_script_out = `$opt_S`;
- chomp($pwd_script_out);
- if ($pwd_script_out) {
- $passwd=$pwd_script_out;
- }
- }
-
- if(defined $passwd && !defined $user)
- {
- fail "failed: password given without username";
- }
-}
-
-# Get options from STDIN
-sub get_options_stdin
-{
- my $opt;
- my $line = 0;
- while( defined($in = <>) )
- {
- $_ = $in;
- chomp;
-
- # strip leading and trailing whitespace
- s/^\s*//;
- s/\s*$//;
-
- # skip comments
- next if /^#/;
-
- $line+=1;
- $opt=$_;
- next unless $opt;
-
- ($name,$val)=split /\s*=\s*/, $opt;
-
- if ( $name eq "" )
- {
- print STDERR "parse error: illegal name in option $line\n";
- exit 2;
- }
-
- # DO NOTHING -- this field is used by fenced
- elsif ($name eq "agent" ) { }
-
- elsif ($name eq "host" )
- {
- $opt_a = $val;
- }
-
- elsif ($name eq "login" )
- {
- $opt_l = $val;
- }
-
- elsif ($name eq "passwd" )
- {
- $opt_p = $val;
- }
-
- elsif ($name eq "passwd_script") {
- $opt_S = $val;
- }
-
- elsif ($name eq "action" )
- {
- $opt_o = $val;
- }
-
- elsif ($name eq "outlet" )
- {
- $opt_n = $val;
- }
-
- }
-}
-
-# Get a bunch of lines. The newlines must terminate complete lines.
-sub getlines
-{
- my $data=$t->get();
- return undef unless defined $data;
- my @chars = split //,$data;
- my @lines;
- my $line="";
-
- for (my $i=0;$i<@chars;$i++)
- {
- $line = $line.$chars[$i];
- next unless $chars[$i] eq "\n";
- $lines[@lines] = $line;
- $line = "";
- }
- $lines[@lines] = $line unless $line eq "";
-
- return @lines;
-}
-
-# Fill the global input buffer of lines read. All lines are terminated with
-# a newline. If a line is not terminated, the next call to fill buffer will
-# append the last line of the input buffer with the first line that it gets from
-# getlines()
-sub fill_buffer
-{
- my @lines = getlines();
- return undef unless @lines;
-
- if(@buffer)
- {
- if ( $buffer[$#buffer]=~/\n/) { }
- else
- {
- $buffer[$#buffer] = $buffer[$#buffer].$lines[0];
- shift @lines;
- }
- }
-
- foreach (@lines)
- {
- push @buffer,$_;
- }
-}
-
-
-
-#
-# ($p_index,@data) = get_match @patterns;
-#
-# searches the input buffers for the patterns specified by the regeps in
-# @patterns, when a match is found, all the lines through the matched
-# pattern line are removed from the global input buffer and returned in the
-# array @data. The index into @patterns for the matching pattern is also
-# returned.
-sub get_match
-{
- my (@patterns) = @_;
- $b_index = 0 unless defined $b_index;
-
- fill_buffer() unless defined @buffer;
-
- for(;;)
- {
- for(my $bi=$b_index; $bi<@buffer; $bi++)
- {
- for(my $pat=0; $pat<@patterns; $pat++)
- {
- if($buffer[$bi] =~ /$patterns[$pat]/)
- {
- $b_index = 0;
- my @rtrn = splice(@buffer,0,$bi);
- shift @buffer;
-
- if($debug)
- {
- foreach (@rtrn) { print $_ }
- print "$patterns[$pat] ";
- }
-
- return ($pat,@rtrn);
- }
- }
- $b_index = $bi;
- }
-
- fill_buffer();
- }
-}
-
-#
-# ($bt_num,$bt_name,$bt_state,$bt_locked) = parse_status $outlet,@data;
-#
-# This parses the data @data and searches for an outlet named $outlet.
-# The data will be in the form:
-#
-# Average Power: 0 Watts Apparent Power: 17 VA
-#
-# True RMS Voltage: 120.0 Volts
-#
-# True RMS Current: 0.1 Amps Maximum Detected: 0.2 Amps
-#
-# Internal Temperature: 19.5 C
-#
-# Outlet Circuit Breaker: Good
-#
-# 1)...Outlet 1 : Off 2)...Outlet 2 : Off
-# 3)...Outlet 3 : On 4)...Outlet 4 : On
-# 5)...Outlet 5 : On 6)...Outlet 6 : On
-# 7)...Outlet 7 : On 8)...Outlet 8 : On
-# 9)...Outlet 9 : On 10)...Outlet 10 : On
-# 11)...Outlet 11 : On 12)...Outlet 12 : On
-# 13)...Outlet 13 : On 14)...Outlet 14 : On
-# 15)...Outlet 15 : On 16)...Outlet 16 : On
-# 17)...Outlet 17 : On 18)...Outlet 18 : On
-# 19)...Outlet 19 : On 20)...Outlet 20 : On Locked
-#
-sub parse_status
-{
- my $outlet = shift;
- my @data = @_;
-
- my $bt_num="";
- my $bt_name="";
- my $bt_state="";
- my $bt_locked="";
-
- # Verify that the Outlet name exists
- foreach my $line (@data)
- {
- next unless $line =~ /^[ 12][0-9]\)\.\.\./;
-
- my @entries = split /([ 12][0-9])\)\.\.\./,$line;
-
- foreach my $entry (@entries)
- {
- next if $entry eq "";
-
- if($entry =~ /^([ 12][0-9])$/)
- {
- $bt_num = $1;
- }
- elsif($entry =~ /^(.{15}) : (On|Off)(.*)/)
- {
-
- $bt_name = $1;
- $bt_state = $2;
- $bt_locked = $3;
-
- $_ = $bt_name;
- s/\s*$//;
- $bt_name = $_;
-
- $_ = $bt_locked;
- s/\s*$//;
- $bt_locked = $_;
-
- last if ($bt_name eq $outlet);
-
- $bt_name = "";
- next;
- }
- else
- {
- die "parse error: $entry";
- }
- }
- last if ($bt_name ne "");
- }
-
- if ($bt_name eq "")
- {
- $bt_num=undef;
- $bt_name=undef;
- $bt_state=undef;
- $bt_locked=undef;
- }
-
- return ($bt_num,$bt_name,$bt_state,$bt_locked);
-}
-
-##########################################################################
-#
-# Main
-
-get_options;
-
-
-if (defined $port)
-{
- $t = new Net::Telnet(Host=>$host, Port=>$port) or
- die "Unable to connect to $host:$port: ".($!?$!:$_)."\n";
-}
-else
-{
- $t = new Net::Telnet(Host=>$host) or
- die "Unable to connect to $host: ".($!?$!:$_)."\n";
-}
-
-
-
-#> DEBUG $t->dump_log("LOG");
-
-$t->print("\n");
-
-my @patterns;
-$prompt_user="^Enter user name:";
-$prompt_pass="^Enter Password:";
-$prompt_cmd="^RPC-27>";
-$prompt_confirm_yn="^.*\\(Y/N\\)\\?";
-
-$patterns[0]=$prompt_user;
-$patterns[1]=$prompt_pass;
-$patterns[2]=$prompt_cmd;
-$patterns[3]=$prompt_confirm_yn;
-
-my $p_index;
-my @data;
-
-my $bt_num="";
-my $bt_name="";
-my $bt_state="";
-my $bt_locked="";
-my $exit=1;
-
-($p_index,@data) = get_match @patterns;
-
-#
-# Set errmode after first get_match. This allows for more descriptive errors
-# when handling unexpected error conditions
-#
-$t->errmode(\&rpc_error);
-
-# At this point, the username is unknown. We'll just
-# pass in an empty passwd so that we can get back to the
-# login prompt.
-#
-# FIXME
-# If this is the third login failure for this switch, an
-# additional newline will need to be made sent. This script
-# does not handle that case at this time. This will cause
-# a timeout on read and cause this to fail. Rerunning the
-# script ought to work though.
-if ($patterns[$p_index] eq $prompt_pass)
-{
- $t->print("\n");
- ($p_index,@data) = get_match @patterns;
-}
-
-# Enter user name:
-#
-# Depending how the RPC is configured, a user name may not be required.
-# We will only deal with usernames if prompted.
-#
-# If there is no user/passwd given as a parameter, but the switch
-# expects one, rather than just fail, we will first try to
-# get the switch in a known state
-my $warn_user="yes";
-my $warn_passwd="yes";
-
-$error_message = "Invalid user/password";
-
-for (my $retrys=0; $patterns[$p_index] eq $prompt_user ; $retrys++)
-{
- $warn_passwd = "yes";
- if(defined $user)
- {
- $t->print("$user\n");
- $warn_user = "no";
- }
- else
- {
- $t->print("\n");
-
- }
- ($p_index,@data) = get_match @patterns;
-
- # Enter Password:
- #
- # Users don't have to have passwords either. We will only check
- # that the user specified a password if we were prompted by the
- # RPC.
- if ($patterns[$p_index] eq $prompt_pass)
- {
- if(defined $passwd)
- {
- $t->print("$passwd\n");
- $warn_passwd = "no";
- }
- else
- {
- $t->print("\n");
- }
-
- ($p_index,@data) = get_match @patterns;
- }
-
-
- #
- # If a valid user name is given, but not a valid password, we
- # will loop forever unless we limit the number of retries
- #
- # set the user to "" so we stop entering a valid username and
- # force the login proccess to fail
- #
- if ($retrys>2)
- {
- $user = "";
- }
- elsif ($retrys>10)
- {
- die "maximum retry count exceeded\n";
- }
-}
-
-#
-# reset errmode to die()
-#
-$t->errmode("die");
-
-# all through with the login/passwd. If we see any other prompt it is an
-# error.
-if ($patterns[$p_index] ne $prompt_cmd)
-{
- $t->print("\n");
- die "bad state: '$patterns[$p_index]'";
-}
-
-if (defined $user && ($warn_user eq "yes"))
-{
- warn "warning: user parameter ignored\n";
-}
-
-if (defined $passwd && ($warn_passwd eq "yes"))
-{
- warn "warning: passwd parameter ignored\n";
-}
-
-
-
-
-# We are now logged in, no need for these patterns. We'll strip these
-# so that we don't have to keep searching for patterns that shouldn't
-# appear.
-shift @patterns;
-shift @patterns;
-
-# Get the current status of a particular outlet. Explicitly pass
-# the status command in case the RPC is not configured to report the
-# status on each command completion.
-$t->print("status\n");
-($p_index,@data) = get_match @patterns;
-($bt_num,$bt_name,$bt_state,$bt_locked) = parse_status $outlet,@data;
-
-if (!defined $bt_name )
-{
- # We have problems if there is not outlet named $outlet
- print "Outlet \'$outlet\' not found\n";
- $exit=1;
-}
-elsif ($action =~ /status/i)
-{
- print "Outlet '$bt_name' is $bt_state and is ".
- (($bt_locked eq "")?"not ":"")."Locked\n";
-
- if ($bt_state =~ /on/i)
- {
- $exit=0;
- } else {
- $exit=2;
- }
-}
-elsif ($bt_locked ne "")
-{
- # Report an error if an outlet is locked since we can't actually
- # issue commands on a Locked outlet. This will prevent false
- # successes.
- print "Outlet '$bt_name' is Locked\n";
- $exit=1;
-}
-elsif (($action =~ /on/i && $bt_state eq "On") ||
- ($action =~ /off/i && $bt_state eq "Off") )
-{
- # No need to issue the on/off command since we are already in
- # the desired state
- print "Outlet '$bt_name' is already $bt_state\n";
- $exit=0;
-}
-elsif ($action =~ /o(n|ff)/i)
-{
- # On/Off command
- $t->print("$action $bt_num\n");
- ($p_index,@data) = get_match @patterns;
-
- # Confirmation prompting maybe enabled in the switch. If it is,
- # we enter 'Y' for yes.
- if ($patterns[$p_index] eq $prompt_confirm_yn)
- {
- $t->print("y\n");
- ($p_index,@data) = get_match @patterns;
- }
-
- $t->print("status\n");
- ($p_index,@data) = get_match @patterns;
-
- ($bt_num,$bt_name,$bt_state,$bt_locked) = parse_status $outlet,@data;
-
- if ($bt_state =~ /$action/i)
- {
- print "success: outlet='$outlet' action='$action'\n";
- $exit=0;
- }
- else
- {
- print "fail: outlet='$outlet' action='$action'\n";
- $exit=1;
- }
-}
-elsif ($action =~ /reboot/i)
-{
- # Reboot command
- $t->print("$action $bt_num\n");
- ($p_index,@data) = get_match @patterns;
-
- # Confirmation prompting maybe enabled in the switch. If it is,
- # we enter 'Y' for yes.
- if ($patterns[$p_index] eq $prompt_confirm_yn)
- {
- $t->print("y\n");
- ($p_index,@data) = get_match @patterns;
- }
-
- # The reboot command is annoying. It reports that the outlet will
- # reboot in 9 seconds. Then it has a countdown timer. We first
- # look for the "Rebooting... 9" message, then we parse the remaining
- # output to verify that it reaches 0 without skipping anything.
- my $pass=0;
- foreach (@data)
- {
- chomp;
- my $line = $_;
-
- # There is a countdown timer that prints a number, then sleeps a
- # second, then prints a backspace and then another number
- #
- # /^Rebooting\.\.\. 9\b8\b7\b6\b5\b4\b3\b2\b1\b0\b$/
- if($line =~/^Rebooting\.\.\..*0[\b]$/)
- {
- $pass=1;
- last;
- }
- }
-
- if ($pass)
- {
- print "success: outlet='$outlet' action='$action'\n";
- $exit=0;
- }
- else
- {
- print "fail: outlet='$outlet' action='$action'\n";
- $exit=1;
- }
-}
-else
-{
- die "bad state";
-}
-
-# Clean up. If we don't tell it to logout, then anybody else can log onto
-# the serial port and have access to the switch without authentication (when
-# enabled)
-$t->print("logout\n");
-$t->close;
-exit $exit;
diff --git a/fence/agents/bullpap/Makefile.am b/fence/agents/bullpap/Makefile.am
deleted file mode 100644
index a602b5e..0000000
--- a/fence/agents/bullpap/Makefile.am
+++ /dev/null
@@ -1,17 +0,0 @@
-MAINTAINERCLEANFILES = Makefile.in
-
-TARGET = fence_bullpap
-
-SRC = $(TARGET).pl
-
-EXTRA_DIST = $(SRC)
-
-sbin_SCRIPTS = $(TARGET)
-
-man_MANS = $(TARGET).8
-
-include $(top_srcdir)/make/fencebuild.mk
-include $(top_srcdir)/make/fencemanperl.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/bullpap/fence_bullpap.pl b/fence/agents/bullpap/fence_bullpap.pl
deleted file mode 100644
index 3012fa2..0000000
--- a/fence/agents/bullpap/fence_bullpap.pl
+++ /dev/null
@@ -1,433 +0,0 @@
-#!/usr/bin/perl
-
-use Getopt::Std;
-use POSIX;
-
-my $ME = $0;
-
-END {
- defined fileno STDOUT or return;
- close STDOUT and return;
- warn "$ME: failed to close standard output: $!\n";
- $? ||= 1;
-}
-
-# Get the program name from $0 and strip directory names
-$_=$0;
-s/.*\///;
-my $pname = $_;
-
-$action = "reboot"; # Default fence action
-my $bulldir = "/usr/local/bull/NSMasterHW/bin";
-
-
-# WARNING!! Do not add code bewteen "#BEGIN_VERSION_GENERATION" and
-# "#END_VERSION_GENERATION" It is generated by the Makefile
-
-#BEGIN_VERSION_GENERATION
-$RELEASE_VERSION="";
-$REDHAT_COPYRIGHT="";
-$BUILD_DATE="";
-#END_VERSION_GENERATION
-
-
-sub usage
-{
- print "Usage:\n";
- print "\n";
- print "$pname [options]\n";
- print "\n";
- print "Options:\n";
- print " -a <ip> IP address or hostname of PAP console\n";
- print " -h usage\n";
- print " -l <name> Login name\n";
- print " -d <domain> Domain to operate on\n";
- print " -o <string> Action: on, off, reboot (default), status or metadata\n";
- print " -p <string> Password for login\n";
- print " -S <path> Script to run to retrieve password\n";
- print " -q quiet mode\n";
- print " -V version\n";
- print "\n";
- print "When run with no arguments, $pname takes arguments from ";
- print "standard\ninput, one line per option. They are as follows:\n";
- print "\n";
- print " ipaddr=<ip> Same as -a command line option\n";
- print " login=<name> Same as -l command line option\n";
- print " domain=<domain> Same as -d command line option\n";
- print " option=<string> Same as -o command line option\n";
- print " passwd=<string> Same as -p command line option\n";
- print " passwd_script=<path> Same as -S command line option\n\n";
-
- exit 0;
-}
-
-sub fail
-{
- ($msg) = @_;
- print $msg."\n" unless defined $quiet;
- exit 1;
-}
-
-sub fail_usage
-{
- ($msg)=@_;
- print STDERR $msg."\n" if $msg;
- print STDERR "Please use '-h' for usage.\n";
- exit 1;
-}
-
-sub version
-{
- print "$pname $RELEASE_VERSION $BUILD_DATE\n";
- print "$REDHAT_COPYRIGHT\n" if ( $REDHAT_COPYRIGHT );
-
- exit 0;
-}
-
-sub print_metadata
-{
-print '<?xml version="1.0" ?>
-<resource-agent name="fence_bullpap" shortdesc="I/O Fencing agent for Bull FAME architecture controlled by a PAP management console." >
-<longdesc>
-fence_bullpap is an I/O Fencing agent which can be used with Bull\'s NovaScale machines controlled by PAP management consoles. This agent calls Bull\'s support software provided by the NSMasterHW RPM available from Bull.
-</longdesc>
-<vendor-url>http://www.bull.com</vendor-url>
-<parameters>
- <parameter name="action" unique="1" required="1">
- <getopt mixed="-o [action]" />
- <content type="string" default="reboot" />
- <shortdesc lang="en">Fencing Action</shortdesc>
- </parameter>
- <parameter name="ipaddr" unique="1" required="1">
- <getopt mixed="-a [ip]" />
- <content type="string" />
- <shortdesc lang="en">IP Address or Hostname</shortdesc>
- </parameter>
- <parameter name="login" unique="1" required="1">
- <getopt mixed="-l [name]" />
- <content type="string" />
- <shortdesc lang="en">Login Name</shortdesc>
- </parameter>
- <parameter name="passwd" unique="1" required="0">
- <getopt mixed="-p [password]" />
- <content type="string" />
- <shortdesc lang="en">Login password or passphrase</shortdesc>
- </parameter>
- <parameter name="passwd_script" unique="1" required="0">
- <getopt mixed="-S [script]" />
- <content type="string" />
- <shortdesc lang="en">Script to retrieve password</shortdesc>
- </parameter>
- <parameter name="domain" unique="1" required="1">
- <getopt mixed="-d [domain]" />
- <content type="string" />
- <shortdesc lang="en">Domain name of the Bull machine to power-cycle</shortdesc>
- </parameter>
- <parameter name="help" unique="1" required="0">
- <getopt mixed="-h" />
- <content type="string" />
- <shortdesc lang="en">Display help and exit</shortdesc>
- </parameter>
-</parameters>
-<actions>
- <action name="on" />
- <action name="off" />
- <action name="reboot" />
- <action name="status" />
- <action name="metadata" />
-</actions>
-</resource-agent>
-';
-}
-
-sub get_options_stdin
-{
- my $opt;
- my $line = 0;
- while( defined($in = <>) )
- {
- $_ = $in;
- chomp;
-
- # strip leading and trailing whitespace
- s/^\s*//;
- s/\s*$//;
-
- # skip comments
- next if /^#/;
-
- $line+=1;
- $opt=$_;
- next unless $opt;
-
- ($name,$val)=split /\s*=\s*/, $opt;
-
- if ( $name eq "" )
- {
- print STDERR "parse error: illegal name in option $line\n";
- exit 2;
- }
-
- # DO NOTHING -- this field is used by fenced
- elsif ($name eq "agent" ) { }
-
- elsif ($name eq "ipaddr" )
- {
- $host = $val;
- }
- elsif ($name eq "login" )
- {
- $login = $val;
- }
- elsif (($name eq "option" ) || ($name eq "action"))
- {
- $action = $val;
- }
- elsif ($name eq "passwd" )
- {
- $passwd = $val;
- }
- elsif ($name eq "password" )
- {
- $passwd = $val;
- }
- elsif ($name eq "passwd_script" ) {
- $passwd_script = $val;
- }
- elsif ($name eq "domain" )
- {
- $domain = $val;
- }
- elsif ($name eq "debuglog" )
- {
- $verbose = $val;
- }
- }
-}
-
-sub get_power_state
-{
- my ($ip,$dom,$user,$pass,$junk) = @_;
- fail "missing IP address in get_power_state()" unless defined $ip;
- fail "missing domain to get_power_state()" unless defined $dom;
- fail "illegal argument to get_power_state()" if defined $junk;
-
- my $state="";
- my $cmd = $bulldir . "/pampower.pl";
-
- $cmd = $cmd . " -a status";
- $cmd = $cmd . " -M $ip -D $dom";
- if (defined $user) {
- $cmd = $cmd . " -u $user";
- }
- if (defined $pass) {
- $cmd = $cmd . " -p $pass";
- }
-
- $state=system($cmd);
- WIFEXITED($state) || die "child killed abnormally";
-
- $state=WEXITSTATUS($state);
- if ($state == 0) {
- $state = "ON";
- } elsif ($state == 1) {
- $state = "OFF";
- } else {
- $state = "$state TRANSITION";
- }
-
- $_=$state;
-}
-
-sub set_power_state
-{
- my ($ip,$dom,$set,$user,$pass,$junk) = @_;
- fail "missing action to set_power_state()" unless defined $set;
- fail "missing IP address in set_power_state()" unless defined $ip;
- fail "missing domain to set_power_state()" unless defined $dom;
- fail "illegal argument to set_power_state()" if defined $junk;
-
- my $state="";
- my $cmd = $bulldir . "/pampower.pl";
-
- if ($set =~ /on/) {
- $cmd = $cmd . " -a on";
- } else {
- $cmd = $cmd . " -a off_force";
- }
-
- $cmd = $cmd . " -M $ip -D $dom";
- if (defined $user) {
- $cmd = $cmd . " -u $user";
- }
- if (defined $pass) {
- $cmd = $cmd . " -p $pass";
- }
-
- $state=system "$cmd";
-
- $_=$state;
-}
-
-# MAIN
-
-if (@ARGV > 0)
-{
- getopts("a:hl:d:o:p:S:qv:V") || fail_usage ;
-
- usage if defined $opt_h;
- version if defined $opt_V;
-
- if ((defined $opt_o) && ($opt_o =~ /metadata/i)) {
- print_metadata();
- exit 0;
- }
-
- $host = $opt_a if defined $opt_a;
- $login = $opt_l if defined $opt_l;
- $passwd = $opt_p if defined $opt_p;
- $action = $opt_o if defined $opt_o;
- $domain = $opt_d if defined $opt_d;
- $verbose = $opt_v if defined $opt_v;
- $quiet = $opt_q if defined $opt_q;
-
- if (defined $opt_S) {
- $pwd_script_out = `$opt_S`;
- chomp($pwd_script_out);
- if ($pwd_script_out) {
- $passwd = $pwd_script_out;
- }
- }
-
- fail_usage "Unknown parameter." if (@ARGV > 0);
-
- fail_usage "No '-a' flag specified." unless defined $host;
- fail_usage "No '-d' flag specified." unless defined $domain;
- fail_usage "No '-l' flag specified." unless defined $login;
- fail_usage "No '-p' or '-S' flag specified." unless defined $passwd;
- fail_usage "Unrecognised action '$action' for '-o' flag"
- unless $action =~ /^(on|off|reboot|status)$/i;
-}
-else
-{
- get_options_stdin();
-
- if ((defined $action) && ($action =~ /metadata/i)) {
- print_metadata();
- exit 0;
- }
-
- fail "failed: no IP address" unless defined $host;
- fail "failed: no domain" unless defined $domain;
- fail "failed: no login name" unless defined $login;
- fail "failed: unrecognized action: $action"
- unless $action =~ /^(on|off|reboot|status)$/i;
-
- if (defined $passwd_script) {
- $pwd_script_out = `$passwd_script`;
- chomp($pwd_script_out);
- if ($pwd_script_out) {
- $passwd = $pwd_script_out;
- }
- }
- fail "failed: no password" unless defined $passwd;
-}
-
-stat($bulldir);
-die "NSMasterHW not installed correctly" if ! -d _;
-
-# convert $action to lower case
-$_=$action;
-if (/^on$/i) { $action = "on"; }
-elsif (/^off$/i) { $action = "off"; }
-elsif (/^reboot$/i) { $action = "reboot"; }
-elsif (/^status$/i) { $action = "status"; }
-
-#
-# If if pampower / pamreset don't exist, we're done.
-#
-# -M -- the maintenance port on the NovaScale Windows 2000 master server
-# -D -- the Domain to reboot
-# -u -- User name
-# -p -- Password
-#
-#/usr/local/bull/NSMasterHW/bin/pamreset.pl
-# -M 192.168.78.169 -D Domaine2-8CPU -u Administrator -p administrator
-#
-#/usr/local/bull/NSMasterHW/bin/pampower.pl -a off_force
-# -M 192.168.78.169 -D Domaine2-8CPU -u Administrator -p administrator
-#
-#/usr/local/bull/NSMasterHW/bin/pampower.pl -a on
-# -M 192.168.78.169 -D Domaine2-8CPU -u Administrator -p administrator
-#
-# Do the command
-#
-$success=0;
-$_ = $action;
-my $exit_code=0;
-if (/(on|off)/)
-{
- my $timeout = 120; # 120 = max of (60, 120). Max timeout for "on"
- # on 32-way bull machines
-
- set_power_state $host,$domain,$action,$login,$passwd;
- do {
- sleep 5;
- $state=get_power_state $host,$domain,$login,$passwd;
- $timeout -= 5;
- } while ($timeout > 0 && !($state =~ /^$action$/i));
-
- $success = 1 if ($state=~/^$action$/i);
-}
-elsif (/reboot/)
-{
- my $timeout = 60; # 60 seconds for "off" for 32-way bull machines
-
- set_power_state $host,$domain,"off",$login,$passwd;
- do {
- sleep 5;
- $state=get_power_state $host,$domain,$login,$passwd;
- $timeout -= 5;
- } while ($timeout > 0 && $state != 0);
-
- if ($timeout <= 0) {
- $success = 0;
- } else {
- $timeout = 120; # 120 seconds for on, for 32-way bull machines
- set_power_state $host,$domain,"on",$login,$passwd;
- do {
- sleep 5;
- $state=get_power_state $host,$domain,$login,$passwd;
- $timeout -= 5;
- } while ($timeout > 0 && $state != 0);
-
- $success = 1 if ($state == 0);
- }
-}
-elsif (/status/)
-{
- get_power_state $host,$domain,$login,$passwd;
- $state=$_;
- $success = 1 if defined $state;
- if ($state eq "OFF") {
- $exit_code = 2;
- }
-}
-else
-{
- fail "fail: illegal action";
-}
-
-if ($success)
-{
- print "success: domain $domain $action". ((defined $state) ? ": $state":"")
- ."\n" unless defined $quiet;
- exit $exit_code;
-}
-else
-{
- fail "fail: domain $domain $action";
- exit 1
-}
-
-
diff --git a/fence/agents/cpint/Makefile.am b/fence/agents/cpint/Makefile.am
deleted file mode 100644
index c9680bd..0000000
--- a/fence/agents/cpint/Makefile.am
+++ /dev/null
@@ -1,17 +0,0 @@
-MAINTAINERCLEANFILES = Makefile.in
-
-TARGET = fence_cpint
-
-SRC = $(TARGET).pl
-
-EXTRA_DIST = $(SRC)
-
-sbin_SCRIPTS = $(TARGET)
-
-man_MANS = $(TARGET).8
-
-include $(top_srcdir)/make/fencebuild.mk
-include $(top_srcdir)/make/fencemanperl.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/cpint/fence_cpint.pl b/fence/agents/cpint/fence_cpint.pl
deleted file mode 100644
index 7a7a5f5..0000000
--- a/fence/agents/cpint/fence_cpint.pl
+++ /dev/null
@@ -1,188 +0,0 @@
-#!/usr/bin/perl
-
-use Getopt::Std;
-
-my $ME = $0;
-
-END {
- defined fileno STDOUT or return;
- close STDOUT and return;
- warn "$ME: failed to close standard output: $!\n";
- $? ||= 1;
-}
-
-# Get the program name from $0 and strip directory names
-$_=$0;
-s/.*\///;
-my $pname = $_;
-
-$comm_prog = "hcp";
-
-# WARNING!! Do not add code bewteen "#BEGIN_VERSION_GENERATION" and
-# "#END_VERSION_GENERATION" It is generated by the Makefile
-
-#BEGIN_VERSION_GENERATION
-$RELEASE_VERSION="";
-$REDHAT_COPYRIGHT="";
-$BUILD_DATE="";
-#END_VERSION_GENERATION
-
-
-sub usage
-{
- print "Usage:\n";
- print "\n";
- print "$pname [options]\n";
- print "\n";
- print "Options:\n";
- print " -h usage\n";
- print " -o metadata print XML metadata for fence agent\n";
- print " -u <string> userid of the virtual machine to fence\n";
- print " -q quiet mode\n";
- print " -V Version\n";
-
- exit 0;
-}
-
-sub fail
-{
- ($msg)=@_;
- print "failed: " . $msg . "\n" unless defined $opt_q;
- exit 1;
-}
-
-sub fail_usage
-{
- ($msg)=@_q;
- print stderr $msg."\n" if $msg;
- print stderr "Please use '-h' for usage.\n";
- exit 1;
-}
-
-sub version
-{
- print "$pname $RELEASE_VERSION $BUILD_DATE\n";
- print "$REDHAT_COPYRIGHT\n" if ( $REDHAT_COPYRIGHT );
-
- exit 0;
-}
-
-sub print_metadata
-{
-print '<?xml version="1.0" ?>
-<resource-agent name="fence_cpint" shortdesc="I/O Fencing agent for GFS on s390 and zSeries VM clusters" >
-<longdesc>
-fence_cpint is an I/O Fencing agent used on a virtual machine running GFS in a s390 or zSeries VM cluster. It uses the cpint package to send a CP LOGOFF command to the specified virtual machine. For fence_cpint to execute correctly, you must have the cpint module installed, and hcp in your PATH.
-
-NOTE: for fence_cpint to send a command to another virtual machine, the machine executing it must either be a privilege class C user or it must be the secondary user of the virtual machine to be fenced. This means that unless all of you GULM server nodes are privilege class C, fence_cpint can only be used with SLM.
-</longdesc>
-<vendor-url>http://www.ibm.com</vendor-url>
-<parameters>
- <parameter name="userid" unique="1" required="1">
- <getopt mixed="-u [userid]" />
- <content type="string" />
- <shortdesc lang="en">Userid of the virtual machine to fence</shortdesc>
- </parameter>
- <parameter name="help" unique="1" required="0">
- <getopt mixed="-h" />
- <content type="string" />
- <shortdesc lang="en">Display help and exit</shortdesc>
- </parameter>
-</parameters>
-<actions>
- <action name="metadata" />
-</actions>
-</resource-agent>
-';
-}
-
-sub get_options_stdin
-{
- my $opt;
- my $line = 0;
- while( defined($in = <>) )
- {
- $_ = $in;
- chomp;
-
- # strip leading and trailing whitespace
- s/^\s*//;
- s/\s*$//;
-
- # skip comments
- next if /^#/;
-
- $line+=1;
- $opt=$_;
- next unless $opt;
-
- ($name,$val)=split /\s*=\s*/, $opt;
-
- if ( $name eq "" )
- {
- print stderr "parse error: illegal name in option $line\n";
- exit 2;
- }
-
- # DO NOTHING -- this field is used by fenced or stomithd
- elsif ($name eq "agent" ) { }
-
- # FIXME -- depricated. use "userid" and "password" instead.
- elsif ($name eq "fm" )
- {
- (my $dummy,$opt_u,$opt_p) = split /\s+/,$val;
- print STDERR "Depricated \"fm\" entry detected. refer to man page.\n";
- }
-
- # FIXME -- depreicated residue of old fencing system
- elsif ($name eq "name" ) { }
-
- elsif ($name eq "userid" )
- {
- $opt_u = $val;
- }
-
- elsif ($name eq "action" )
- {
- $opt_o = $val;
- }
-
- else
- {
- print stderr "parse error: unknown option \"$opt\"\n";
- #> exit 2;
- }
- }
-}
-
-if (@ARGV > 0){
- getopts("hqu:Vo:") || fail_usage;
- usage if defined $opt_h;
- version if defined $opt_V;
-
- fail_usage "Unkown parameter." if (@ARGV > 0);
-
- if ((defined $opt_o) && ($opt_o =~ /metadata/i)) {
- print_metadata();
- exit 0;
- }
-
- fail_usage "No '-u' flag specified." unless defined $opt_u;
-} else {
- get_options_stdin();
-
- if ((defined $opt_o) && ($opt_o =~ /metadata/i)) {
- print_metadata();
- exit 0;
- }
-
- fail "no userid" unless defined $opt_u;
-}
-
-$ret_val = system("$comm_prog send cp $opt_u logoff > /dev/null 2>&1") >> 8;
-fail "$comm_prog failed ($ret_val)" unless ($ret_val == 0 || $ret_val == 45);
-$ret_val = system("$comm_prog send cp $opt_u > /dev/null 2>&1") >> 8;
-fail "$userid isn't logged off. $comm_prog return ($ret_val)" unless ($ret_val == 45);
-
-print "success: booted userid $opt_u\n" unless defined $opt_q;
-exit 0;
diff --git a/fence/agents/egenera/Makefile.am b/fence/agents/egenera/Makefile.am
deleted file mode 100644
index c69f805..0000000
--- a/fence/agents/egenera/Makefile.am
+++ /dev/null
@@ -1,17 +0,0 @@
-MAINTAINERCLEANFILES = Makefile.in
-
-TARGET = fence_egenera
-
-SRC = $(TARGET).pl
-
-EXTRA_DIST = $(SRC)
-
-sbin_SCRIPTS = $(TARGET)
-
-man_MANS = $(TARGET).8
-
-include $(top_srcdir)/make/fencebuild.mk
-include $(top_srcdir)/make/fencemanperl.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/egenera/fence_egenera.pl b/fence/agents/egenera/fence_egenera.pl
deleted file mode 100644
index 2ea4d0c..0000000
--- a/fence/agents/egenera/fence_egenera.pl
+++ /dev/null
@@ -1,501 +0,0 @@
-#!/usr/bin/perl
-
-use Getopt::Std;
-use IPC::Open3;
-
-my $ME = $0;
-
-END {
- defined fileno STDOUT or return;
- close STDOUT and return;
- warn "$ME: failed to close standard output: $!\n";
- $? ||= 1;
-}
-
-# WARNING!! Do not add code bewteen "#BEGIN_VERSION_GENERATION" and
-# "#END_VERSION_GENERATION" It is generated by the Makefile
-
-#BEGIN_VERSION_GENERATION
-$RELEASE_VERSION="";
-$REDHAT_COPYRIGHT="";
-$BUILD_DATE="";
-#END_VERSION_GENERATION
-
-# Get the program name from $0 and strip directory names
-$_=$0;
-$|=1;
-s/.*\///;
-my $pname = $_;
-
-$esh="/opt/panmgr/bin/esh";
-
-sub usage
-{
- print "Usage:\n";
- print "\n";
- print "$pname [options]\n";
- print "\n";
- print "Options:\n";
- print " -c <string> cserver\n";
- print " -h help\n";
- print " -l <string> lpan\n";
- print " -o <string> Action: reboot (default), off, on or status\n";
- print " -p <string> pserver\n";
- print " -u <string> username (default=root)\n";
- print " -f <seconds> Wait X seconds before fencing is started\n";
- print " -q quiet mode\n";
- print " -V version\n";
-
- exit 0;
-}
-
-sub fail
-{
- ($msg)=@_;
- print $msg."\n" unless defined $opt_q;
- $t->close if defined $t;
- exit 1;
-}
-
-sub fail_usage
-{
- ($msg)=@_;
- print STDERR $msg."\n" if $msg;
- print STDERR "Please use '-h' for usage.\n";
- exit 1;
-}
-
-
-sub version
-{
- print "$pname $RELEASE_VERSION $BUILD_DATE\n";
- print "$REDHAT_COPYRIGHT\n" if ( $REDHAT_COPYRIGHT );
-
- exit 0;
-}
-
-sub print_metadata
-{
-print '<?xml version="1.0" ?>
-<resource-agent name="fence_egenera" shortdesc="I/O Fencing agent for the Egenera BladeFrame" >
-<longdesc>
-fence_egenera is an I/O Fencing agent which can be used with the Egenera BladeFrame. It logs into a control blade (cserver) via ssh and operates on a process ing blade (pserver) identified by the pserver name and the logical process area network (LPAN) that it is in. fence_egenera requires that ssh keys have been setup so that the fence_egenera does not require a password to authenticate. Refer to ssh(8) for more information on setting up ssh keys.
-</longdesc>
-<vendor-url>http://www.bull.com</vendor-url>
-<parameters>
- <parameter name="action" unique="0" required="1">
- <getopt mixed="-o [action]" />
- <content type="string" default="reboot" />
- <shortdesc lang="en">Fencing Action</shortdesc>
- </parameter>
- <parameter name="cserver" unique="0" required="1">
- <getopt mixed="-c [cserver]" />
- <content type="string" />
- <shortdesc lang="en">The cserver to ssh to. cserver can be in the form user@hostname to specify a different user to login as.</shortdesc>
- </parameter>
- <parameter name="pserver" unique="0" required="1">
- <getopt mixed="-p [pserver]" />
- <content type="string" />
- <shortdesc lang="en">The pserver to operate on.</shortdesc>
- </parameter>
- <parameter name="user" unique="0" required="1">
- <getopt mixed="-u [name]" />
- <content type="string" default="root" />
- <shortdesc lang="en">Login Name</shortdesc>
- </parameter>
- <parameter name="lpan" unique="0" required="1">
- <getopt mixed="-l [lpan]" />
- <content type="string" />
- <shortdesc lang="en">The lpan to operate on.</shortdesc>
- </parameter>
- <parameter name="delay" unique="0" required="0">
- <getopt mixed="-f [seconds]" />
- <content type="string" default="0"/>
- <shortdesc lang="en">Wait X seconds before fencing is started</shortdesc>
- </parameter>
- <parameter name="help" unique="0" required="0">
- <getopt mixed="-h" />
- <content type="string" />
- <shortdesc lang="en">Display help and exit</shortdesc>
- </parameter>
-</parameters>
-<actions>
- <action name="on" />
- <action name="off" />
- <action name="reboot" />
- <action name="status" />
- <action name="metadata" />
-</actions>
-</resource-agent>
-';
-}
-
-if (@ARGV > 0)
-{
- getopts("c:hl:o:p:u:qVf:") || fail_usage ;
-
- usage if defined $opt_h;
- version if defined $opt_V;
-
- fail_usage "Unkown parameter." if (@ARGV > 0);
-
-
- $cserv = $opt_c if defined $opt_c;
- $lpan = $opt_l if defined $opt_l;
- $pserv = $opt_p if defined $opt_p;
- $action = $opt_o if defined $opt_o;
- $user = $opt_u if defined $opt_u;
- $delay = $opt_f if defined $opt_f;
-}
-else
-{
- get_options_stdin();
-}
-
-if (((defined $opt_o) && ($opt_o =~ /metadata/i)) || ((defined $action) && ($action =~ /metadata/i))) {
- print_metadata();
- exit 0;
-}
-
-$action = "reboot" unless defined $action;
-$user = "root" unless defined $user;
-
-fail "failed: no cserver defined" unless defined $cserv;
-fail "failed: no lpan defined" unless defined $lpan;
-fail "failed: no pserver defined" unless defined $pserv;
-
-fail "failed: unrecognised action: $action"
- unless $action =~ /^(off|on|reboot|status|pblade)$/i;
-
-sub get_options_stdin
-{
- my $opt;
- my $line = 0;
- while( defined($in = <>) )
- {
- $_ = $in;
- chomp;
-
- # strip leading and trailing whitespace
- s/^\s*//;
- s/\s*$//;
-
- # skip comments
- next if /^#/;
-
- $line+=1;
- $opt=$_;
- next unless $opt;
-
- ($name,$val)=split /\s*=\s*/, $opt;
-
- if ( $name eq "" )
- {
- print STDERR "parse error: illegal name in option $line\n";
- exit 2;
- }
-
- elsif ($name eq "agent" )
- {
- # DO NOTHING -- this field is used by fenced
- }
-
- elsif ($name eq "cserver" )
- {
- $cserv = $val;
- }
-
- elsif ($name eq "lpan" )
- {
- $lpan = $val;
- }
-
- elsif ($name eq "pserver" )
- {
- $pserv = $val;
- }
-
- elsif ($name eq "action" )
- {
- $action = $val;
- }
-
- elsif ($name eq "esh" )
- {
- $esh = $val;
- }
- elsif ($name eq "user" )
- {
- $user = $val;
- }
- elsif ($name eq "delay" )
- {
- $delay = $val;
- }
- }
-}
-
-# _pserver_query_field -- query the state of the pBlade or Status field
-# and return it's value in $_.
-# Return 0 on success, or non-zero on error
-sub _pserver_query_field
-{
- my ($field,$junk) = @_;
-
- if ($field ne "pBlade" && $field ne "Status")
- {
- $_="Error _pserver_query_field: unknown field of type '$field'";
- return 1;
- }
-
- my $val;
-
- my $cmd = "ssh -l $user $cserv $esh pserver $lpan/$pserv";
- my $pid = open3 (\*WTR, \*RDR,\*RDR, $cmd)
- or die "error open3(): $!";
-
- while(<RDR>)
- {
- chomp;
- my $line = $_;
- my @fields = split /\s+/,$line;
-
- if ($fields[0] eq "Error:")
- {
- $val=$line;
- print "Debug ERROR: $val\n";
- last;
- }
- elsif ($fields[0] eq $pserv)
- {
- if ( $field eq "Status" )
- {
- $val=$fields[1];
- }
- elsif ($field eq "pBlade" )
- {
- # grrr... Status can be "Shutting down"
- if ($fields[1] ne "Shutting")
- {
- $val=$fields[3];
- }
- else
- {
- $val=$fields[4];
- }
- }
- }
- }
-
- close WTR;
- close RDR;
-
- waitpid $pid,0;
- my $rtrn = $?>>8;
- $_=$val if defined $val;
- return $rtrn;
-}
-
-# return the pBlade of an lpan/pserver in $_.
-# Return 0 on success or non=zero on error
-sub pserver_pblade
-{
- _pserver_query_field "pBlade";
-}
-
-# return the Status of an lpan/pserver in $_.
-# Return 0 on success or non=zero on error
-sub pserver_status
-{
- _pserver_query_field "Status";
-}
-
-# boot an lpan/pserver.
-# Return 0 if the status is "Booted" or "Booting" or non-zero on failure.
-# Continue checking the value until the status is "Boot" or "Booting" or
-# until a timeout of 120 seconds has been reached.
-sub pserver_boot
-{
- my $rtrn=1;
-
- # It seems it can take a while for a pBlade to
- # boot sometimes. We shall wait for 120 seconds
- # before giving up on a node returning failure
- for (my $trys=0; $trys<120; $trys++)
- {
- last if (pserver_status != 0);
-
- my $status = $_;
- if ( $status eq "Booted" || $status eq "Booting")
- {
- $rtrn=0;
- last;
- }
-
- if(pserver_pblade)
- {
- die "error getting pBlade info";
- }
-
- # Is there any harm in sending this command multiple times?
- my $cmd = "ssh -l $user $cserv $esh pserver -b $lpan/$pserv";
- my $pid = open3 (\*WTR, \*RDR,\*RDR, $cmd)
- or die "error open3(): $!";
-
- close WTR;
- close RDR;
-
- waitpid $pid,0;
- $rtrn = $?>>8;
-
- sleep 1;
- }
- return $rtrn;
-}
-
-# boot an lpan/pserver.
-# Return 0 if the status is "Shutdown" or non-zero on failure.
-# Continue checking the value until the status is "Shutdown" or
-# until a timeout of 20 seconds has been reached.
-sub pserver_shutdown
-{
- my $rtrn=1;
- local *egen_log;
- open(egen_log,">>/@LOGDIR(a)/fence_egenera.log");
- print egen_log "Attempting shutdown at ".`date`."\n";
- for (my $trys=0; $trys<20; $trys++)
- {
- last if (pserver_status != 0);
-
-
- my $status = $_;
- print egen_log "shutdown: $trys $status\n";
- if (/^Shutdown/)
- {
- $rtrn=0;
- last;
- }
- elsif (/^Shutting/)
- {
- # We are already in the process of shutting down.
- # do I need to do anything here?
- # We'll just wait for now
- }
- elsif (/^Booting/)
- {
- # Server is already on the way back up. Do nothing
- $rtrn=0;
- last;
- }
- elsif (/^Booted\(KDB\)/ || /^Debugging/ )
- {
- print egen_log "shutdown: crash dump being performed. Waiting\n";
- $rtrn=0;
- last;
- }
- else
- {
- if (pserver_pblade)
- {
- die "error getting pBlade info: $_";
- }
-
- # is there any harm in sending this command multiple
- # times?
- my $cmd = "ssh -l $user $cserv $esh blade -s $_";
- print egen_log "shutdown: $cmd being called, before open3\n";
- my $pid = open3 (\*WTR, \*RDR,\*RDR, $cmd)
- or die "error open3(): $!";
- print egen_log "shutdown: after calling open3\n";
- @outlines = <RDR>;
- print egen_log "shutdown: Open3 result: ", @outlines, "\n";
-
- close WTR;
- close RDR;
-
- waitpid $pid,0;
- $rtrn = $?>>8;
- }
-
- sleep 1;
- }
- print egen_log "shutdown: Returning from pserver_shutdown with return code $rtrn\n";
- return $rtrn;
-}
-
-
-$_=$action;
-if (/^status$/i)
-{
- if (pserver_status==0)
- {
- print "$lpan/$pserv is $_\n" unless defined $opt_q;
- exit 0;
- }
- else
- {
- fail "failed to get status of $lpan/$pserv: $_";
- }
-}
-elsif (/^pblade$/i)
-{
- if (pserver_pblade==0)
- {
- print "$lpan/$pserv is $_\n" unless defined $opt_q;
- exit 0;
- }
- else
- {
- fail "failed to get pblade of $lpan/$pserv: $_";
- }
-}
-elsif (/^off$/i)
-{
- sleep ($delay) if defined($delay);
- if (pserver_shutdown==0)
- {
- print "success: $lpan/$pserv has been shutdown\n"
- unless defined $opt_q;
- exit 0;
- }
- else
- {
- fail "failed to shutdown $lpan/$pserv";
- }
-}
-elsif (/^on$/i)
-{
- if (pserver_boot==0)
- {
- print "success: $lpan/$pserv has been turned on\n"
- unless defined $opt_q;
- exit 0;
- }
- else
- {
- fail "failed to turn on $lpan/$pserv";
- }
-}
-elsif (/^reboot$/i)
-{
- sleep ($delay) if defined($delay);
- if (pserver_shutdown!=0)
- {
- fail "failed to shutdown $lpan/$pserv";
- }
-
- if (pserver_boot==0)
- {
- print "success: $lpan/$pserv has been rebooted\n"
- unless defined $opt_q;
- exit 0;
- }
- else
- {
- fail "failed to turn on $lpan/$pserv";
- }
-}
-else
-{
- die "unknown action: $action";
-}
diff --git a/fence/agents/mcdata/Makefile.am b/fence/agents/mcdata/Makefile.am
deleted file mode 100644
index 54b64fc..0000000
--- a/fence/agents/mcdata/Makefile.am
+++ /dev/null
@@ -1,17 +0,0 @@
-MAINTAINERCLEANFILES = Makefile.in
-
-TARGET = fence_mcdata
-
-SRC = $(TARGET).pl
-
-EXTRA_DIST = $(SRC)
-
-sbin_SCRIPTS = $(TARGET)
-
-man_MANS = $(TARGET).8
-
-include $(top_srcdir)/make/fencebuild.mk
-include $(top_srcdir)/make/fencemanperl.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/mcdata/fence_mcdata.pl b/fence/agents/mcdata/fence_mcdata.pl
deleted file mode 100644
index 3148a99..0000000
--- a/fence/agents/mcdata/fence_mcdata.pl
+++ /dev/null
@@ -1,361 +0,0 @@
-#!/usr/bin/perl
-
-# This works on the following firmware versions:
-# 01.03.00
-# 02.00.00
-# 04.01.00
-# 04.01.02
-
-use Getopt::Std;
-use Net::Telnet ();
-
-my $ME = $0;
-
-END {
- defined fileno STDOUT or return;
- close STDOUT and return;
- warn "$ME: failed to close standard output: $!\n";
- $? ||= 1;
-}
-
-# Get the program name from $0 and strip directory names
-$_=$0;
-s/.*\///;
-my $pname = $_;
-
-$opt_o = 'disable'; # Default fence action
-
-# WARNING!! Do not add code bewteen "#BEGIN_VERSION_GENERATION" and
-# "#END_VERSION_GENERATION" It is generated by the Makefile
-
-#BEGIN_VERSION_GENERATION
-$RELEASE_VERSION="";
-$REDHAT_COPYRIGHT="";
-$BUILD_DATE="";
-#END_VERSION_GENERATION
-
-
-sub usage
-{
- print "Usage:\n";
- print "\n";
- print "$pname [options]\n";
- print "\n";
- print "Options:\n";
- print " -a <ip> IP address or hostname of switch\n";
- print " -h usage\n";
- print " -l <name> Login name\n";
- print " -n <num> Port number to disable\n";
- print " -o <string> Action: disable (default), enable or metadata\n";
- print " -p <string> Password for login\n";
- print " -S <path> Script to run to retrieve login password\n";
- print " -q quiet mode\n";
- print " -V version\n";
-
- exit 0;
-}
-
-sub fail
-{
- ($msg) = @_;
- print $msg."\n" unless defined $opt_q;
- $t->close if defined $t;
- exit 1;
-}
-
-sub fail_usage
-{
- ($msg)=@_;
- print STDERR $msg."\n" if $msg;
- print STDERR "Please use '-h' for usage.\n";
- exit 1;
-}
-
-sub version
-{
- print "$pname $RELEASE_VERSION $BUILD_DATE\n";
- print "$REDHAT_COPYRIGHT\n" if ( $REDHAT_COPYRIGHT );
-
- exit 0;
-}
-
-sub print_metadata
-{
-print '<?xml version="1.0" ?>
-<resource-agent name="fence_mcdata" shortdesc="I/O Fencing agent for McData FC switches" >
-<longdesc>
-fence_mcdata is an I/O Fencing agent which can be used with McData FC switches. It logs into a McData switch via telnet and disables a specified port. Disabling the port which a machine is connected to effectively fences that machine. Lengthy telnet connections to the switch should be avoided while a GFS cluster is running because the connection will block any necessary fencing actions.
-
-After a fence operation has taken place the fenced machine can no longer connect to the McData FC switch. When the fenced machine is ready to be brought back into the GFS cluster (after reboot) the port on the McData FC switch needs to be enabled. This can be done by running fence_mcdata and specifying the enable action.
-</longdesc>
-<vendor-url>http://www.brocade.com</vendor-url>
-<parameters>
- <parameter name="action" unique="1" required="1">
- <getopt mixed="-o [action]" />
- <content type="string" default="disable" />
- <shortdesc lang="en">Fencing Action</shortdesc>
- </parameter>
- <parameter name="ipaddr" unique="1" required="1">
- <getopt mixed="-a [ip]" />
- <content type="string" />
- <shortdesc lang="en">IP Address or Hostname</shortdesc>
- </parameter>
- <parameter name="login" unique="1" required="1">
- <getopt mixed="-l [name]" />
- <content type="string" />
- <shortdesc lang="en">Login Name</shortdesc>
- </parameter>
- <parameter name="passwd" unique="1" required="0">
- <getopt mixed="-p [password]" />
- <content type="string" />
- <shortdesc lang="en">Login password or passphrase</shortdesc>
- </parameter>
- <parameter name="passwd_script" unique="1" required="0">
- <getopt mixed="-S [script]" />
- <content type="string" />
- <shortdesc lang="en">Script to retrieve password</shortdesc>
- </parameter>
- <parameter name="port" unique="1" required="1">
- <getopt mixed="-n [id]" />
- <content type="string" />
- <shortdesc lang="en">Physical plug number or name of virtual machine</shortdesc>
- </parameter>
- <parameter name="help" unique="1" required="0">
- <getopt mixed="-h" />
- <content type="string" />
- <shortdesc lang="en">Display help and exit</shortdesc>
- </parameter>
-</parameters>
-<actions>
- <action name="enable" />
- <action name="disable" />
- <action name="status" />
- <action name="metadata" />
-</actions>
-</resource-agent>
-';
-}
-
-
-sub get_options_stdin
-{
- my $opt;
- my $line = 0;
- while( defined($in = <>) )
- {
- $_ = $in;
- chomp;
-
- # strip leading and trailing whitespace
- s/^\s*//;
- s/\s*$//;
-
- # skip comments
- next if /^#/;
-
- $line+=1;
- $opt=$_;
- next unless $opt;
-
- ($name,$val)=split /\s*=\s*/, $opt;
-
- if ( $name eq "" )
- {
- print STDERR "parse error: illegal name in option $line\n";
- exit 2;
- }
-
- # DO NOTHING -- this field is used by fenced
- elsif ($name eq "agent" ) { }
-
- elsif ($name eq "ipaddr" )
- {
- $opt_a = $val;
- }
- elsif ($name eq "login" )
- {
- $opt_l = $val;
- }
- elsif (($name eq "option" ) || ($name eq "action"))
- {
- $opt_o = $val;
- }
- elsif ($name eq "passwd" )
- {
- $opt_p = $val;
- }
- elsif ($name eq "passwd_script" )
- {
- $opt_S = $val;
- }
- elsif ($name eq "port" )
- {
- $opt_n = $val;
- }
- }
-}
-
-sub telnet_error
-{
- fail "failed: telnet returned: ".$t->errmsg;
-}
-
-######################################################################33
-# MAIN
-
-if (@ARGV > 0) {
- getopts("a:hl:n:o:p:S:qV") || fail_usage ;
-
- usage if defined $opt_h;
- version if defined $opt_V;
-
- fail_usage "Unknown parameter." if (@ARGV > 0);
-
- if ((defined $opt_o) && ($opt_o =~ /metadata/i)) {
- print_metadata();
- exit 0;
- }
-
- fail_usage "No '-a' flag specified." unless defined $opt_a;
- fail_usage "No '-n' flag specified." unless defined $opt_n;
- fail_usage "No '-l' flag specified." unless defined $opt_l;
-
- if (defined $opt_S) {
- $pwd_script_out = `$opt_S`;
- chomp($pwd_script_out);
- if ($pwd_script_out) {
- $opt_p = $pwd_script_out;
- }
- }
-
- fail_usage "No '-p' or '-S' flag specified." unless defined $opt_p;
- fail_usage "Unrecognised action '$opt_o' for '-o' flag"
- unless $opt_o =~ /^(disable|enable)$/i;
-
-} else {
- get_options_stdin();
-
- if ((defined $opt_o) && ($opt_o =~ /metadata/i)) {
- print_metadata();
- exit 0;
- }
-
- fail "failed: no IP address" unless defined $opt_a;
- fail "failed: no plug number" unless defined $opt_n;
- fail "failed: no login name" unless defined $opt_l;
-
- if (defined $opt_S) {
- $pwd_script_out = `$opt_S`;
- chomp($pwd_script_out);
- if ($pwd_script_out) {
- $opt_p = $pwd_script_out;
- }
- }
-
- fail "failed: no password" unless defined $opt_p;
- fail "failed: unrecognised action: $opt_o"
- unless $opt_o =~ /^(disable|enable)$/i;
-}
-
-
-my $block=1;
-$_=$opt_o;
-if(/disable/)
-{
- $block=1
-}
-elsif(/enable/)
-{
- $block=0
-}
-else
-{
- fail "failed: unrecognised action: $opt_o"
-}
-
-#
-# Set up and log in
-#
-
-$t = new Net::Telnet;
-
-$t->errmode(\&telnet_error);
-$t->open($opt_a);
-
-$t->waitfor('/sername:/');
-
-# Send Username
-$t->print($opt_l);
-
-# Send Password
-$t->waitfor('/assword:/');
-$t->print($opt_p);
-$t->waitfor('/\>/');
-
-#> # Set switch to comma delimited output
-#> $t->print("commadelim 1");
-#> $t->waitfor('/\>/');
-
-# Block/Unblock the desired port
-$t->print("config port blocked $opt_n $block");
-($text, $match) = $t->waitfor('/\>/');
-
-# Verfiy that the port has been blocked/unblocked
-$t->print("config port show $opt_n");
-($text, $match) = $t->waitfor('/\>/');
-
-# scan the port configurations to make sure that
-# the port is in the state we told it to be in
-#
-# Output from the prvious command will look like:
-#
-# Root> config port show 0
-#
-# Port Information
-# Port Number: 0
-# Name: name
-# Blocked: true
-# Extended Distance: false
-# Type: gPort
-#
-my $fail=1;
-
-@lines = split /\n/,$text;
-foreach my $line (@lines)
-{
- my $field = "";
- my $b_state = "";
-
- if ( $line =~ /^(.*):\s*(\S*)/ )
- {
- $field = $1;
- $b_state = $2;
- }
- next unless ( $field eq "Blocked" );
- if ( ($block && $b_state eq "true") ||
- (!$block && $b_state eq "false") ||
- ($block && $b_state eq "Blocked") ||
- (!$block && $b_state eq "Unblocked") )
- {
- $fail = 0;
- }
- last;
-}
-
-# log out of the switch
-$t->print("logout");
-$t->close();
-
-if($fail)
-{
- print "failed: unexpected port state\n" unless $opt_q;
-}
-else
-{
- print "success: port $opt_n ".($block?"disabled":"enabled")."\n"
- unless defined $opt_q;
-}
-
-exit $fail;
-
-
diff --git a/fence/agents/rackswitch/Makefile.am b/fence/agents/rackswitch/Makefile.am
deleted file mode 100644
index 0792308..0000000
--- a/fence/agents/rackswitch/Makefile.am
+++ /dev/null
@@ -1,17 +0,0 @@
-MAINTAINERCLEANFILES = Makefile.in
-
-TARGET = fence_rackswitch
-
-sbin_PROGRAMS = $(TARGET)
-
-noinst_HEADERS = do_rack.h
-
-fence_rackswitch_SOURCES = do_rack.c
-
-man_MANS = $(TARGET).8
-
-include $(top_srcdir)/make/fencemanc.mk
-include $(top_srcdir)/make/agentccheck.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/rackswitch/do_rack.c b/fence/agents/rackswitch/do_rack.c
deleted file mode 100644
index ee29153..0000000
--- a/fence/agents/rackswitch/do_rack.c
+++ /dev/null
@@ -1,807 +0,0 @@
-#include "clusterautoconfig.h"
-
-#include "do_rack.h"
-
-const char *pname = "fence_rack";
-
-int quiet_flag = 0;
-int verbose_flag = 0;
-int debug_flag = 0;
-
-char ipaddr[256];
-char portnumber[256];
-char username[256];
-char password[256];
-char arg[256];
-char name[256];
-char pwd_script[PATH_MAX] = { 0, };
-
-char readbuf[MAXBUF];
-char writebuf[MAXBUF];
-int sock;
-
-char op_login = 0x7e; /* 126*/
-char op_action = 0x66; /* 102 */
-char ack_login = 0x7D; /* 125 */
-
-char action_idle = 0x00;
-char action_reset = 0x01;
-char action_off = 0x02;
-char action_offon = 0x03;
-
-char configuration_request = 0x5b; /* 91 */
-char config_reply = 0x5c; /* 92 */
-char config_general = 0x01;
-char config_section1 = 0x02;
-char config_section2 = 0x03;
-char config_section3 = 0x04;
-
-char message_status = 0x65; /* 101 */
-
-char login_deny = 0xFF;
-
-int time_out = 60;
-
-void ignore_message_status(void);
-int wait_frame(char);
-
-/*
- * scan input, waiting for a given frame
- */
-int wait_frame(char frame_id)
-{
- int read_more = 1;
- int success = 0;
- int n;
- char target = frame_id;
-
- if(debug_flag){printf("%s: Looking for frametype 0x%.2x\n",name,target);}
- read_more = 1;
- while(read_more){
- n = read(sock,readbuf,1);
- if(debug_flag){printf("%s: Found frametype 0x%.2x\n",name,readbuf[0]);}
- if(readbuf[0] == target){
- read_more = 0;
- success = 1;
- }
- else{
- if(readbuf[0] == message_status){
- ignore_message_status();
- read_more = 1;
- }
- else{
- if(debug_flag){printf("%s: Got unexpected frame from switch\n",name);}
- read_more = 0;
- success = 0;
- }
- }
- }
- return(success);
-}
-
-void ignore_message_status(void)
-{
- int n,i;
- int read_more = 1;
- int number_of_temp;
- int number_of_config_mobo;
-
- if(debug_flag){printf("%s: Ignoring message-status\n",name);}
- read_more=1;
- while(read_more){
- n = read(sock,readbuf,1); /* status */
- if(n == 1)
- read_more = 0;
- }
-
- read_more = 1;
- while(read_more){ /* Date & time */
- n = read(sock,readbuf,1);
- if(readbuf[0] == '\0'){
- read_more = 0;
- }
- else{
- read_more = 1;
- }
- }
-
- read_more = 1;
- number_of_temp = 0;
- n = read(sock,readbuf,1); /* Temprature Input count */
- number_of_temp = (int)readbuf[0];
-
- for(i=0;i<number_of_temp;i++){
- read_more = 1;
- while(read_more){
- n = read(sock,readbuf,1); /* Temprature input ID */
- n = read(sock,readbuf,8); /* Temprature Value, Fahrenheit */
- n = read(sock,readbuf,8); /* Temprature Vaule, Celcius */
- n = read(sock,readbuf,1); /* Temprature Alarm */
- }
- }
- number_of_config_mobo = 0;
- for(i=4;i>0;i--){
- read_more = 1;
- while(read_more){
- n=read(sock,readbuf,1);
- if(n == 1){
- read_more = 0;
- number_of_config_mobo = number_of_config_mobo + (int)(readbuf[0]<<(8*(i-1)));
- }
- }
- }
- for(i=0;i<number_of_config_mobo;i++){
- n = read(sock,readbuf,4); /* Motherboard ID */
- n = read(sock,readbuf,1); /* Motherboard status */
- }
-}
-
-
-
-static void print_usage(void)
-{
- printf("Usage:\n");
- printf("\n");
- printf("%s [options]\n"
- "\n"
- "Options:\n"
- " -h usage\n"
- " -a <ip> IP address for RackSwitch\n"
- " -n <dec num> Physical plug number on RackSwitch\n"
- " -l <string> Username\n"
- " -p <string> Password\n"
- " -S <path> Script to retrieve password\n"
- " -v Verbose\n"
- " -q Quiet\n"
- " -V Version information\n", pname);
-}
-
-
-
-static void print_metadata(void)
-{
- printf("<?xml version=\"1.0\" ?>\n"
- "<resource-agent name=\"fence_rackswitch\" shortdesc=\"fence_rackswitch - I/O Fencing agent for RackSaver RackSwitch\" >\n"
- "<longdesc>fence_rackswitch is an I/O Fencing agent which can be used with the RackSaver RackSwitch. It logs into the RackSwitch and boots a specified plug. Using the http interface to the RackSwitch should be avoided while a GFS cluster is running because the connection may interfere with the operation of this agent.</longdesc>\n"
- "<vendor-url>http://www.bladenetwork.net</vendor-url>\n"
- "<parameters>\n"
- "<parameter name=\"ipaddr\" unique=\"1\" required=\"1\">\n"
- "\t<getopt mixed=\"-a [ip]\" />\n"
- "\t<content type=\"string\" />\n"
- "\t<shortdesc lang=\"en\">IP Address or Hostname</shortdesc>\n"
- "</parameter>\n"
- "<parameter name=\"login\" unique=\"1\" required=\"1\">\n"
- "\t<getopt mixed=\"-l [name]\" />\n"
- "\t<content type=\"string\" />\n"
- "\t<shortdesc lang=\"en\">Login Name</shortdesc>\n"
- "</parameter>\n"
- "<parameter name=\"passwd\" unique=\"1\" required=\"0\">\n"
- "\t<getopt mixed=\"-p [password]\" />\n"
- "\t<content type=\"string\" />\n"
- "\t<shortdesc lang=\"en\">Login password or passphrase</shortdesc>\n"
- "</parameter>\n"
- "<parameter name=\"passwd_script\" unique=\"1\" required=\"0\">\n"
- "\t<getopt mixed=\"-S [script]\" />\n"
- "\t<content type=\"string\" />\n"
- "\t<shortdesc lang=\"en\">Script to retrieve password</shortdesc>\n"
- "</parameter>\n"
- "</parameters>\n"
- "<actions>\n"
- "\t<action name=\"metadata\" />\n"
- "</actions>\n"
- "</resource-agent>\n");
-}
-
-static void get_options(int argc, char **argv)
-{
- int c;
- char *value;
-
- if (argc > 1){
- /*
- * Command line input
- */
- while ((c = getopt(argc, argv, "ha:n:l:p:S:vqVdo:")) != -1)
- {
- switch(c)
- {
- case 'h':
- print_usage();
- exit(DID_SUCCESS);
-
- case 'a':
- strncpy(ipaddr,optarg,254);
- break;
-
- case 'n':
- strncpy(portnumber,optarg,254);
- break;
-
- case 'l':
- strncpy(username,optarg,254);
- break;
-
- case 'p':
- strncpy(password,optarg,254);
- break;
-
- case 'S':
- strncpy(pwd_script, optarg, sizeof(pwd_script));
- pwd_script[sizeof(pwd_script) - 1] = '\0';
- break;
-
- case 'v':
- verbose_flag = 1;
- break;
-
- case 'q':
- quiet_flag = 1;
- break;
-
- case 'd':
- debug_flag = 1;
- break;
-
- case 'V':
- printf("%s %s (built %s %s)\n", pname, VERSION,
- __DATE__, __TIME__);
- printf("%s\n", REDHAT_COPYRIGHT);
- exit(DID_SUCCESS);
- break;
-
- case ':':
- case '?':
- fprintf(stderr, "Please use '-h' for usage.\n");
- exit(DID_FAILURE);
- break;
-
- case 'o':
- if (strncasecmp(optarg, "metadata", 254) == 0) {
- print_metadata();
- exit(DID_SUCCESS);
- } else {
- fprintf(stderr, "Only 'metadata' option is aviable for this fence agent\n");
- exit(DID_FAILURE);
- }
- break;
-
- default:
- fprintf(stderr, "Bad programmer! You forgot to catch the %c flag\n", c);
- exit(DID_FAILURE);
- break;
-
- }
- }
- strcpy(name, pname);
- }
- else{
- errno = 0;
- while(fgets(arg, 256, stdin) != NULL){
- if( (value = strchr(arg, '\n')) == NULL){
- fprintf(stderr, "line too long: '%s'\n", arg);
- exit(DID_FAILURE);
- }
- *value = 0;
- if( (value = strchr(arg, '=')) == NULL){
- /* in this agent we can ignore options without value
- * as we don't need any of them, here. But we should
- * accept and ignore them.
- */
- fprintf(stderr, "invalid input: '%s'\n", arg);
- continue;
- }
- *value = 0;
- value++;
- /* bahfuck. "agent" is not passed to us anyway
- * if (!strcmp(arg, "agent")){
- * strcpy(name, value);
- * pname = name;
- *}
- */
- strcpy(name, pname);
- if (!strcmp(arg, "ipaddr"))
- strcpy(ipaddr, value);
-
- if (!strcmp(arg, "action"))
- if (strncasecmp(value, "metadata", 254) == 0) {
- print_metadata();
- exit(DID_SUCCESS);
- } else {
- fprintf(stderr, "Only 'metadata' option is aviable for this fence agent\n");
- exit(DID_FAILURE);
- }
-
- if (!strcmp(arg, "portnumber"))
- strcpy(portnumber, value);
-
- if (!strcmp(arg, "username"))
- strcpy(username, value);
-
- if (!strcmp(arg, "password"))
- strcpy(password, value);
-
- if (!strcasecmp(arg, "passwd_script")) {
- strncpy(pwd_script, optarg, sizeof(pwd_script));
- pwd_script[sizeof(pwd_script) - 1] = '\0';
- }
- }
- errno = 0;
-
- }
-
- if (pwd_script[0] != '\0') {
- FILE *fp;
- char pwd_buf[1024];
-
- fp = popen(pwd_script, "r");
- if (fp != NULL) {
- ssize_t len = fread(pwd_buf, 1, sizeof(pwd_buf), fp);
- if (len > 0) {
- char *p;
- p = strchr(pwd_buf, '\n');
- if (p != NULL)
- *p = '\0';
- p = strchr(pwd_buf, '\r');
- if (p != NULL)
- *p = '\0';
- strncpy(password, pwd_buf, sizeof(password));
- password[sizeof(password) - 1] = '\0';
- }
- pclose(fp);
- }
- }
-}
-
-static void sig_alarm(int sig)
-{
- if(!quiet_flag){
- fprintf(stderr,"failed: %s: Timeout, nothing happened for %d seconds.\n", pname, time_out);
- fprintf(stderr,"failed: %s: Perhaps you should inspect the RackSwitch at %s\n",pname,ipaddr);
- }
- exit(DID_FAILURE);
-}
-
-
-int main(int argc, char **argv)
-{
- int n,i,j,pnumb;
- int ip_portnumber = 1025;
- char boardnum = 0x00;
- /*char number_of_action = 0x01;*/
- int number_of_config_mobo = 0;
- int number_of_section_config_mobo = 0;
- int exit_status= 0;
- int success_off = 0;
- /*int success_on = 0;*/
- int read_more = 1;
- struct sockaddr_in rackaddr;
-
- /*char mobo_enabled = 0x01;*/
- /*char mobo_default_status = 0x00;*/
- /*char mobo_output_status = 0x00;*/
- int this_mobo = 0;
- /*int mobo_id = 0;*/
- /*int our_mobo = 0;*/
- int number_of_temp = 0;
-
- memset(arg, 0, 256);
- memset(name, 0, 256);
- memset(ipaddr, 0, 256);
- memset(portnumber,0,256);
- memset(username,0,256);
- memset(password,0,256);
-
- /*
- * Ensure that we always get out of the fencing agent
- * even if things get fucked up and we get no replies
- */
- signal(SIGALRM, &sig_alarm);
- alarm(time_out);
- get_options(argc, argv);
-
- if(name[0] == '\0')
- {
- if(!quiet_flag)
- fprintf(stderr,"failed: no name for this program\n");
- exit(DID_FAILURE);
- }
-
- if(ipaddr[0] == '\0')
- {
- if(!quiet_flag)
- fprintf(stderr,"failed: %s, no IP address given\n",name);
- exit(DID_FAILURE);
- }
- if (portnumber[0] == '\0')
- {
- if(!quiet_flag)
- fprintf(stderr,"failed: %s, no portnumber given\n",name);
- exit(DID_FAILURE);
- }
- if (username[0] == '\0')
- {
- if(!quiet_flag)
- fprintf(stderr,"failed: %s, no username given\n",name);
- exit(DID_FAILURE);
- }
-
- if (password[0] == '\0')
- {
- if(!quiet_flag)
- fprintf(stderr,"failed: %s, no password given\n",name);
- exit(DID_FAILURE);
- }
- /*
- * Port number given to us as a string.
- * Does the number make sense?
- */
- pnumb = 0;
- for(n=0;(portnumber[n]!='\0');n++){
- if((portnumber[n] < 48) || (portnumber[n] > 57)){
- if(!quiet_flag)
- fprintf(stderr,"failed: %s, invalid port number\n",name);
- exit(1);
- }
- pnumb = ((pnumb * 10) + ((int)(portnumber[n]) - 48));
- }
- /*
- * what section of the rack is this port part of?
- * The switch has 4 "subsections", called boardnum here
- */
- if((pnumb > 0) && (pnumb < 47))
- boardnum = 0x02;
- if((pnumb > 46) && (pnumb < 94))
- boardnum = 0x03;
- if((pnumb > 93) && (pnumb < 137))
- boardnum = 0x04;
- if((pnumb < 1) || (pnumb> 136)){
- boardnum = 0x00;
- if(!quiet_flag)
- fprintf(stderr,"failed: %s, the portnumber given is not in the range [1 - 136]\n",name);
- exit(DID_FAILURE);
- }
- /*********************************************
- ***
- *** set up TCP connection to the rackswitch
- ***
- ********************************************/
- if ((sock = socket(AF_INET,SOCK_STREAM,0)) < 0){
- fprintf(stderr,"failed: %s: socket error, %s\n",name,strerror(errno));
- exit(DID_FAILURE);
- }
-
- bzero(&rackaddr,sizeof(rackaddr));
- rackaddr.sin_family = AF_INET;
- rackaddr.sin_port = htons(ip_portnumber);
-
- if(inet_pton(AF_INET,ipaddr,&rackaddr.sin_addr) <= 0){
- fprintf(stderr,"failed: %s: inet_pton error\n", name);
- }
-
- if(connect(sock,(SA *) &rackaddr,sizeof(rackaddr)) < 0){
- fprintf(stderr,"failed: %s: connect error to %s, %s\n", name, ipaddr,strerror(errno));
- exit(DID_FAILURE);
- }
- /**********************************************
- ***
- *** Send Login Frame
- ***
- *********************************************/
- writebuf[0] = op_login;
-
- for(n=0;n<=(strlen(username));n++){
- writebuf[sizeof(char)+n] = username[n];
- }
- writebuf[sizeof(char)+(strlen(username))+1] ='\n';
-
- for(n=0;n<=(strlen(password))+1;n++){
- writebuf[sizeof(char)+strlen(username)+1+n] = password[n];
- }
- writebuf[sizeof(char)+(strlen(username))+1+(strlen(password))+1] ='\n';
-
- if(write(sock,writebuf,sizeof(char)+strlen(username)+strlen(password)+2) < 0) {
- fprintf(stderr,"failed to write to socket\n");
- exit(DID_FAILURE);
- }
-
- /********************************************
- ***
- *** Read Login Reply
- ***
- *******************************************/
- if(wait_frame(ack_login)){
- n=read(sock,readbuf,1);
- if(readbuf[0] == login_deny){
- if(!quiet_flag){fprintf(stderr,"failed: %s: Not able to log into RackSwitch\n",name);}
- exit(DID_FAILURE);
- }
- else{
- if(verbose_flag){printf("%s: Successfully logged into RackSwitch\n",name);}
- }
- }
-
- /********************************************
- ***
- *** Send Configuration Request Message
- ***
- *******************************************/
-
- writebuf[0] = configuration_request;
- writebuf[1] = config_general;
- if(write(sock,writebuf,2*(sizeof(char))) < 0) {
- fprintf(stderr,"failed to write to socket\n");
- exit(DID_FAILURE);
- }
-
- /********************************************
- ***
- *** Read General Configuration Message
- ***
- *******************************************/
-
- if(wait_frame(config_reply)){
- n = read(sock,readbuf,1);
- if(readbuf[0] == config_general){
-
- /* Configuration Status, one byte */
- n = read(sock,readbuf,1);
-
- /* Switch description, string */
- read_more = 1;
- while(read_more){
- n = read(sock,readbuf,1);
- if(readbuf[0] == '\0'){
- read_more = 0;
- }
- else{
- read_more = 1;
- }
- }
-
- /* Serial number, string */
- read_more = 1;
- while(read_more){
- n = read(sock,readbuf,1);
- if(readbuf[0] == '\0'){
- read_more = 0;
- }
- else{
- read_more = 1;
- }
- }
-
- /* Version number, string */
- read_more = 1;
- while(read_more){
- n = read(sock,readbuf,1);
- if(readbuf[0] == '\0'){
- read_more = 0;
- }
- else{
- read_more = 1;
- }
- }
-
- /* number of configured temps, 1 byte */
- number_of_temp = 0;
- n = read(sock,readbuf,1);
- number_of_temp = (int)readbuf[0];
-
- for(i=0;i<number_of_temp;i++){
-
- /* Temprature description, string */
- read_more = 1;
- while(read_more){
- read_more = 1;
- while(read_more){
- n = read(sock,readbuf,1);
- if(readbuf[0] == '\0'){
- read_more = 0;
- }
- else{
- read_more = 1;
- }
- }
- }
-
- n = read(sock,readbuf,1); /* Temprature input ID */
- n = read(sock,readbuf,1); /* Tempratue unit */
- n = read(sock,readbuf,8); /* Temprature HI alarm */
- n = read(sock,readbuf,8); /* Temprature LO alarm */
- n = read(sock,readbuf,1); /* Temprature HI Alarm */
- n = read(sock,readbuf,1); /* Temprature LO Alarm */
- n = read(sock,readbuf,1); /* Temprature Alarm email */
- }
- /* Number of configured motherboards */
- number_of_config_mobo = 0;
- for(i=4;i>0;i--){
- read_more = 1;
- while(read_more){
- n=read(sock,readbuf,1);
- if(n == 1){
- read_more = 0;
- number_of_config_mobo = number_of_config_mobo + (int)(readbuf[0]<<(8*(i-1)));
- }
- }
- }
- /*
- * make sure the motherboard we are asked to turn of is configured
- */
- if(pnumb > number_of_config_mobo){
- if(!quiet_flag){
- fprintf(stderr,"failed: %s asked to reboot port %d, but there are only %d ports configured\n",name,pnumb,number_of_config_mobo);
- exit(DID_FAILURE);
- }
- }
- n = read(sock,readbuf,1); /* email alarms */
- n = read(sock,readbuf,4); /* email alarm delay */
-
- /* email addresses, string */
- read_more = 1;
- while(read_more){
- n = read(sock,readbuf,1);
- if(readbuf[0] == '\0'){
- read_more = 0;
- }
- else{
- read_more = 1;
- }
- }
-
- n = read(sock,readbuf,4); /* reset action duration */
- n = read(sock,readbuf,4); /* power off action duration */
- n = read(sock,readbuf,4); /* power on action duration */
- }
- else{
- if(debug_flag){fprintf(stderr,"failed: %s: Did not receive general configuration frame when requested\n",name);}
- exit(DID_FAILURE);
- }
- }
- else{
- if(debug_flag){fprintf(stderr,"failed: %s: Did not receive configuration frame when requested\n",name);}
- exit(DID_FAILURE);
- }
-
-
-
- /******************************************
- ***
- *** Send Action packet to switch
- *** Off/On port <portnum>
- ***
- *****************************************/
- memset(writebuf,0,sizeof(writebuf));
- writebuf[0] = op_action;
- writebuf[1] = (char)(number_of_config_mobo >> 24);
- writebuf[2] = (char)(number_of_config_mobo >> 16);
- writebuf[3] = (char)(number_of_config_mobo >> 8);
- writebuf[4] = (char)(number_of_config_mobo);
-
- writebuf[(pnumb*5)+0] = (char)(pnumb >> 24);
- writebuf[(pnumb*5)+1] = (char)(pnumb >> 16);
- writebuf[(pnumb*5)+2] = (char)(pnumb >> 8);
- writebuf[(pnumb*5)+3] = (char)(pnumb);
- writebuf[(pnumb*5)+4] = action_offon;
-
- if(write(sock,writebuf,(pnumb*5)+5) < 0) {
- fprintf(stderr,"failed to write to socket\n");
- exit(DID_FAILURE);
- }
- if(verbose_flag){
- printf("%s: sending action frame to switch:\n",name);
- for(i=0;i<(pnumb*5)+5;i++)
- printf("0x%.2x ",writebuf[i]);
- printf("\n");
- }
-
- /******************************************
- ***
- *** Send Configuration Request packet to switch
- ***
- *****************************************/
- memset(writebuf,0,sizeof(writebuf));
- writebuf[0] = configuration_request;
- writebuf[1] = boardnum;
-
- if(write(sock,writebuf,2*(sizeof(char))) < 0) {
- fprintf(stderr,"failed to write to socket\n");
- exit(DID_FAILURE);
- }
- if(verbose_flag){
- printf("%s: sending Request Configuration Frame from switch:\n",name);
- printf("0x%.2x 0x%.2x\n",writebuf[0],writebuf[1]);
- }
-
- /*******************************************
- ***
- *** Read Switch Status Message
- ***
- ******************************************/
- while(success_off == 0){
- if(debug_flag){
- printf("%s: Status does not indicate port %d being rebooted. Looking again\n",name,pnumb);}
- if(wait_frame(message_status)){
- n = read(sock,readbuf,1); /* Rackswitch status */
-
- read_more = 1;
- while(read_more){ /* Date & time */
- n = read(sock,readbuf,1);
- if(readbuf[0] == '\0'){
- read_more = 0;
- }
- else{
- read_more = 1;
- }
- }
- number_of_temp = 0;
- n = read(sock,readbuf,1);
- number_of_temp = readbuf[0];
- for(i=0;i<number_of_temp;i++){
- read_more = 1;
- while(read_more){
- n = read(sock,readbuf,1); /* Temprature input ID */
- n = read(sock,readbuf,8); /* Temprature Value, Fahrenheit */
- n = read(sock,readbuf,8); /* Temprature Vaule, Celcius */
- n = read(sock,readbuf,1); /* Temprature Alarm */
- }
- }
-
- /* number of motherboards, 4 byte */
- number_of_section_config_mobo = 0;
- for(i=4;i>0;i--){
- read_more = 1;
- while(read_more){
- n=read(sock,readbuf,1);
- if(n == 1){
- read_more = 0;
- number_of_section_config_mobo = number_of_section_config_mobo + (int)(readbuf[0]<<(8*(i-1)));
- }
- }
- }
-
- for(i=0;i<number_of_section_config_mobo;i++){
-
- this_mobo = 0;
- for(j=4;j>0;j--){
- read_more = 1;
- while(read_more){
- n=read(sock,readbuf,1);
- if(n == 1){
- read_more = 0;
- this_mobo = this_mobo + (int)(readbuf[0]<<(8*(j-1)));
- }
- }
- }
- if(debug_flag){printf("%s: port %d is currently ",name,this_mobo);}
- n = read(sock,readbuf,1); /* Motherboard status */
- if(debug_flag){printf("0x%.2x\n",readbuf[0]);}
- if((pnumb == this_mobo) && ((readbuf[0] == 0x02)||(readbuf[0] == 0x03))){
- success_off = 1;
- if(verbose_flag){printf("%s: Status shows port %d being rebooted\n",name,this_mobo);}
- }
- } /* end number_of_section_mobo loop */
- if(!success_off){
- if(verbose_flag){printf("%s: Status shows port %d NOT being rebooted, asking for status again\n",name,pnumb);}
- }
- }
- else{
- if(debug_flag){fprintf(stderr,"%s: Did not receive Switch Status Message\n",name);}
- exit(DID_FAILURE);
- }
- }
-
-
- if(success_off){
- if(!quiet_flag){
- printf("success: %s: successfully told RackSwitch to reboot port %d\n",name,pnumb);
- }
- alarm(0);
- exit_status = DID_SUCCESS;
- }
- return(exit_status);
-}
-/* And that is it. There is no more.
- * Maybe there should be more?
- * Or maybe not?
- * But there is no more
- */
diff --git a/fence/agents/rackswitch/do_rack.h b/fence/agents/rackswitch/do_rack.h
deleted file mode 100644
index 63c1365..0000000
--- a/fence/agents/rackswitch/do_rack.h
+++ /dev/null
@@ -1,27 +0,0 @@
-
-#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <limits.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <ctype.h>
-
-#include <sys/socket.h>
-#include <sys/types.h>
-
-#include <arpa/inet.h>
-
-#include <signal.h>
-
-#include "copyright.cf"
-
-#define SA struct sockaddr
-
-
-#define MAXBUF 1200
-
-#define DID_SUCCESS 0
-#define DID_FAILURE 1
-
diff --git a/fence/agents/vixel/Makefile.am b/fence/agents/vixel/Makefile.am
deleted file mode 100644
index 3159e50..0000000
--- a/fence/agents/vixel/Makefile.am
+++ /dev/null
@@ -1,17 +0,0 @@
-MAINTAINERCLEANFILES = Makefile.in
-
-TARGET = fence_vixel
-
-SRC = $(TARGET).pl
-
-EXTRA_DIST = $(SRC)
-
-sbin_SCRIPTS = $(TARGET)
-
-man_MANS = $(TARGET).8
-
-include $(top_srcdir)/make/fencebuild.mk
-include $(top_srcdir)/make/fencemanperl.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/vixel/fence_vixel.pl b/fence/agents/vixel/fence_vixel.pl
deleted file mode 100644
index 2080909..0000000
--- a/fence/agents/vixel/fence_vixel.pl
+++ /dev/null
@@ -1,267 +0,0 @@
-#!/usr/bin/perl
-
-use Getopt::Std;
-use Net::Telnet ();
-
-my $ME = $0;
-
-END {
- defined fileno STDOUT or return;
- close STDOUT and return;
- warn "$ME: failed to close standard output: $!\n";
- $? ||= 1;
-}
-
-# Get the program name from $0 and strip directory names
-$_=$0;
-s/.*\///;
-my $pname = $_;
-
-# WARNING!! Do not add code bewteen "#BEGIN_VERSION_GENERATION" and
-# "#END_VERSION_GENERATION" It is generated by the Makefile
-
-#BEGIN_VERSION_GENERATION
-$RELEASE_VERSION="";
-$REDHAT_COPYRIGHT="";
-$BUILD_DATE="";
-#END_VERSION_GENERATION
-
-
-sub usage
-{
- print "Usage:\n\n";
- print "$pname [options]\n\n";
- print "Options:\n";
- print " -a <ip> IP address or hostname of switch\n";
- print " -h Usage\n";
- print " -o metadata print XML metadata for fence agent\n";
- print " -n <num> Port number to disable\n";
- print " -p <string> Password for login\n";
- print " -S <path> Script to run to retrieve login password\n";
- print " -V version\n\n";
-
- exit 0;
-}
-
-sub fail
-{
- ($msg) = @_;
- print $msg."\n" unless defined $opt_q;
- $t->close if defined $t;
- exit 1;
-}
-
-sub fail_usage
-{
- ($msg) = @_;
- print STDERR $msg."\n" if $msg;
- print STDERR "Please use '-h' for usage.\n";
- exit 1;
-}
-
-sub version
-{
- print "$pname $RELEASE_VERSION $BUILD_DATE\n";
- print "$REDHAT_COPYRIGHT\n" if ( $REDHAT_COPYRIGHT );
-
- exit 0;
-}
-
-sub print_metadata
-{
-print '<?xml version="1.0" ?>
-<resource-agent name="fence_vixel" shortdesc="I/O Fencing agent for Vixel FC switches" >
-<longdesc>
-fence_vixel is an I/O Fencing agent which can be used with Vixel FC switches. It logs into a Vixel switch via telnet and removes the specified port from the zone. Removing the zone access from the port disables the port from being able to access the storage.
-
-After a fence operation has taken place the fenced machine can no longer connect to the Vixel FC switch. When the fenced machine is ready to be brought back into the GFS cluster (after reboot) the port on the Vixel FC switch needs to be enabled. In order to do this, log into the Vixel FC switch. Then go to:
-
-config->zones->config [port] [comma-separated-list-of-ports-in-the-zone]
-
-Then apply. Consult the Vixel manual for details.
-</longdesc>
-<vendor-url>http://www.emulex.com</vendor-url>
-<parameters>
- <parameter name="ipaddr" unique="1" required="1">
- <getopt mixed="-a [ip]" />
- <content type="string" />
- <shortdesc lang="en">IP Address or Hostname</shortdesc>
- </parameter>
- <parameter name="passwd" unique="1" required="0">
- <getopt mixed="-p [password]" />
- <content type="string" />
- <shortdesc lang="en">Login password or passphrase</shortdesc>
- </parameter>
- <parameter name="passwd_script" unique="1" required="0">
- <getopt mixed="-S [script]" />
- <content type="string" />
- <shortdesc lang="en">Script to retrieve password</shortdesc>
- </parameter>
- <parameter name="port" unique="1" required="1">
- <getopt mixed="-n [id]" />
- <content type="string" />
- <shortdesc lang="en">Physical plug number or name of virtual machine</shortdesc>
- </parameter>
- <parameter name="help" unique="1" required="0">
- <getopt mixed="-h" />
- <content type="string" />
- <shortdesc lang="en">Display help and exit</shortdesc>
- </parameter>
-</parameters>
-<actions>
- <action name="metadata" />
-</actions>
-</resource-agent>
-';
-}
-
-
-if (@ARGV > 0) {
- getopts("a:hn:p:S:Vo:") || fail_usage ;
-
- usage if defined $opt_h;
- version if defined $opt_V;
-
- fail_usage "Unknown parameter." if (@ARGV > 0);
-
- if ((defined $opt_o) && ($opt_o =~ /metadata/i)) {
- print_metadata();
- exit 0;
- }
-
- fail_usage "No '-a' flag specified." unless defined $opt_a;
-
- if (defined $opt_S) {
- $pwd_script_out = `$opt_S`;
- chomp($pwd_script_out);
- if ($pwd_script_out) {
- $opt_p = $pwd_script_out;
- }
- }
-
- fail_usage "No '-p' or '-S' flag specified." unless defined $opt_p;
- fail_usage "No '-n' flag specified." unless defined $opt_n;
-
-} else {
- get_options_stdin();
-
- fail "failed: no IP address for the Vixel." unless defined $opt_a;
-
- if (defined $opt_S) {
- $pwd_script_out = `$opt_S`;
- chomp($pwd_script_out);
- if ($pwd_script_out) {
- $opt_p = $pwd_script_out;
- }
- }
-
- fail "failed: no password provided." unless defined $opt_p;
- fail "failed: no port number specified." unless defined $opt_n;
-}
-
-#
-# Set up and log in
-#
-
-$t = new Net::Telnet;
-
-$t->open($opt_a);
-
-$t->waitfor('/assword:/');
-
-$t->print($opt_p);
-
-($out, $match)= $t->waitfor(Match => '/\>/', Match => '/assword:/');
-
-if ($match =~ /assword:/) {
- fail "failed: incorrect password\n";
-} elsif ( $match !~ />/ ) {
- fail "failed: timed out waiting for prompt\n";
-}
-
-$t->print("config");
-
-$t->waitfor('/\(config\)\>/');
-
-$t->print("zone");
-
-$t->waitfor('/\(config\/zone\)\>/');
-
-#
-# Do the command
-#
-
-$cmd = "config $opt_n \"\"";
-$t->print($cmd);
-
-$t->waitfor('/\(config\/zone\)\>/');
-
-$t->print("apply");
-
-($text, $match) = $t->waitfor('/\>/');
-if ($text !~ /[Oo][Kk]/) {
- fail "failed: error from switch\n";
-}
-
-$t->print("exit");
-
-print "success: zonedisable $opt_n\n";
-exit 0;
-
-
-sub get_options_stdin
-{
- my $opt;
- my $line = 0;
-
- while( defined($in = <>) )
- {
- $_ = $in;
- chomp;
-
- # strip leading and trailing whitespace
- s/^\s*//;
- s/\s*$//;
-
- # skip comments
- next if /^#/;
-
- $line+=1;
- $opt=$_;
- next unless $opt;
-
- ($name,$val)=split /\s*=\s*/, $opt;
-
- if ( $name eq "" ) {
- print("parse error: illegal name in option $line\n");
- exit 2;
- }
-
- # DO NOTHING -- this field is used by fenced
- elsif ($name eq "agent" ) { }
-
- # FIXME -- depricated. use "port" instead.
- elsif ($name eq "fm" ) {
- (my $dummy,$opt_n) = split /\s+/,$val;
- print STDERR "Depricated \"fm\" entry detected. Refer to man page.\n";
- }
- elsif ($name eq "ipaddr" )
- {
- $opt_a = $val;
- }
- elsif ($name eq "name" ) { }
- elsif ($name eq "passwd" )
- {
- $opt_p = $val;
- }
- elsif ($name eq "passwd_script" )
- {
- $opt_S = $val;
- }
- elsif ($name eq "port" )
- {
- $opt_n = $val;
- }
- }
-}
-
diff --git a/fence/agents/xcat/Makefile.am b/fence/agents/xcat/Makefile.am
deleted file mode 100644
index ef99def..0000000
--- a/fence/agents/xcat/Makefile.am
+++ /dev/null
@@ -1,17 +0,0 @@
-MAINTAINERCLEANFILES = Makefile.in
-
-TARGET = fence_xcat
-
-SRC = $(TARGET).pl
-
-EXTRA_DIST = $(SRC)
-
-sbin_SCRIPTS = $(TARGET)
-
-man_MANS = $(TARGET).8
-
-include $(top_srcdir)/make/fencebuild.mk
-include $(top_srcdir)/make/fencemanperl.mk
-
-clean-local: clean-man
- rm -f $(TARGET)
diff --git a/fence/agents/xcat/fence_xcat.pl b/fence/agents/xcat/fence_xcat.pl
deleted file mode 100644
index c2937c9..0000000
--- a/fence/agents/xcat/fence_xcat.pl
+++ /dev/null
@@ -1,250 +0,0 @@
-#!/usr/bin/perl
-
-use Getopt::Std;
-
-my $ME = $0;
-
-END {
- defined fileno STDOUT or return;
- close STDOUT and return;
- warn "$ME: failed to close standard output: $!\n";
- $? ||= 1;
-}
-
-# Get the program name from $0 and strip directory names
-$_=$0;
-s/.*\///;
-my $pname = $_;
-
-$opt_o = 'reset'; # Default fence action
-$opt_r = 'rpower'; # Default fence action
-
-# WARNING!! Do not add code bewteen "#BEGIN_VERSION_GENERATION" and
-# "#END_VERSION_GENERATION" It is generated by the Makefile
-
-#BEGIN_VERSION_GENERATION
-$RELEASE_VERSION="";
-$REDHAT_COPYRIGHT="";
-$BUILD_DATE="";
-#END_VERSION_GENERATION
-
-
-sub usage
-{
- print "Usage:\n";
- print "\n";
- print "$pname [options]\n";
- print "\n";
- print "Options:\n";
- print " -h usage\n";
- print " -n <name> nodename\n";
- print " -o <string> Action: on, off, reset (default), status or metadata\n";
- print " -r <rpower> rpower command\n";
- print " -q quiet mode\n";
- print " -V version\n";
-
- exit 0;
-}
-
-sub fail
-{
- ($msg) = @_;
- print $msg."\n" unless defined $opt_q;
- $t->close if defined $t;
- exit 1;
-}
-
-sub fail_usage
-{
- ($msg)=@_;
- print STDERR $msg."\n" if $msg;
- print STDERR "Please use '-h' for usage.\n";
- exit 1;
-}
-
-sub version
-{
- print "$pname $RELEASE_VERSION $BUILD_DATE\n";
- print "$REDHAT_COPYRIGHT\n" if ( $REDHAT_COPYRIGHT );
-
- exit 0;
-}
-
-sub print_metadata
-{
-print '<?xml version="1.0" ?>
-<resource-agent name="fence_xcat" shortdesc="I/O Fencing agent for xcat environments" >
-<longdesc>
-fence_xcat is a wrapper to the rpower(1) command that is distributed with the xCAT project available at http://www.xcat.org. Use of fence_xcat requires that xcat has already been properly configured for your environment. Refer to xCAT(1) for more information on configuring xCAT.
-
-NOTE: It is recommended that fence_bladecenter(8) is used instead of fence_xcat if the bladecenter firmware supports telnet. This interface is much cleaner and easier to setup.
-</longdesc>
-<vendor-url>http://www.xcat.org</vendor-url>
-<parameters>
- <parameter name="action" unique="1" required="1">
- <getopt mixed="-o [action]" />
- <content type="string" default="restart" />
- <shortdesc lang="en">Fencing Action</shortdesc>
- </parameter>
- <parameter name="nodename" unique="1" required="1">
- <getopt mixed="-n [nodename]" />
- <content type="string" />
- <shortdesc lang="en">The nodename as defined in nodelist.tab of the xCAT setup.</shortdesc>
- </parameter>
- <parameter name="rpower" unique="1" required="0">
- <getopt mixed="-r [rpower]" />
- <content type="string" />
- <shortdesc lang="en">The path to the rpower binary.</shortdesc>
- </parameter>
- <parameter name="help" unique="1" required="0">
- <getopt mixed="-h" />
- <content type="string" />
- <shortdesc lang="en">Display help and exit</shortdesc>
- </parameter>
-</parameters>
-<actions>
- <action name="on" />
- <action name="off" />
- <action name="status" />
- <action name="metadata" />
-</actions>
-</resource-agent>
-';
-}
-
-
-sub get_options_stdin
-{
- my $opt;
- my $line = 0;
- while( defined($in = <>) )
- {
- $_ = $in;
- chomp;
-
- # strip leading and trailing whitespace
- s/^\s*//;
- s/\s*$//;
-
- # skip comments
- next if /^#/;
-
- $line+=1;
- $opt=$_;
- next unless $opt;
-
- ($name,$val)=split /\s*=\s*/, $opt;
-
- if ( $name eq "" )
- {
- print STDERR "parse error: illegal name in option $line\n";
- exit 2;
- }
-
- # DO NOTHING -- this field is used by fenced
- elsif ($name eq "agent" ) { }
-
- elsif ($name eq "action" )
- {
- $opt_o = $val;
- }
- elsif ($name eq "nodename" )
- {
- $opt_n = $val;
- }
- elsif ($name eq "rpower" )
- {
- $opt_r = $val;
- }
-
- }
-}
-
-######################################################################33
-# MAIN
-
-if (@ARGV > 0) {
- getopts("hn:o:r:qV") || fail_usage ;
-
- usage if defined $opt_h;
- version if defined $opt_V;
-
- fail_usage "Unknown parameter." if (@ARGV > 0);
-
- if ((defined $opt_o) && ($opt_o =~ /metadata/i)) {
- print_metadata();
- exit 0;
- }
-
- fail_usage "No '-n' flag specified." unless defined $opt_n;
- $opt_o=lc($opt_o);
- fail_usage "Unrecognised action '$opt_o' for '-o' flag"
- unless $opt_o =~ /^(on|off|reset|stat|status)$/;
-
-} else {
- get_options_stdin();
-
- if ((defined $opt_o) && ($opt_o =~ /metadata/i)) {
- print_metadata();
- exit 0;
- }
-
- fail "failed: no plug number" unless defined $opt_n;
- $opt_o=lc($opt_o);
- fail "failed: unrecognised action: $opt_o"
- unless $opt_o =~ /^(on|off|reset|stat|status)$/;
-}
-
-pipe (RDR,WTR);
-
-if ( $pid=fork() == 0 )
-{
- close RDR;
-
- open STDOUT, ">&WTR";
- exec "$opt_r $opt_n $opt_o" or die "failed to exec \"$opt_r\"\n";
-}
-
-close WTR;
-
-wait;
-
-if ( $? != 0 )
-{
- die "failed: rpower error: exit $?\n"
-}
-
-$found=0;
-$status="";
-while (<RDR>)
-{
- chomp;
-
- if ( $_ =~ /^(\S+): (\S+)$/)
- {
- if ($opt_n eq $1)
- {
- $status = $2;
-
- if (($opt_o eq $2) || ($opt_o =~ /stat/i) || ($opt_o =~ /status/i))
- {
- $found=1;
- last;
- }
- }
- }
-}
-
-print (($found ? "success":"failed") . ": $opt_n $status\n")
- unless defined $opt_q;
-
-exit ($found ? 0 : 1 );
-
-
-
-
-
-
-
-
-
diff --git a/tests/data/metadata/fence_rackswitch.xml b/tests/data/metadata/fence_rackswitch.xml
deleted file mode 100644
index 63f2faf..0000000
--- a/tests/data/metadata/fence_rackswitch.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" ?>
-<resource-agent name="fence_rackswitch" shortdesc="fence_rackswitch - I/O Fencing agent for RackSaver RackSwitch" >
-<longdesc>fence_rackswitch is an I/O Fencing agent which can be used with the RackSaver RackSwitch. It logs into the RackSwitch and boots a specified plug. Using the http interface to the RackSwitch should be avoided while a GFS cluster is running because the connection may interfere with the operation of this agent.</longdesc>
-<vendor-url>http://www.bladenetwork.net</vendor-url>
-<parameters>
-<parameter name="ipaddr" unique="1" required="1">
- <getopt mixed="-a [ip]" />
- <content type="string" />
- <shortdesc lang="en">IP Address or Hostname</shortdesc>
-</parameter>
-<parameter name="login" unique="1" required="1">
- <getopt mixed="-l [name]" />
- <content type="string" />
- <shortdesc lang="en">Login Name</shortdesc>
-</parameter>
-<parameter name="passwd" unique="1" required="0">
- <getopt mixed="-p [password]" />
- <content type="string" />
- <shortdesc lang="en">Login password or passphrase</shortdesc>
-</parameter>
-<parameter name="passwd_script" unique="1" required="0">
- <getopt mixed="-S [script]" />
- <content type="string" />
- <shortdesc lang="en">Script to retrieve password</shortdesc>
-</parameter>
-</parameters>
-<actions>
- <action name="metadata" />
-</actions>
-</resource-agent>
9 years, 11 months
fence-agents: master - [testing] Add XML metadata for fence_scsi
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=77c8c8...
Commit: 77c8c858a41da9e593f5f630ff42924211248a9b
Parent: c783ce59939e482525eca82bdcfbc0dcf63043d3
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Mon Jun 9 15:37:59 2014 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Mon Jun 9 15:37:59 2014 +0200
[testing] Add XML metadata for fence_scsi
---
tests/data/metadata/fence_scsi.xml | 116 ++++++++++++++++++++++++++++++++++++
1 files changed, 116 insertions(+), 0 deletions(-)
diff --git a/tests/data/metadata/fence_scsi.xml b/tests/data/metadata/fence_scsi.xml
new file mode 100644
index 0000000..ba80e8c
--- /dev/null
+++ b/tests/data/metadata/fence_scsi.xml
@@ -0,0 +1,116 @@
+<?xml version="1.0" ?>
+<resource-agent name="fence_scsi" shortdesc="Fence agent for SCSI persistentl reservation" >
+<longdesc>fence_scsi is an I/O fencing agent that uses SCSI-3 persistent reservations to control access to shared storage devices. These devices must support SCSI-3 persistent reservations (SPC-3 or greater) as well as the "preempt-and-abort" subcommand.
+The fence_scsi agent works by having each node in the cluster register a unique key with the SCSI devive(s). Once registered, a single node will become the reservation holder by creating a "write exclusive, registrants only" reservation on the device(s). The result is that only registered nodes may write to the device(s). When a node failure occurs, the fence_scsi agent will remove the key belonging to the failed node from the device(s). The failed node will no longer be able to write to the device(s). A manual reboot is required.</longdesc>
+<vendor-url></vendor-url>
+<parameters>
+ <parameter name="aptpl" unique="0" required="0">
+ <getopt mixed="-a, --aptpl" />
+ <content type="boolean" />
+ <shortdesc lang="en">Use the APTPL flag for registrations. This option is only used for the 'on' action.</shortdesc>
+ </parameter>
+ <parameter name="nodename" unique="0" required="0">
+ <getopt mixed="-n, --nodename=[nodename]" />
+ <content type="string" />
+ <shortdesc lang="en">Name of the node to be fenced. The node name is used to generate the key value used for the current operation. This option will be ignored when used with the -k option.</shortdesc>
+ </parameter>
+ <parameter name="action" unique="0" required="1">
+ <getopt mixed="-o, --action=[action]" />
+ <content type="string" default="off" />
+ <shortdesc lang="en">Fencing Action</shortdesc>
+ </parameter>
+ <parameter name="key" unique="0" required="0">
+ <getopt mixed="-k, --key=[key]" />
+ <content type="string" />
+ <shortdesc lang="en">Key to use for the current operation. This key should be unique to a node. For the "on" action, the key specifies the key use to register the local node. For the "off" action, this key specifies the key to be removed from the device(s).</shortdesc>
+ </parameter>
+ <parameter name="devices" unique="0" required="0">
+ <getopt mixed="-d, --devices=[devices]" />
+ <content type="string" />
+ <shortdesc lang="en">List of devices to use for current operation. Devices can be comma-separated list of raw device (eg. /dev/sdc) or device-mapper multipath devices (eg. /dev/dm-3). Each device must support SCSI-3 persistent reservations.</shortdesc>
+ </parameter>
+ <parameter name="logfile" unique="0" required="0">
+ <getopt mixed="-a, --logfile" />
+ <content type="string" />
+ <shortdesc lang="en">Log output (stdout and stderr) to file</shortdesc>
+ </parameter>
+ <parameter name="verbose" unique="0" required="0">
+ <getopt mixed="-v, --verbose" />
+ <content type="boolean" />
+ <shortdesc lang="en">Verbose mode</shortdesc>
+ </parameter>
+ <parameter name="debug" unique="0" required="0">
+ <getopt mixed="-D, --debug-file=[debugfile]" />
+ <content type="string" />
+ <shortdesc lang="en">Write debug information to given file</shortdesc>
+ </parameter>
+ <parameter name="version" unique="0" required="0">
+ <getopt mixed="-V, --version" />
+ <content type="boolean" />
+ <shortdesc lang="en">Display version information and exit</shortdesc>
+ </parameter>
+ <parameter name="help" unique="0" required="0">
+ <getopt mixed="-h, --help" />
+ <content type="boolean" />
+ <shortdesc lang="en">Display help and exit</shortdesc>
+ </parameter>
+ <parameter name="vgs_path" unique="0" required="0">
+ <getopt mixed="--vgs-path=[path]" />
+ <content type="string" default="/usr/sbin/vgs" />
+ <shortdesc lang="en">Path to vgs binary</shortdesc>
+ </parameter>
+ <parameter name="power_wait" unique="0" required="0">
+ <getopt mixed="--power-wait=[seconds]" />
+ <content type="string" default="0" />
+ <shortdesc lang="en">Wait X seconds after issuing ON/OFF</shortdesc>
+ </parameter>
+ <parameter name="login_timeout" unique="0" required="0">
+ <getopt mixed="--login-timeout=[seconds]" />
+ <content type="string" default="5" />
+ <shortdesc lang="en">Wait X seconds for cmd prompt after login</shortdesc>
+ </parameter>
+ <parameter name="power_timeout" unique="0" required="0">
+ <getopt mixed="--power-timeout=[seconds]" />
+ <content type="string" default="20" />
+ <shortdesc lang="en">Test X seconds for status change after ON/OFF</shortdesc>
+ </parameter>
+ <parameter name="delay" unique="0" required="0">
+ <getopt mixed="--delay=[seconds]" />
+ <content type="string" default="0" />
+ <shortdesc lang="en">Wait X seconds before fencing is started</shortdesc>
+ </parameter>
+ <parameter name="sg_persist_path" unique="0" required="0">
+ <getopt mixed="--sg_persist-path=[path]" />
+ <content type="string" default="/usr/bin/sg_persist" />
+ <shortdesc lang="en">Path to sg_persist binary</shortdesc>
+ </parameter>
+ <parameter name="shell_timeout" unique="0" required="0">
+ <getopt mixed="--shell-timeout=[seconds]" />
+ <content type="string" default="3" />
+ <shortdesc lang="en">Wait X seconds for cmd prompt after issuing command</shortdesc>
+ </parameter>
+ <parameter name="sg_turs_path" unique="0" required="0">
+ <getopt mixed="--sg_turs-path=[path]" />
+ <content type="string" default="/usr/bin/sg_turs" />
+ <shortdesc lang="en">Path to sg_turs binary</shortdesc>
+ </parameter>
+ <parameter name="corosync-cmap_path" unique="0" required="0">
+ <getopt mixed="--corosync-cmap-path=[path]" />
+ <content type="string" default="/usr/sbin/corosync-cmapctl" />
+ <shortdesc lang="en">Path to corosync-cmapctl binary</shortdesc>
+ </parameter>
+ <parameter name="retry_on" unique="0" required="0">
+ <getopt mixed="--retry-on=[attempts]" />
+ <content type="string" default="1" />
+ <shortdesc lang="en">Count of attempts to retry power on</shortdesc>
+ </parameter>
+</parameters>
+<actions>
+ <action name="on" on_target="1" automatic="1"/>
+ <action name="off" />
+ <action name="status" />
+ <action name="list" />
+ <action name="monitor" />
+ <action name="metadata" />
+</actions>
+</resource-agent>
9 years, 11 months
fence-agents: master - fencing: Fix problems when fence agent do not have --plug / -n
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/?p=fence-agents.git;a=commitdiff;h=c783ce...
Commit: c783ce59939e482525eca82bdcfbc0dcf63043d3
Parent: 1b5cc47b0fa7dc806c6a30d9296cf5be488a1518
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Mon Jun 9 15:22:49 2014 +0200
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Mon Jun 9 15:22:49 2014 +0200
fencing: Fix problems when fence agent do not have --plug / -n
Found during tests on fence_dummy
---
fence/agents/lib/fencing.py.py | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index 431b363..5084f24 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -785,8 +785,9 @@ def check_input(device_opt, opt):
######
def get_multi_power_fn(tn, options, get_power_fn):
status = "off"
+ plugs = options["--plugs"] if options.has_key("--plugs") else [""]
- for plug in options["--plugs"]:
+ for plug in plugs:
try:
options["--uuid"] = str(uuid.UUID(plug))
except ValueError:
@@ -802,8 +803,10 @@ def get_multi_power_fn(tn, options, get_power_fn):
return status
def set_multi_power_fn(tn, options, set_power_fn, get_power_fn, retry_attempts = 1):
- for _ in range(1, retry_attempts):
- for plug in options["--plugs"]:
+ plugs = options["--plugs"] if options.has_key("--plugs") else [""]
+
+ for _ in range(retry_attempts):
+ for plug in plugs:
try:
options["--uuid"] = str(uuid.UUID(plug))
except ValueError:
9 years, 11 months