Hello All,
For the last few days I have been trying to get stonith working with the APC 7900 PDU with very little success. My hope
is that someone out there with more experience in this matter can help.
So here is the problem. It seems that apc stonith support for both telnet and snmp was coded for an older version of
the apc firmware. The current version of stonith is unable to communicate with the APC.
I have tried both the stonith version that was released with heartbeat 1.2 and
2.09 with the same result.
here is debug session using 2.x and telent
hasrv2:~ # stonith -d 1 -t apcmaster -p "192.168.0.42 apc apc" -l
** (process:11202): DEBUG: NewPILPluginUniv(0x604010)
** (process:11202): DEBUG: PILS: Plugin path =
/usr/lib64/stonith/plugins:/usr/lib64/pils/plugins
** (process:11202): DEBUG: NewPILInterfaceUniv(0x605360)
** (process:11202): DEBUG: NewPILPlugintype(0x604040)
** (process:11202): DEBUG: NewPILPlugin(0x604e10)
** (process:11202): DEBUG: NewPILInterface(0x605380)
** (process:11202): DEBUG:
NewPILInterface(0x605380:InterfaceMgr/InterfaceMgr)*** user_data: 0x0 *******
** (process:11202): DEBUG: InterfaceManager_plugin_init(0x605380/InterfaceMgr)
** (process:11202): DEBUG: Registering Implementation manager for Interface
type 'InterfaceMgr'
** (process:11202): DEBUG: PILS: Looking for InterfaceMgr/generic =>
[/usr/lib64/stonith/plugins/InterfaceMgr/generic.so]
** (process:11202): DEBUG: Plugin file
/usr/lib64/stonith/plugins/InterfaceMgr/generic.so does not exist
** (process:11202): DEBUG: PILS: Looking for InterfaceMgr/generic =>
[/usr/lib64/pils/plugins/InterfaceMgr/generic.so]
** (process:11202): DEBUG: Plugin path for InterfaceMgr/generic =>
[/usr/lib64/pils/plugins/InterfaceMgr/generic.so]
** (process:11202): DEBUG: PluginType InterfaceMgr already present
** (process:11202): DEBUG: Plugin InterfaceMgr/generic init function:
InterfaceMgr_LTX_generic_pil_plugin_init
** (process:11202): DEBUG: NewPILPlugin(0x606800)
** (process:11202): DEBUG: Plugin InterfaceMgr/generic loaded and constructed.
** (process:11202): DEBUG: Calling init function in plugin InterfaceMgr/generic.
** (process:11202): DEBUG: NewPILInterface(0x607100)
** (process:11202): DEBUG: NewPILInterface(0x607100:InterfaceMgr/stonith2)***
user_data: 0x606100 *******
** (process:11202): DEBUG: Registering Implementation manager for Interface
type 'stonith2'
** (process:11202): DEBUG: IfIncrRefCount(1 + 1 )
** (process:11202): DEBUG: PluginIncrRefCount(0 + 1 )
** (process:11202): DEBUG: IfIncrRefCount(1 + 100 )
** (process:11202): DEBUG: PILS: Looking for stonith2/apcmaster =>
[/usr/lib64/stonith/plugins/stonith2/apcmaster.so]
** (process:11202): DEBUG: Plugin path for stonith2/apcmaster =>
[/usr/lib64/stonith/plugins/stonith2/apcmaster.so]
** (process:11202): DEBUG: Creating PluginType for stonith2
** (process:11202): DEBUG: NewPILPlugintype(0x607250)
** (process:11202): DEBUG: Plugin stonith2/apcmaster init function:
stonith2_LTX_apcmaster_pil_plugin_init
** (process:11202): DEBUG: NewPILPlugin(0x607c50)
** (process:11202): DEBUG: Plugin stonith2/apcmaster loaded and constructed.
** (process:11202): DEBUG: Calling init function in plugin stonith2/apcmaster.
** (process:11202): DEBUG: NewPILInterface(0x607ca0)
** (process:11202): DEBUG: NewPILInterface(0x607ca0:stonith2/apcmaster)***
user_data: 0x2abb6055d2d0 *******
** (process:11202): DEBUG: IfIncrRefCount(101 + 1 )
** (process:11202): DEBUG: PluginIncrRefCount(0 + 1 )
** (process:11202): DEBUG: Got '\xff'
** (process:11202): DEBUG: Got '\xfb'
** (process:11202): DEBUG: Got '\u0001'
** (process:11202): DEBUG: Got '
'
** (process:11202): DEBUG: Got '\u000d'
** (process:11202): DEBUG: Got 'U'
** (process:11202): DEBUG: Got 's'
** (process:11202): DEBUG: Got 'e'
** (process:11202): DEBUG: Got 'r'
** (process:11202): DEBUG: Got ' '
** (process:11202): DEBUG: Got 'N'
** (process:11202): DEBUG: Got 'a'
** (process:11202): DEBUG: Got 'm'
** (process:11202): DEBUG: Got 'e'
** (process:11202): DEBUG: Got ' '
** (process:11202): DEBUG: Got ':'
** (process:11202): DEBUG: Got ' '
** (process:11202): CRITICAL **: Did not find string Escape character is '^]'.
from APC MasterSwitch.
** (process:11202): CRITICAL **: Received [\xff\xfb\u0001
\u000dUser Name : ]
Here is the same session using 1.x
stonith -t apcmaster -p "192.168.0.42 apc apc" -l
stonith: Successful login to APC MasterSwitch.
stonith: Successful login to APC MasterSwitch.
phase management
outlet management
power supply status
The older version of stonith is able to login but since the CLI command structure has changed the program is unable to
query the device names.
Similar results are obtained with snmp.
Here is the output form the 2.x version
hasrv2:~ # stonith -t apcmastersnmp -p "192.168.0.42 161 gmnhasrv" -l
** (process:11238): CRITICAL **: APC_read: error in response packet, reason 2 [(noSuchName) There is no such variable
name in this MIB.].
** (process:11238): CRITICAL **: apcmastersnmp_set_config: cannot read number
of outlets.
Invalid config info for apcmastersnmp devicestonith: Could not list hosts for
apcmastersnmp.
and from 1.X
hasrv1:~/heartbeat-2.0.8/lib/plugins/stonith # stonith -t apcmastersnmp -p
"192.168.0.42 161 gmnhasrv" -l
stonith: APC_read: error in response packet, reason 2 [(noSuchName) There is no
such variable name in this MIB.].
stonith: APC_parse_config_info: cannot read number of outlets.
stonith: Invalid config info for apcmastersnmp device
stonith: Config info syntax: hostname/ip-address port community
The hostname/IP-address, SNMP port and community string are white-space
delimited.
looking at the source code for the stonith apc snmp plugin I see that the OIDs
are defined as follows
#define OID_IDENT ".1.3.6.1.4.1.318.1.1.4.1.4.0"
#define OID_NUM_OUTLETS ".1.3.6.1.4.1.318.1.1.4.4.1.0"
#define OID_OUTLET_NAMES ".1.3.6.1.4.1.318.1.1.4.5.2.1.3.%i"
#define OID_OUTLET_STATE ".1.3.6.1.4.1.318.1.1.4.4.2.1.3.%i"
#define OID_OUTLET_COMMAND_PENDING ".1.3.6.1.4.1.318.1.1.4.4.2.1.2.%i"
#define OID_OUTLET_REBOOT_DURATION ".1.3.6.1.4.1.318.1.1.4.5.2.1.5.%i"
An smnpwalk shows that the OIDs in the new firmware do not match these. They
are not even close.
hasrv1:~ # snmpwalk -Os -c gmnhasrv -v 1 192.168.0.42
enterprises.318.1.1.12.3.3.1.1.2
enterprises.318.1.1.12.3.3.1.1.2.1 = STRING: "m310pA"
enterprises.318.1.1.12.3.3.1.1.2.2 = STRING: "m310pB"
enterprises.318.1.1.12.3.3.1.1.2.3 = STRING: "Outlet 3"
enterprises.318.1.1.12.3.3.1.1.2.4 = STRING: "Outlet 4"
enterprises.318.1.1.12.3.3.1.1.2.5 = STRING: "Outlet 5"
enterprises.318.1.1.12.3.3.1.1.2.6 = STRING: "Outlet 6"
enterprises.318.1.1.12.3.3.1.1.2.7 = STRING: "hasrv2"
enterprises.318.1.1.12.3.3.1.1.2.8 = STRING: "hasrv1"
I tried downloading and installing the oldest version of the AP7900 firmware I could find at www.apc.com but this still
did not work.
So the question is.... has any one been able to figure out how to make stonith work with newer version of the APC AP7900
PDUs?
or should we just give up, return the APC and purchase a Baytech?
Any help on this matter is greatly appreciated.
Thanks,
--luis
--
Luis Soltero, Ph.D., MCS
Director of Software Development, CTO
Global Marine Networks, LLC
StarPilot, LLC
Tel: 865-379-8723
Fax: 865-681-5017
E-Mail: [EMAIL PROTECTED]
Web: http://www.globalmarinenet.net
Web: http://www.starpilotllc.com
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems