Andreas, > Pacemaker also sends the cluster node name to fence to the stonith > agent, that is interpreted as "port". I am sure you read the description > about how to use this agent and how it tries to find the correct EC2 > instance name to fence, using the node name.
Yes, I read and believe I understand what little documentation exists in the source code (shell script) itself. If there is additional documentation somewhere, likely I've missed it somehow. I'm not new to shell scripting so I can see how the script obtains the actual EC2 instance name given the "port" variable. That's not a problem. I do believe there is an issue however with the script receiving the port/node information in my configuration. Here's a snip from /var/log/cluster/corosync.log: Oct 08 20:34:06 [26569] node1 stonith-ng: error: log_operation: ec2-fencing: Required parameter 'INSTANCE' missing (-h for usage) That "instance" parameter is calculated from "port", which seems to be empty - not passed from Pacemaker. I also modified the fence_ec2 script to echo the port variable to a text file and confirmed that it is indeed empty. I'm sure there are others using fence_ec2 so I attribute this issue to my configuration somewhere... I just need to hone in on where I goofed the configuration. Everything seems to be working great, except for stonith. -Kevin On Mon, Oct 8, 2012 at 4:17 PM, Andreas Kurz <[email protected]> wrote: > On 10/08/2012 10:44 PM, Kevin F. La Barre wrote: > > Thank you Andreas, your input does further my understanding of how this > is > > supposed to work; however, I'm still unclear about your statement "where > > the nodenames are sent as "port" parameter". Specifically, how is the > port > > parameter passed from Pacemaker to the fencing script? Should "port" be > > specified in the primitive declaration, and if so, since it's dynamic we > > cannot simply set it to a static node-name, right? Also, if you look at > > the code for fence_ec2 provided in the link within my original email the > > port variable is essentially empty, port="". If we leave this empty the > > script will never receive the node name, but we cannot statically > populate > > the variable. I would think that node A or node B would be the ones > > fencing Node C. Node C after-all may not be able to communicate. > > Pacemaker also sends the cluster node name to fence to the stonith > agent, that is interpreted as "port". I am sure you read the description > about how to use this agent and how it tries to find the correct EC2 > instance name to fence, using the node name. > > Regards, > Andreas > > > > > > The above comes from the fact that the node/port is not being passed in > my > > configuration for some reason. I'm seeing errors to the effect that > > "INSTANCE" (the ec2 instance, aka port) is not being specified. > > > > Any help is much appreciated! > > > > > > Respectfully, > > Kevin > > > > > > On Mon, Oct 8, 2012 at 2:10 PM, Andreas Kurz <[email protected]> > wrote: > > > >> On 10/06/2012 08:45 AM, Kevin F. La Barre wrote: > >>> I'm trying to get the fence_ec2 agent (link below) working and a bit > >>> confused on how it should be configured. I have modified the agent > with > >>> the EC2 key and cert, region, etc. The part of confused about is the > >>> "port" argument and how it's supposed to work. Am I supposed to > hardcode > >>> the uname into the "port" variable or is this somehow passed into the > >>> script as an argument? If I hardcode it, I don't understand how > >> Pacemaker > >>> passes on the information as to which node to kill. Versions and > config. > >>> details follow. > >>> > >>> I apologize if this has been vague. Please let me know if you need > more > >>> information. > >>> > >>> Fencing agent: > >>> > >> > https://github.com/beekhof/fence_ec2/blob/392a146b232fbf2bf2f75605b1e92baef4be4a01/fence_ec2 > >>> > >>> crm configure primitive ec2-fencing stonith::fence_ec2 \ > >>> params action="reboot" \ > >>> op monitor interval="60s" > >> > >> try something like: > >> > >> primitive stonith_my-ec2-nodes stonith:fence_ec2 \ > >> params ec2-home="/root/.ec2" pcmk_host_check="static-list" > >> pcmk_host_list="myec2-01 myec2-02" \ > >> op monitor interval="600s" timeout="300s" \ > >> op start start-delay="30s" interval="0" > >> > >> > >> ... where the nodenames are sent as "port" paramter. > >> > >> Regards, > >> Andreas > >> > >> -- > >> Need help with Pacemaker? > >> http://www.hastexo.com/now > >> > >>> > >>> Corosync v1.4.1 > >>> Pacemaker v1.1.7 > >>> CentOS 6.2 > >>> > >>> -Kevin > >>> _______________________________________________ > >>> 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 > >> > > _______________________________________________ > > Linux-HA mailing list > > [email protected] > > http://lists.linux-ha.org/mailman/listinfo/linux-ha > > See also: http://linux-ha.org/ReportingProblems > > > > > -- > Need help with Pacemaker? > http://www.hastexo.com/now > > > > _______________________________________________ > 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
