On Thu, Feb 23, 2012 at 11:08 AM, William Seligman
<selig...@nevis.columbia.edu> wrote:
> On 2/22/12 6:20 PM, Andrew Beekhof wrote:
>> On Thu, Feb 23, 2012 at 8:21 AM, William Seligman
>> <selig...@nevis.columbia.edu> wrote:
>>> About a 1.5 years ago, I wrote a fencing agent for Pacemaker 1.0.x; it used 
>>> NUT
>>> to shut down power on a UPS:
>>>
>>> <http://www.mail-archive.com/pacemaker@oss.clusterlabs.org/msg05942.html>
>>>
>>> I'm building a new HA cluster using:
>>>
>>> Scientific Linux 6.2 (kernel 2.6.32)
>>> cman-3.0.12.1
>>> corosync-1.4.1
>>> pacemaker-1.1.6
>>> cluster-glue-1.0.5
>>> clusterlib-3.0.12.1
>>> fence-agents-3.1.5
>>>
>>> My old fencing agent, written in bash, won't work with stonith-ng,
>>
>> What makes you think that?
>
> A number of things: My old script didn't recognize "-o metadata", the XML
> description that Pacemaker expects has changed a bit, and the big one which 
> I'll
> get to just after your response...

The old scripts are never called directly.  We produce metadata
differently for them.

>
>>> so I wrote a replacement in perl.
>>>
>>> After much debugging, the problem appears to be that stonith-admin (or 
>>> whatever
>>> library it's calling) doesn't pass any arguments to the perl script.
>>
>> You know they are passed via stdin?
>
> No, I did not know this! That was the key; thanks Andrew. I've revised my
> script, and it appears to work. I'll have to run some more tests before I 
> post it.
>
>>> I'd post
>>> the script, but it's not necessary, since I see the same problem in any of 
>>> the
>>> perl-scripted fencing agents in /usr/sbin/fence_* from the regular 
>>> fence_agent
>>> package. If I do:
>>>
>>> stonith_admin -M -a fence_scsi
>>> stonith_admin -M -a fence_vmware_helper
>>>
>>> ... I don't see metadata, but a response equivalent to "no argument".
>
> I'll note that none of the authors of the perl-scripted fencing agents knew 
> that
> arguments are passed via stdin either.

I suspect you'll find they also have some magic for reading them from stdin.
Both methods are supported by the agents, although when called from
the cluster, by convention, we only use stdin.

> Or perhaps I'm assuming too much; they
> may have been written for some other package than Pacemaker 1.1.

Right, they were written for cman/rgmanager originally.

> --
> Bill Seligman             | Phone: (914) 591-2823
> Nevis Labs, Columbia Univ | mailto://selig...@nevis.columbia.edu
> PO Box 137                |
> Irvington NY 10533 USA    | http://www.nevis.columbia.edu/~seligman/
>
>
> _______________________________________________
> Linux-HA mailing list
> Linux-HA@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to