[Linux-cluster] New APC agent

Eric Kerin eric at bootseg.com
Tue May 16 18:17:12 UTC 2006

On Thu, 2006-04-20 at 17:16 -0400, James Parsons wrote:
> Hello all,
> This is an snmp based fence agent for APC power switches to be used
> with RHEL4 Red Hat Cluster Suite.
> Please let me know how this agent works.
I finally got around to trying it out with my hardware, and wasn't able
to get it working as a fence agent.  I tracked it down to two problems
in the script when reading the commands from stdin.

1. Never parses the port parameter
2. Needs to trim the newline from each parameter read from stdin for the
snmpset command to work properly.

The attached patch cleared it up for me (please excuse any coding or
style mistakes, first time coding in Python)  I've also included the
relevant sections of my cluster.conf, just for completeness sake.

Once I made these changes it worked quite well on my APC 7900's.  And
now I can rename the outlets to descriptive names instead of "outlet

Now on to comments: 
It would be nice to be able to set the community via the cluster.conf
file, right now it's hard coded in the fence agent to private.

Eric Kerin
eric at bootseg.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: fence_apc_snmp-fixstdin.patch
Type: text/x-patch
Size: 661 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/linux-cluster/attachments/20060516/9907603d/attachment.bin>
-------------- next part --------------
                <clusternode name="auhjpsn01a" votes="1">
                                <method name="1">
                                        <device name="AUHAPC01a" port="1" option="off"/>
                                        <device name="AUHAPC01b" port="1" option="off"/>
                                        <device name="AUHAPC01a" port="1" option="on"/>
                                        <device name="AUHAPC01b" port="1" option="on"/>
                <clusternode name="auhjpsn01b" votes="1">
                                <method name="1">
                                        <device name="AUHAPC01a" port="2" option="off"/>
                                        <device name="AUHAPC01b" port="2" option="off"/>
                                        <device name="AUHAPC01a" port="2" option="on"/>
                                        <device name="AUHAPC01b" port="2" option="on"/>
        <cman expected_votes="1" two_node="1"/>
                <fencedevice agent="fence_apc_snmp" ipaddr="XXX.XXX.XXX.205" login="" name="AUHAPC01a" passwd=""/>
                <fencedevice agent="fence_apc_snmp" ipaddr="XXX.XXX.XXX.206" login="" name="AUHAPC01b" passwd=""/>

More information about the Linux-cluster mailing list