TAPA queries NSM to re-use connection if possible #444
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
TAPA uses a
deterministic
NSM Connection/Segment ID that does not change if connecting to [Conduit, Trench] tuple with the same names from the same application POD.In case NSM connection Close() fails for example on the TAPA side for some reason (or the TAPA container crashes), then requesting a new connection with the same Connection ID will create a second connection in NSM.
Unfortunately, once the "old" connection's token lifetime expires, and NSM orders clean-up, it will trigger a
heal event
in TAPA because of the shared Connection ID.This will lead to unwanted NSM connection
reconnect
. Also, in general having multiple NSM connections that share the same TAPA connection/segment ID is problematic, since IPAM uses that ID as key to track who owns the assigned IPs.fix:
TAPA has been improved to query NSMgr checking if it is aware of a Connection with a particular ID. If it is, the TAPA will re-use that Connection to request a NSM connection towards a particular Conduit. This shall update the connection maintained in NSM, meaning no unexpected reconnect due to duplicated connections.
Issue link
Checklist