[Linux-cluster] Multicast for GFS?

Patrick Caulfield pcaulfie at redhat.com
Mon Aug 9 07:50:40 UTC 2004


On Thu, Aug 05, 2004 at 10:02:52PM +0200, Lazar Obradovic wrote:
> It took some time... 
> 
> Attached is the patch for correcting cman_tool join into ipv4 mcast
> group. 
> 
> Note to ipv6 developers / users: you may also need to set mcast ttl to
> higher value via setsockopt() if you want to have cluster with network
> traversing L3 devices, since linux default ttl is set for local scope
> (ttl = 1), which would make first router drop the packet. 
> 



> --- cluster/cman/cman_tool/join.c       2004-07-23 09:48:16.000000000 +0200
> +++ new-cluster/cman/cman_tool/join.c   2004-08-06 05:59:20.353829392 +0200
> @@ -118,13 +118,22 @@
>         die("Cannot bind multicast address: %s", strerror(errno));
> 
>      /* Join the multicast group */
> -    if (!bcast) {
> +    if (bhe) {
>         struct ip_mreq mreq;
> +       u_char mcast_opt;
> 
>         memcpy(&mreq.imr_multiaddr, bhe->h_addr, bhe->h_length);
> -       memcpy(&mreq.imr_interface, he->h_addr, he->h_length);
> +       mreq.imr_interface.s_addr = htonl(INADDR_ANY);

Can you explain why this should be INADDR_ANY rather than the local IP address?

You also mentioned in another email that the "cman_tool leave" should issue 
a setsockopt to leave the multicast group, does this not happen automatically 
when the socket is closed? If it isn't then cman_tool leave can do this I
suppose. In the case where the cluster software exits without the help of
cman_tool it will be fenced anyway so there shoudn't be a problem :-)

-- 

patrick




More information about the Linux-cluster mailing list