[Pacemaker] Arp and configuration advice

Darren.Mansell at opengi.co.uk Darren.Mansell at opengi.co.uk
Wed Sep 9 14:39:17 UTC 2009


> Greetings,
> 
> I have a two webserver/two database server clustered setup. I've got
> ldirector and LVS managed by pacemaker and configured to be able to
run
> on either database machine.
> 
> I know how to disable ARP for the machine not running ldirector,
> unfortunately I'm not sure how to dynamically get the webservers to
> update their ARP cache when ldirector gets moved upon failure.
> 
> Is it possible to set up a service for the two web servers to delete
> the
> ARP cache for the VIP on the event that ldirector gets moved?

The IPaddr2 RA runs send_arp when the start action is called I believe:


#
# Run send_arp to note peers about new mac address
#
run_send_arp() {
        ARGS="-i $ARP_INTERVAL_MS -r $ARP_REPEAT -p $SENDARPPIDFILE $NIC
$BASEIP auto not_used not_used"
        if [ "x$IP_CIP" = "xyes" ] ; then
            if [ x = "x$IF_MAC" ] ; then
                MY_MAC=auto
            else
                MY_MAC=`echo ${IF_MAC} | sed -e 's/://'`
            fi
            ARGS="-i $ARP_INTERVAL_MS -r $ARP_REPEAT -p $SENDARPPIDFILE
$NIC $BASEIP $MY_MAC not_used not_used"
        fi
        ocf_log info "$SENDARP $ARGS"
        case $ARP_BACKGROUND in
        yes)
                ($SENDARP $ARGS || ocf_log err "Could not send
gratuitous arps" &) >&2
                ;;
        *)
                $SENDARP $ARGS || ocf_log err "Could not send gratuitous
arps"
                ;;
        esac
}


So when the VIP is started on another node, other nodes should be
notified the IP has changed hosts. Doesn't it work for you?

> 
> I can build my own OCF script to update the arp cache, that's not an
> issue. I simply don't know how to configure pacemaker to say "Oop. db2
> died. Move ldirector to db1 and tell the webservers to update their
ARP
> cache".
> 
> Any suggestions?
> 
> Thanks in advance!
> 
> Justin
> 

Regards,
Darren




More information about the Pacemaker mailing list