On 05/22/2012 05:54 PM, Michael Chapman wrote: > On Tue, 22 May 2012, Dan Frincu wrote: >> Best choice would have been to use the actual IP address in the config >> file, rather than using the network address. This would lead to the >> same effect (bind on the right IP) without having to modify code. This >> is also the recommended way of doing things when having overlapping >> subnets. And, yes, it will always go for the highest numerical IP it >> finds. > > Using the actual IP address in the config doesn't help anything. > Corosync still applies each interface address's network mask to see > whether the address matches, and 192.168.0.1/24 and 192.168.0.0/24 end > up being masked to the same thing. > > Also, it's not necessarily the "highest" IP address; it will just be > whatever address comes last when enumerated by getifaddrs(). As far as I > know, getifaddrs() doesn't guarantee any ordering, so this is > potentially non-deterministic. (On Linux, it seems that the "primary" IP > address for a particular interface will always be enumerated before its > "secondary" IP addresses, however.) > > So this problem still stands: there's no way to tell Corosync to bind to > a particular IP and ignore any other IPs it might see in the same > subnet. And (as my earlier Question 1 mentioned) there seem to be > certain conditions when Corosync might re-evaluate which IP to use > *whilst* it is running. > > totemip_iface_check() could be modified to match on a specific IP if it > matches exactly the value from the config file, and only falling back to > "any IP in the same subnet" if that IP isn't found. Would a patch along > those lines be welcome? > it has done this for about 6-7 years, but I think Honza changed that code recently for 2.0 to make it more readable and portable and possibly didn't test (ie: its a bug). The model is (if .[1-255] match the ip specifically if .0 do the netmask calculation Regards -steve Regards -steve > - Michael > > _______________________________________________ > discuss mailing list > discuss@xxxxxxxxxxxx > http://lists.corosync.org/mailman/listinfo/discuss _______________________________________________ discuss mailing list discuss@xxxxxxxxxxxx http://lists.corosync.org/mailman/listinfo/discuss