Bind connections from known local address when using TCP
PATCH 1/1 Bind connections from known local address when using TCP
A common problem occurs when multiple IP addresses within the same subnet are assigned to the same NIC. If we make a connection attempt to another address on the same subnet as one of those addresses, the connection attempt will not necessarily be routed from the address we want.
In the case of the DLM, the other nodes will quickly drop the connection attempt, causing problems.
This patch makes the DLM bind to the local address it acquired from the cluster manager when using TCP prior to making a connection, obviating the need for administrators to "fix" their systems or use clever routing tricks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dlm-lowcomms-tcp-src-upstream.patch
Type: text/x-patch
Size: 1099 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20071025/cc427c3d/attachment.bin>
PATCH 1/1 Bind connections from known local address when using TCP
Quoted 14 lines · Lon Hohberger
A common problem occurs when multiple IP addresses within the same subnet are assigned to the same NIC. If we make a connection attempt to another address on the same subnet as one of those addresses, the connection attempt will not necessarily be routed from the address we want.
In the case of the DLM, the other nodes will quickly drop the connection attempt, causing problems.
This patch makes the DLM bind to the local address it acquired from the cluster manager when using TCP prior to making a connection, obviating the need for administrators to "fix" their systems or use clever routing tricks.
PATCH 1/1 Bind connections from known local address when using TCP
In reply to Lon HohbergerWhoops; sorry for the spam there.
Patch with fixed comments.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dlm-lowcomms-tcp-src-upstream.patch
Type: text/x-patch
Size: 1064 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20071025/eb7e9203/attachment.bin>
Hi,
Quoted 6 lines · Lon Hohberger
A common problem occurs when multiple IP addresses within the same subnet are assigned to the same NIC. If we make a connection attempt to another address on the same subnet as one of those addresses, the connection attempt will not necessarily be routed from the address we want.
Quoted 8 lines
In the case of the DLM, the other nodes will quickly drop the connection attempt, causing problems.
This patch makes the DLM bind to the local address it acquired from the cluster manager when using TCP prior to making a connection, obviating the need for administrators to "fix" their systems or use clever routing tricks.
I'm happy to apply the patch, but I wonder why not just set the prefsrc for the route? That will fix it for all applications not just the DLM. Also if there are multiple NICs in the system with the same IP address set assigned to them, then this solution may fail whereas the prefsrc solution will continue to work as that allows specification of a device too (amoung other things),
Steve.
Quoted 18 lines · Steven Whitehouse
Hi,
Quoted 6 lines · Lon Hohberger
A common problem occurs when multiple IP addresses within the same subnet are assigned to the same NIC. If we make a connection attempt to another address on the same subnet as one of those addresses, the connection attempt will not necessarily be routed from the address we want.
Quoted 8 lines
In the case of the DLM, the other nodes will quickly drop the connection attempt, causing problems.
This patch makes the DLM bind to the local address it acquired from the cluster manager when using TCP prior to making a connection, obviating the need for administrators to "fix" their systems or use clever routing tricks.
Quoted 6 lines
I'm happy to apply the patch, but I wonder why not just set the prefsrc for the route? That will fix it for all applications not just the DLM. Also if there are multiple NICs in the system with the same IP address set assigned to them, then this solution may fail whereas the prefsrc solution will continue to work as that allows specification of a device too (amoung other things),
I think it's appropriate to fix this in the DLM code. DLM doesn't work without it in this situation and there night (possibly!?) be applications that don't want prefsrc setting.
Signature · 1 line
Patrick
Hi,
Quoted 26 lines · Patrick Caulfield
Quoted 18 lines · Steven Whitehouse
Hi,
Quoted 6 lines · Lon Hohberger
A common problem occurs when multiple IP addresses within the same subnet are assigned to the same NIC. If we make a connection attempt to another address on the same subnet as one of those addresses, the connection attempt will not necessarily be routed from the address we want.
Quoted 8 lines
In the case of the DLM, the other nodes will quickly drop the connection attempt, causing problems.
This patch makes the DLM bind to the local address it acquired from the cluster manager when using TCP prior to making a connection, obviating the need for administrators to "fix" their systems or use clever routing tricks.
Quoted 6 lines
I'm happy to apply the patch, but I wonder why not just set the prefsrc for the route? That will fix it for all applications not just the DLM. Also if there are multiple NICs in the system with the same IP address set assigned to them, then this solution may fail whereas the prefsrc solution will continue to work as that allows specification of a device too (amoung other things),
Quoted 4 lines
I think it's appropriate to fix this in the DLM code. DLM doesn't work without it in this situation and there night (possibly!?) be applications that don't want prefsrc setting.
Ok, well I'll put the patch in, but it still sounds very odd to me. If they really need to do different things for different applications then setting the fwmark and doing route by fwmark would be the sensible solution,
Steve.
Quoted 27 lines · Steven Whitehouse
Hi,
Quoted 24 lines · Patrick Caulfield
Quoted 23 lines · Steven Whitehouse
Hi,
Quoted 6 lines · Lon Hohberger
A common problem occurs when multiple IP addresses within the same subnet are assigned to the same NIC. If we make a connection attempt to another address on the same subnet as one of those addresses, the connection attempt will not necessarily be routed from the address we want.
Quoted 8 lines
In the case of the DLM, the other nodes will quickly drop the connection attempt, causing problems.
This patch makes the DLM bind to the local address it acquired from the cluster manager when using TCP prior to making a connection, obviating the need for administrators to "fix" their systems or use clever routing tricks.
I'm happy to apply the patch, but I wonder why not just set the prefsrc for the route? That will fix it for all applications not just the DLM. Also if there are multiple NICs in the system with the same IP address set assigned to them, then this solution may fail whereas the prefsrc solution will continue to work as that allows specification of a device too (amoung other things),
Quoted 8 lines
Quoted 4 lines
I think it's appropriate to fix this in the DLM code. DLM doesn't work without it in this situation and there night (possibly!?) be applications that don't want prefsrc setting.
Ok, well I'll put the patch in, but it still sounds very odd to me. If they really need to do different things for different applications then setting the fwmark and doing route by fwmark would be the sensible solution,
I think the point is that the DLM explicitly checks the source address of incoming connections. The purpose of this is to ensure (to some extent at least!) that it is talking to a known cluster node. If we didn't do this check (and I'm reluctant to take it out) then we could also do without this bind code.
All we're doing here really, is matching the two halves of the connection code up properly.
Patrick