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? > 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? > 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_vmware_scsi > stonith_admin -M -a fence_vmware_helper > > ... I don't see metadata, but a response equivalent to "no argument". If I > display the @ARGV array in my perl script, I see it's empty. > > The python scripts give the correct response. This is a perl problem. > > I found this message: > > <http://oss.clusterlabs.org/pipermail/pacemaker/2010-November/008136.html> > > which suggests the problem is in cluster-glue. Thats only relevant if you're using external/* agents, which you're not anymore IIUC. > I tried downloading and compiling > cluster-glue-1.0.9 (an adventure on an RHEL6.2 system), but the response of > stonith_admin did not change. > > All of the python scripts in /usr/sbin/fence_* include > /usr/share/fence/fencing.py. When I look in there, there doesn't seem to be > any > magical interface wrappers; it uses the python getopts package. What could > cause > the difference between perl and python scripts as stonith-ng sees them, and > how > can I work around it? Stonith-ng has no idea what language your agent it written in. > -- > 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/ > > > _______________________________________________ > Linux-HA mailing list > [email protected] > http://lists.linux-ha.org/mailman/listinfo/linux-ha > See also: http://linux-ha.org/ReportingProblems _______________________________________________ Linux-HA mailing list [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems
