-
Notifications
You must be signed in to change notification settings - Fork 368
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
Record Status when EgressIP is not available on any Node incase of static Egress #6228
Comments
Usually Egress with ExternalIPPool should be in same subnet as node's interface, however it is not mandatory case, and ExternalIPPool could also be in different subnet than node's network, However the egress interface and ip will be assigned to egress dummy interface with the given subnet which leads to traffic going via actual node interface which could be in different subnet. In that case, does egress apply to pod if dummy interface is created and down ! |
I think the empty EgressIP and EgressNode already mean the IP is not on any Node, which is everything users need to know?
It's kind of by design and I can't think of how we can make it more friendly. The point of static Egress is that user have full control on the Egress IPs, and none of the agent knows which Node the Egress IP should be on, then how they know when and which agent should update the condition to be False? And the point of the condition is to reduce the ambiguity of empty Node and to distinguish between "agent haven't tried to assign the IP" and "agent fail to assign the IP". For static Egress, I think there is no ambiguity, empty Node just means users the IP isn't assigned to any Node and agents are not going to do anything with it.
This sounds reasonable to me. I'm not sure which behavior is better but we should make them consistent, and perhaps even make the behavior configurable, as some users may expect strict enforcement while some may expect best-effort. |
As rightly pointed by @tnqn, It seems right to me to address this issue as for static egress even though static egress is not applied to any node, pod to external traffic remain unsuccessful , we shld only apply egress to pod when egress ip is available on node, same behaviour as in case of ExternlIPPools, to make it consistent across. |
I am trying to understand what we want to "correct" here. |
This observation is correct in static egress case only. Incase of egress with externalIPPool -
|
In externalIPPool case, egress is populated to In static egress case, |
Thanks for the explanation @Atish-iaf. antrea/pkg/agent/controller/egress/egress_controller.go Lines 1015 to 1025 in a1e0a75
IMO, the one thing really worth doing is prevent Node SNAT (should be configurable, as Quan pointed out) for HA Egress, if the IP cannot be scheduled to any Node. That can help prevent unwanted behavior. Changing anything for static Egress may not be worth it. I don't think that "use Node SNAT for workloads selected by my static Egress until I actually assign the IP to one of the Nodes" is an actual behavior we want to support. It would also require the Egress controller (in the Agent) to consume the Status - in order to determine whether the static Egress IP has been manually assigned to a Node -, which may not be a big deal but this is not something the controller does at the moment (and controllers typically consume the Spec and update the Status). But if we really want to make the behavior consistent, then we would have to consume "prevent Node SNAT for HA Egress if the IP cannot be scheduled to any Node" can probably be addressed pretty easily. In any case @KMAnju-2021, all the changes should be in the Agent ( |
Thanks for the suggestions, i will look into it. |
Describe the problem/challenge you have
In case of static egress, sometimes user may provide EgressIP which isn't assigned to any Node by mistake or EgressIP was later removed from the assigned Node. Currently, there is no useful info for troubleshooting this.
Describe the solution you'd like
It may be useful to provide Status for static Egress case as well like we provide for Egress with externalippool.
Anything else you would like to add?
For Egress with ExternalIPPool, when EgressIP isn't assigned to any Node, Egress is not applied to Pod. Pod to external traffic goes via host NodeIP SNAT (Normal encap mode).
But this is not the case for static Egress, when EgressIP isn't available on any Node, still Egress is applicable to Pod and Pod to external traffic is unsuccessful. We can take reference from egress with externalIPPool and not apply egress to pod until egressIP is available on a Node for static egress as well.
The text was updated successfully, but these errors were encountered: