Hi, On Mon, Jul 16, 2012 at 4:18 AM, Anne Blankert <anne.blank...@geodan.nl> wrote: > Hello list, > > I am a newbie playing with heartbeat / pacemaker on ubuntu 12.04 LTS. I > have defined the following resource primitives and switchover/fail-over > works almost fine. > > primitive ip1 ocf:heartbeat:IPaddr2 \ > params ip="10.10.10.2" nic="eth0:0" > local_start_script="/home/user1/ipadded" > primitive ip1arp ocf:heartbeat:SendArp \ > params ip="10.10.10.2" nic="eth0:0" > > The firewall/router in the datacenter does not accept gratuitous ARP > (according to the manual: to prevent ip-spoofing). However, as a > work-around, I have a script that forces the router to reset the arp > table for the virtual ip. How can I tell the crm to run this script when > the IPaddr2 resource is moved? > > I found a parameter "local_start_script" that can be passed to > ocf:IPaddr2, but the IPaddr2 script ignores this parameter. In a post to > this list, a patch to IPaddr2 was proposed, but not accepted. > > primitive ip1 ocf:heartbeat:IPaddr2 \ > params ip="10.10.10.2" nic="eth0:0" \ > local_start_script="/home/geodan/ipadded" > > There also exists the ocf:anything script, but this script expects a > parameter 'binfile' that should point to a deamon, not a one shot script. > > So, is there a simple - best practice - way to run a one-shot script on > switchover / fail-over / fail-back?
Make the script LSB compliant [1], and then add it to the configuration or use the ocf:heartbeat:Dummy to create a RA out of that script. On the long run, the second option might prove more useful, but it depends on your specific requirements. HTH, Dan [1] http://www.linux-ha.org/wiki/LSB_Resource_Agents > > Thanks, > > Anne Blankert > > _______________________________________________ > 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 -- Dan Frincu CCNA, RHCE _______________________________________________ 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