[Pacemaker] active-active in KVM env

Clark Kent clark_kent_6984 at yahoo.com
Thu Aug 1 13:58:31 UTC 2013


Hi All,
I have a problem with creating active-active Apache cluster based on 2 VM guests inside one KVM physical host.


My environment and configuration is:

1. VM1 : aa-node1 : 10.0.0.243 (eth0)

2. VM2: aa-node2 : 10.0.0.213 (eth0)
3. VIP: 10.0.0.210

4. KVM Host: host: 10.0.0.1 (virbr1)


I followed by Cluster from scratch document and I think I did everything correctly. Please take a look:

# crm_mon -1

Last updated: Thu Aug  1 15:38:58 2013
Last change: Thu Aug  1 15:06:16 2013 via crm_attribute on aa-node1
Stack: classic openais (with plugin)
Current DC: aa-node1 - partition with quorum
Version: 1.1.8-7.el6-394e906
2 Nodes configured, 2 expected votes
4 Resources configured.


Online: [ aa-node1 aa-node2 ]

 Clone Set: ClusterIP-clone [ClusterIP] (unique)
     ClusterIP:0    (ocf::heartbeat:IPaddr2):    Started aa-node1
     ClusterIP:1    (ocf::heartbeat:IPaddr2):    Started aa-node2
 Clone Set: WebSite-clone [WebSite]
     Started: [ aa-node1 aa-node2 ]

VIP is assigned across two KVM guests:
# pcs resource show ClusterIP
Resource: ClusterIP
  ip: 10.0.0.210
  cidr_netmask: 32
  clusterip_hash: sourceip
  notify: true
  interleave: true
  op monitor interval=30s


# ip a s on aa-node1:
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 52:54:00:50:a3:d1 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.243/24 brd 10.0.0.255 scope global eth0
    inet 10.0.0.210/32 brd 10.0.0.210 scope global eth0
    inet6 fe80::5054:ff:fe50:a3d1/64 scope link 
       valid_lft forever preferred_lft forever

# ip a s on aa-node2:
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 52:54:00:f2:a0:76 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.213/24 brd 10.0.0.255 scope global eth0
    inet 10.0.0.210/32 brd 10.0.0.210 scope global eth0
    inet6 fe80::5054:ff:fef2:a076/64 scope link 
       valid_lft forever preferred_lft forever


[root at aa-node1 and node2 ~]# iptables -L 
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
CLUSTERIP  all  --  anywhere             10.0.0.210          CLUSTERIP hashmode=sourceip clustermac=2F:4F:C4:64:A1:8F total_nodes=2 local_node=2 hash_init=0


Apache is running on both nodes.

When I run simple ping command from KVM host or another VM inside kvm host it's simple not working:
ping -c 1 10.0.0.210
PING 10.0.0.210 (10.0.0.210) 56(84) bytes of data.

--- 10.0.0.210 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 10000ms


Probably it is bridge problem at KVM host side, something wrong with ARP. Do you agree with me? After the research I found, that when I run:

/usr/lib64/heartbeat/send_arp -i 200 -r 5 -p /var/run/heartbeat/rsctmp/send_arp-10.0.0.210 eth0 10.0.0.210 2f4fc464a18f not_used not_used


on one of the nodes, the VIP:10.0.0.210 is accessible, I can connect to the Apache, but only for a few seconds.


How to resolve the problem? Any hint? Thank you in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20130801/f7a4e2cf/attachment-0003.html>


More information about the Pacemaker mailing list