On Tue, Jan 11, 2011 at 08:58:00AM +1300, Todd Nine wrote: > Hi Dejan, > I don't need the ip itself of the node. That is stored elsewhere. > Essentially, when the node becomes the master node (in 3 or more nodes), > I will execute the following script. > > 1. Get my instance id from ec2 > 2. Read the public elastic ip from the file /etc/ec2/elasticip. Note > this is not the node's internal ip, rather the external ip I need to map > 3. Call the ec2 api and pass my instance id and the elastic ip so it > gets mapped to the current instance. > > I only want to execute this script on the leader node when it becomes > the leader. Make sense?
No. The "leader" or "DC" in crm/pacemaker speak is not necessarily the one running the resources. (BTW, I think in heartbeat ccm speak, there in fact is node state called "leader", but it has nothing to do with what you seem to think, and not much to do with the DC either) The DC is just the node that _decides_ where to run resources. What you probably should do is write your own resource agent that does whatever you need to do, and have your other resources depend on that one. -- : Lars Ellenberg : LINBIT | Your Way to High Availability : DRBD/HA support and consulting http://www.linbit.com DRBD® and LINBIT® are registered trademarks of LINBIT, Austria. _______________________________________________ Linux-HA mailing list [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems
