
STONITH module for IBM BladeCenter via OpenHPI
----------------------------------------------

Requirements:
	Linux-HA bladehpi STONITH plugin requires OpenHPI 2.6+
	OpenHPI requires Net-SNMP 5.0+
	OpenHPI requires BladeCenter Management Module 1.08+

This STONITH module talks to IBM BladeCenters via SNMP through use of
the OpenHPI BladeCenter plugin (snmp_bc).  For more information about
installing OpenHPI, setting up the BladeCenter SNMP agent, etc. please
visit http://www.openhpi.org/.  Once OpenHPI is installed properly,
the STONITH plugin will automatically be built the next time Linux-HA
is built.

Use the OpenHPI configuration file (i.e. /etc/openhpi/openhpi.conf)
to configure the BladeCenters of interest to STONITH.  For example, 
the following excerpt:

	plugin libsnmp_bc

	handler libsnmp_bc {
        	entity_root = "{SYSTEM_CHASSIS,1}" # Required
	        host = "9.254.253.252" # Required
        	community = "community" # Version 1 Required.
	        version = "3" # Required. SNMP protocol version (1|3)
        	security_name = "userid" # Version 3 Required.
	        passphrase = "userpass" # Version 3. Required if security_level is authNoPriv or authPriv.
        	auth_type = "MD5" # Version 3. Passphrase encoding (MD5|SHA)
	        security_level = "authNoPriv" # Version 3. (noAuthNoPriv|authNoPriv|authPriv)
	}

defines how to access the BladeCenter at 9.254.253.252 using SNMPV3
with an ID/password of userid/userpass.  The entity_root must be
passed to the STONITH bladehpi plugin as its single required parameter.
For example, to query the list of blades present in the BladeCenter
configured above, run:

	stonith -t bladehpi -p "{SYSTEM_CHASSIS,1}" -l

which is the same as:

	stonith -t bladehpi "entity_root={SYSTEM_CHASSIS,1}" -l

Use the BladeCenter Management Module web interface to set the Blade
Information to match "uname -n" for each blade in the cluster.  For
example, with the BladeCeter configured above use a brower to access 
http://9.254.253.252, login with userid/userpass, and then go to
Blade Tasks -> Configuration -> Blade Information, enter the proper
names, and select Save.  Be aware that heartbeat must be restarted
before these changes take effect or, if using the OpenHPI daemon,
the daemon must be restarted.

More than one BladeCenter can be placed in the OpenHPI configuration
file by using different numbers with the entity_root.  For example,

	plugin libsnmp_bc

	handler libsnmp_bc {
        	entity_root = "{SYSTEM_CHASSIS,1}" # Required
	        host = "9.254.253.252" # Required
		:
	}
	handler libsnmp_bc {
        	entity_root = "{SYSTEM_CHASSIS,2}" # Required
	        host = "9.254.253.251" # Required
		:
	}

There is an optional parameter, soft_reset, that is true|1 if bladehpi
should use soft reset (power cycle) to reset nodes or false|0 if it
should use hard reset (power off, wait, power on); the default is
false.  As an example, to override the default value the above stonith
command would become:

	stonith -t bladehpi -p "{SYSTEM_CHASSIS,1} true" -l

which is the same as:

	stonith -t bladehpi "entity_root={SYSTEM_CHASSIS,1} soft_reset=true" -l

The difference between the two is that a soft reset is much quicker
but may return before the node has been reset because bladehpi relies
on BladeCenter firmware to cycle the node's power, while a hard reset
is slower but guaranteed not to return until the node is dead because
bladehpi powers off the node, waits until it is off, then powers it
on again.

NOTE: Set the OPENHPI_CONF environment variable to contain the
fully-qualified path of the OpenHPI configuration file, for example:

	export OPENHPI_CONF=/etc/openhpi/openhpi.conf

NOTE: If OpenHPI is not configured with --disable-daemon before being
built and installed, make sure that the OpenHPI daemon is running
before using the bladehpi plugin.

NOTE: If debugging of the environment is needed, configure OpenHPI 
with --enable-debuggable and rebuild/reinstall, export 
OPENHPI_DEBUG=YES, and run stonith commands with the -d option.
