[Openais] CPG - x86 - sparc heterogenous cluster

Wojtek Meler wmeler at wp.pl
Thu Jul 30 05:41:02 PDT 2009


Christine Caulfield pisze:
> If you don't set the nodeid then it defaults to the IP address. But 
> it's then an int, not an IP address, as far as corosync is concerned. 
> The fact that it was an IP address is irrelevant, it's just a way of 
> getting a unique node number.
>
> The error here is in testcpg passing it into inet_ntoa. In many 
> clusters - especially those using the Red Hat stack, the nodeIDs will 
> be small integers, and the output from that will be rubbish.

So nodeid should never be used as IP address as testcpg suggests. I 
think this option should be removed from testcpg.
Attached patch does it.
Other option is to change default value from ip to ntohl(ip) (is it safe?)
and then in clients like testcpg use inet_ntoa(htonl(nodeid)).

Regards,
Wojtek
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: testcpg.patch
Url: http://lists.linux-foundation.org/pipermail/openais/attachments/20090730/db5d741a/attachment.txt 


More information about the Openais mailing list