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
Sidecar Mode detection logic (IPv4, IPv6, Dual) #41271
Comments
@zhlsunshine yeah this is totally fine. What i am talking about is the original function where the discovery happens on all the interfaces. it should be just based on the primary interface, not all the interfaces that the pod have. here is the function, there is a similar function in the iptable root.go as well. |
@abasitt, Yeah, I understand what you are talking about. In fact, according to the current implementation, IPv4 has the higher priority than IPv6 if it's dual stack environment in Istio, Moreover, how to identify the primary interface in Istio is unclear. any idea? |
Thank you @zhlsunshine. Since its working for many people and the issue is happening in unique cases where people use multiple interfaces. we should at least have an option via annotations to exclude interfaces. There is a an option to exclude interface today from IPtable but that still doesn't change the logic of detecting IP address. |
does #41271 (comment) resolve this? |
It doesn't, unless the future roadmap is to have a dualstack as default mode. Even then I am not sure if there will be issues if primary interface is single stack IPv4, secondary interface is single stack IPv6 and the proxy is operating in dual stack mode on both interfaces. |
Signed-off-by: Vasanth Sundaravelu <vasanth.sundaravelu@rakuten.com>
…stio#41271) Signed-off-by: Vasanth Sundaravelu <vasanth.sundaravelu@rakuten.com>
* Add excludeInterfaces support in pilot-agent (#41271) Signed-off-by: Vasanth Sundaravelu <vasanth.sundaravelu@rakuten.com> * [PR feedback changes] Add excludeInterfaces support in pilot-agent (#41271) Signed-off-by: Vasanth Sundaravelu <vasanth.sundaravelu@rakuten.com> * Create 44777.yaml [release notes] Add excludeInterfaces support in pilot-agent Signed-off-by: Vasanth Sundaravelu <vasanth.sundaravelu@rakuten.com> --------- Signed-off-by: Vasanth Sundaravelu <vasanth.sundaravelu@rakuten.com>
Support for excludeInterfaces annotation is added by #44777 . |
@ssuvasanth thank you so much. Tested and it works now with this PR. |
Bug Description
We have single stack IPv6 cluster with 5G workload aka CNF (cloud-native network functions). Some CNFs have more than one network interfaces. Since kubernetes doesn't support multiple network, we use multus to assign multiple network interfaces to pods. The primary interface is always IPv6 because the nature of the cluster is single stack IPv6. The secondary interface can either be IPv4 or IPv6.
If all the interface primary and secondary are IPv6, everything works fine.
If any of the secondary interface is IPv4, the proxy-mode is detected as dual and the proxy start in IPv4 mode.
This may work with dual stack supported branch but this is still a bug and the behavior shouldn't be like this. The proxy mode must be identified based on the primary interface.
I dig deeper in to the code, I can see the function here scan all the interfaces.
Possible solutions.
Version
Additional Information
sleep deployment
2 pods are running and sleep is not which has a secondary macvlan interface.
logs of sleep pod
The proxy logs shows the IPv4 addresses picked from the secondary interface
The listeners started on IPv4 address
The text was updated successfully, but these errors were encountered: