<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>Re: [Linux-cluster] CS4 / U2/U3/U4/ problem about cluster_idgeneration</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>If you stick to the numerical cluster I'd and just use a more robust hash alg you should be fine...<BR>
<BR>
 -----Original Message-----<BR>
From:   Patrick Caulfield [<A HREF="mailto:pcaulfie@redhat.com">mailto:pcaulfie@redhat.com</A>]<BR>
Sent:   Mon Dec 11 02:42:24 2006<BR>
To:     linux clustering<BR>
Subject:        Re: [Linux-cluster] CS4 / U2/U3/U4/ problem about cluster_idgeneration<BR>
<BR>
Alain Moulle wrote:<BR>
> Hi<BR>
><BR>
> There is a problem of unicity of cluster_id :<BR>
><BR>
> I have a big configuration with lots of CS4 clusters in pairs.<BR>
> The cluster_names are such as :<BR>
> iocell1 for first pair<BR>
> iocell2 for 2nd one<BR>
> ...<BR>
><BR>
> Naming is automatic as there are lots of HA node pairs.<BR>
><BR>
> ok, now let's take the cluster iocell13 and iocell21 and the<BR>
> algorythm in cnxman.c :<BR>
><BR>
> static uint16_t generate_cluster_id(char *name)<BR>
> {<BR>
>         int i;<BR>
>         int value = 0;<BR>
><BR>
>         for (i=0; i<strlen(name); i++) {<BR>
>                 value <<= 1;<BR>
>                 value += name[i];<BR>
>         }<BR>
>         return value & 0xFFFF;<BR>
> }<BR>
><BR>
> For iocell13 :<BR>
> [[[[[[["i"/0x69]*2+"o"/0x6f]*2+"c"/0x63]*2+"e"/0x65]*2+"l"/0x6c]*2+&qu<BR>
> ot;l"/0x6c]*2+"1"/0x31]*2+"3"/0x33 == 0x6895 == 26773).<BR>
><BR>
> and for iocell21:<BR>
> [[[[[[["i"/0x69]*2+"o"/0x6f]*2+"c"/0x63]*2+"e"/0x65]*2+"l"/0x6c]*2+&qu<BR>
> ot;l"/0x6c]*2+"2"/0x32]*2+"1"/0x31 == 0x6895 == 26773).<BR>
><BR>
> so we have two identical cluster_id for two different cluster<BR>
> (based on cluster names).<BR>
><BR>
> So there is problem because a node denies/un-acks the joins since the same<BR>
> "cluster-id" is claimed but with an other Cluster name also checked<BR>
><BR>
> I've checked that algorythm has not been modified since U2 , and therefore<BR>
> the problem remains for sure with U4.<BR>
><BR>
> Any idea to solve it for sure ?<BR>
<BR>
Not really, sorry.<BR>
<BR>
It's unlikely to change in the future for RHEL4 because that would break backwards compatibility.<BR>
<BR>
--<BR>
<BR>
patrick<BR>
<BR>
--<BR>
Linux-cluster mailing list<BR>
Linux-cluster@redhat.com<BR>
<A HREF="https://www.redhat.com/mailman/listinfo/linux-cluster">https://www.redhat.com/mailman/listinfo/linux-cluster</A><BR>
</FONT>
</P>

</BODY>
</HTML>