-
Notifications
You must be signed in to change notification settings - Fork 346
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
Enhance Egress support in Traceflow #6125
base: main
Are you sure you want to change the base?
Conversation
70107f9
to
5762c45
Compare
ob.EgressNode = egressNode | ||
ob.EgressNode = egressNodeName | ||
ob.EgressNodeIP = egressNodeIP | ||
ob.SrcPodIP = srcPodIP |
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.
If there is a new field named SrcPodIP
, it doesn't make sense to only set it for Egress observation as the name is very generic.
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.
Yes, the new field name is generic and we can use it for other observations as well. I didn't do it in this PR as it is specific for Egress observations.
When implementing SrcPodIP
for other observations we can have some discussions as well like add DstPodIP
also.
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.
The partial support would look like a bug and confuse users who see it in one scenario but don't see it in another scenario when the field applies to both. We need to think about the whole when adding something generic.
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 can remove SrcPodIP
field from this PR and can implement it in another one with DstPodIP
field and support for other observations as well. We can have more discussions on that if required in separate issue.
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.
Hi @tnqn
I have removed SrcPodIP
field from this PR and I plan to create another PR for SrcPodIP
field for all types of observations after merge of this PR.
PTAL, thanks
5762c45
to
2e2c579
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.
cc @jianjuns and @antoninbas to check their opinions on this new field as well.
} | ||
obEgress := getEgressObservation(true, egressIP, egressName, egressNode) | ||
obEgress := getEgressObservation(true, egressIP, egressName, egressNodeName, c.nodeConfig.NodeIPv4Addr.IP.String()) |
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.
It will panic in a IPv6 cluster.
I don't really understand the value of this field. The Node is already identified by its name, which we include in the observation. |
the egress node IP refers to the IP address of the node through which the egress traffic is routed. Unlike the egress IP, which can be dynamically allocated from a pool, the egress node IP typically corresponds to the IP address of the specific node that handles the egress traffic. In this case, traceflow will be performed from platform managing cluster, more info #6099 |
I still did not get why egress Node IP is useful in the Traceflow results. Node name is not enough for user to identify the Node? |
Node name is enough for user to identify the Node. |
So you meant the intention is for users to know Egress IP is Node IP or not? Why that is useful? |
The Node can have many IP addresses. As I pointed out, this is just one IP address reported by K8s. I would call this IP the management IP, but it can be different from the transport IP, etc. This IP address is never used by the Egress traffic at any point, which is why it doesn't really seem related to the Egress feature in any way? |
As we know Egress IP addresses are used to ensure that traffic from pods to external has a consistent source IP.(Preferably static) |
This is the motivation of the Egress feature, not why Egress Node IP needs to be in Traceflow result.
This is not correct. Static egress IP is not the only solution, any type of egress IP can be the solution. The only difference between HA egress and static egress is how Egress IP is assigned to a Node, by Antrea or by users. In production we always recommend the former as it provides HA.
I don't quite get what the explaination means. The point is, Egress Node IP plays no role in the whole trace and the datapath of such scenario, regardless of whether it's the same as the Egress IP or not. If users encounter an external connectity issue and they trace the packet, they should check whether the Egress IP is whitelisted, and never need to know the Egress Node IP. |
Explained in Egress context since we are doing traceflow and actual packet will egress using egress node ip.
Egress ip can be assigned to a dummy interface, wherein egress node ip will always be the actual interface of node so the information can be helpful in above context. Also in HA case wherein there could be multiple nodes and multiple interfaces(transport and management), in that case egress node ip will be the interface ip where traffic is actually exiting.
when trying to do traceflow with Egress IP where in node interface is not reachable and still traceflow to a destination could work but actual traffic will be blocked due egress node ip interface not reachable . |
I think you mean exiting and not existing? This is not what Quan was referring to when he was talking about Egress HA. Egress HA is the ability to fail over an Egress IP to a different Node if the first Node fails. This requires using ExternalIPPools (as opposed to static Egress IPs). But saying "egress node ip will be the interface ip where traffic is actually exiting" is not correct. The current implementation uses It may be easier to discuss this in person at the next Antrea community meeting if there is confusion. |
@antoninbas , Egress Node IP can be used as the Management IP address of the cluster(not node) ! |
- Add "EgressNodeIP" field in Traceflow observations. - Add "EgressNode" field in observations from Egress Node as well when Egress Node is different from source Node. Previously, "EgressNode" field was available only in observations from source Node. Fixes antrea-io#6099 Signed-off-by: Kumar Atish <kumar.atish@broadcom.com>
2e2c579
to
624173c
Compare
Synced with @tnqn, we may need another way to support this kind of feature, move it to next release. |
@luolanzone , Egress Node IP is relevant wrt management ip of the cluster, however we would like to see the actual traffic path in traceflow |
Add
EgressNodeIP
field in Traceflow observations.Add
EgressNode
field in observations from Egress Node as well when Egress Node is different from source Node. Previously,EgressNode
field was available only in observations from source Node.For #6099