On 2/22/12 6:20 PM, Andrew Beekhof wrote:
> On Thu, Feb 23, 2012 at 8:21 AM, William Seligman
> <[email protected]> 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/[email protected]/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...

>> 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. Or perhaps I'm assuming too much; they
may have been written for some other package than Pacemaker 1.1.
-- 
Bill Seligman             | Phone: (914) 591-2823
Nevis Labs, Columbia Univ | mailto://[email protected]
PO Box 137                |
Irvington NY 10533 USA    | http://www.nevis.columbia.edu/~seligman/

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

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

Reply via email to