-
Notifications
You must be signed in to change notification settings - Fork 3.4k
cli:connectivity: fix egress dev on aws-cni for pod-to-pod-encryption-v2 #37680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cli:connectivity: fix egress dev on aws-cni for pod-to-pod-encryption-v2 #37680
Conversation
a52b938
to
df8e04b
Compare
/test |
Had to introduce one commit to enable Since we observed a different egress device being selected in our tests when That said, this commit is just for test purpose and won't be merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other then my comment, this looks good.
/test |
33fd562
to
5d6780e
Compare
/test |
5d6780e
to
da63240
Compare
/ci-awscni
Both 🟢, but looking at the debug messages it has always been selected |
/ci-awscni Same in these runs. |
/ci-awscni Hurray! Dropping the last commit then, re-running CI and marking ready-for-review. |
b12bb9f
to
9f58f85
Compare
/test |
latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm really not confortable with the amount of logic introduced here to solve something that should be relatively trivial. Starting a discussion below 👇 to see if there's any other way.
Both actions are 🟢
Removing the 3rd commit and going through the process again. |
32a5ef5
to
c76cfda
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Way easier to review now 🤭
c76cfda
to
0bc9c5d
Compare
This commit adjusts the current logic in `pod-to-pod-encryption-v2` for retrieving the egress device from client-server pods and vice-versa. Before the patch, we solely rely on `ip route get dstIP`, using the returned device as egress. However, we noticed that in aws-cni chaining mode, such returned device is not actually used. Instead, looking at the routing tables in the server node, we found that there's a specific table with a route that uses a different egress device for that particular IP. Therefore, the final command to be issued should be: `ip route get {dstIP} from {srcIP} iif cilium_host`. The interface specified does not matter since, if present, the route matching srcIP is not making use of the interface field to match. The related issue in our previous tests is #37675. We now fix this for pod-to-pod-encryption-v2, but we might want to adopt the same logic for v1. Signed-off-by: Simone Magnani <simone.magnani@isovalent.com>
This commit moves our current parsing logic in pod-to-pod-encryption-v2 from strings to json decode in go structures. This makes our impl a bit more clear. Signed-off-by: Simone Magnani <simone.magnani@isovalent.com>
0bc9c5d
to
8eb0891
Compare
/test |
Partially fixes (only for v2): #37675
Fixes: #37682