Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux-HA: Users

fence_nut fencing agent - use NUT to fence via UPS

 

 

Linux-HA users RSS feed   Index | Next | Previous | View Threaded


seligman at nevis

Mar 1, 2012, 2:37 PM

Post #1 of 5 (912 views)
Permalink
fence_nut fencing agent - use NUT to fence via UPS

After days spent debugging a fencing issue with my cluster, I know for certain
that this fencing agent works, at least for me. I'd like to contribute it to the
Linux HA community.

In my cluster, the fencing mechanism is to use NUT (Network UPS Tools;
<http://www.networkupstools.org/> to turn off power to a node. About 1.5 years
ago, I contributed a NUT-based fencing agent for Pacemaker 1.0:

<http://oss.clusterlabs.org/pipermail/pacemaker/2010-August/007347.html>

That script doesn't work for stonith-ng. So here's a new agent, written in perl,
and tested under pacemaker-1.1.6 and nut-2.4.3.

I know there's a fence_apc_snmp agent that already in resource-agents. However,
that agent only works with APC devices with multiple outlet control; it displays
an error messages when used with my UPSes. This script is for those who'd rather
use NUT than play with SNMP MIBs.

Enjoy!

--
Bill Seligman | Phone: (914) 591-2823
Nevis Labs, Columbia Univ | mailto://seligman [at] nevis
PO Box 137 |
Irvington NY 10533 USA | http://www.nevis.columbia.edu/~seligman/
Attachments: fence_nut (15.1 KB)
  smime.p7s (4.39 KB)


florian at hastexo

Mar 1, 2012, 2:53 PM

Post #2 of 5 (864 views)
Permalink
Re: fence_nut fencing agent - use NUT to fence via UPS [In reply to]

On Thu, Mar 1, 2012 at 11:37 PM, William Seligman
<seligman [at] nevis> wrote:
> That script doesn't work for stonith-ng. So here's a new agent, written in perl,
> and tested under pacemaker-1.1.6 and nut-2.4.3.
>
> I know there's a fence_apc_snmp agent that already in resource-agents. However,
> that agent only works with APC devices with multiple outlet control; it displays
> an error messages when used with my UPSes. This script is for those who'd rather
> use NUT than play with SNMP MIBs.
>
> Enjoy!

I sadly can't help with testing that one as I don't have an APC UPS at
my disposal at this time, but still: w00t! Thanks!

Cheers,
Florian

--
Need help with High Availability?
http://www.hastexo.com/now
_______________________________________________
Linux-HA mailing list
Linux-HA [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


andrew at beekhof

Mar 1, 2012, 3:18 PM

Post #3 of 5 (861 views)
Permalink
Re: fence_nut fencing agent - use NUT to fence via UPS [In reply to]

On Fri, Mar 2, 2012 at 9:37 AM, William Seligman
<seligman [at] nevis> wrote:
> After days spent debugging a fencing issue with my cluster, I know for certain
> that this fencing agent works, at least for me. I'd like to contribute it to the
> Linux HA community.
>
> In my cluster, the fencing mechanism is to use NUT (Network UPS Tools;
> <http://www.networkupstools.org/> to turn off power to a node. About 1.5 years
> ago, I contributed a NUT-based fencing agent for Pacemaker 1.0:
>
> <http://oss.clusterlabs.org/pipermail/pacemaker/2010-August/007347.html>
>
> That script doesn't work for stonith-ng.

It /should/ still work, and I'd be happy to help you figure out why it
doesn't, but thankyou for the updated version :)
I've passed it along to Marek who looks after the fence-agents package/project.

> So here's a new agent, written in perl,
> and tested under pacemaker-1.1.6 and nut-2.4.3.
>
> I know there's a fence_apc_snmp agent that already in resource-agents. However,
> that agent only works with APC devices with multiple outlet control; it displays
> an error messages when used with my UPSes. This script is for those who'd rather
> use NUT than play with SNMP MIBs.
>
> Enjoy!
>
> --
> Bill Seligman             | Phone: (914) 591-2823
> Nevis Labs, Columbia Univ | mailto://seligman [at] nevis
> PO Box 137                |
> Irvington NY 10533 USA    | http://www.nevis.columbia.edu/~seligman/
>
> _______________________________________________
> Linux-HA mailing list
> Linux-HA [at] lists
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
_______________________________________________
Linux-HA mailing list
Linux-HA [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


seligman at nevis

Apr 13, 2012, 2:51 PM

Post #4 of 5 (787 views)
Permalink
Re: fence_nut fencing agent - use NUT to fence via UPS [In reply to]

On 3/1/12 5:37 PM, William Seligman wrote:
> After days spent debugging a fencing issue with my cluster, I know for certain
> that this fencing agent works, at least for me. I'd like to contribute it to the
> Linux HA community.
>
> In my cluster, the fencing mechanism is to use NUT (Network UPS Tools;
> <http://www.networkupstools.org/> to turn off power to a node. About 1.5 years
> ago, I contributed a NUT-based fencing agent for Pacemaker 1.0:
>
> <http://oss.clusterlabs.org/pipermail/pacemaker/2010-August/007347.html>
>
> That script doesn't work for stonith-ng. So here's a new agent, written in perl,
> and tested under pacemaker-1.1.6 and nut-2.4.3.
>
> I know there's a fence_apc_snmp agent that already in resource-agents. However,
> that agent only works with APC devices with multiple outlet control; it displays
> an error messages when used with my UPSes. This script is for those who'd rather
> use NUT than play with SNMP MIBs.

I've made some improvements to the NUT-based fencing agent I contributed before.
The changes are:

- A more rigorous approach to the error codes returned by the agent.

- Added options to delay the times between issuing a poweron/poweroff command
and verifying that the UPS responds.

The revised fence_nut agent is at <http://pastebin.com/sQdqWKQq>.

--
Bill Seligman | Phone: (914) 591-2823
Nevis Labs, Columbia Univ | mailto://seligman [at] nevis
PO Box 137 |
Irvington NY 10533 USA | http://www.nevis.columbia.edu/~seligman/
Attachments: smime.p7s (4.39 KB)


dejanmm at fastmail

Apr 16, 2012, 5:56 AM

Post #5 of 5 (778 views)
Permalink
Re: fence_nut fencing agent - use NUT to fence via UPS [In reply to]

Hi,

On Fri, Apr 13, 2012 at 05:51:09PM -0400, William Seligman wrote:
> On 3/1/12 5:37 PM, William Seligman wrote:
> > After days spent debugging a fencing issue with my cluster, I know for certain
> > that this fencing agent works, at least for me. I'd like to contribute it to the
> > Linux HA community.
> >
> > In my cluster, the fencing mechanism is to use NUT (Network UPS Tools;
> > <http://www.networkupstools.org/> to turn off power to a node. About 1.5 years
> > ago, I contributed a NUT-based fencing agent for Pacemaker 1.0:
> >
> > <http://oss.clusterlabs.org/pipermail/pacemaker/2010-August/007347.html>
> >
> > That script doesn't work for stonith-ng. So here's a new agent, written in perl,
> > and tested under pacemaker-1.1.6 and nut-2.4.3.
> >
> > I know there's a fence_apc_snmp agent that already in resource-agents. However,
> > that agent only works with APC devices with multiple outlet control; it displays
> > an error messages when used with my UPSes. This script is for those who'd rather
> > use NUT than play with SNMP MIBs.
>
> I've made some improvements to the NUT-based fencing agent I contributed before.
> The changes are:
>
> - A more rigorous approach to the error codes returned by the agent.
>
> - Added options to delay the times between issuing a poweron/poweroff command
> and verifying that the UPS responds.
>
> The revised fence_nut agent is at <http://pastebin.com/sQdqWKQq>.

This seems to be a version for RHCS, right? In that case, better
send patches to another mailing list.

Cheers,

Dejan

> --
> Bill Seligman | Phone: (914) 591-2823
> Nevis Labs, Columbia Univ | mailto://seligman [at] nevis
> PO Box 137 |
> Irvington NY 10533 USA | http://www.nevis.columbia.edu/~seligman/
>



> _______________________________________________
> Linux-HA mailing list
> Linux-HA [at] lists
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
_______________________________________________
Linux-HA mailing list
Linux-HA [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Linux-HA users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.