istio: ambient failures in CNI with microk8s on Ubuntu 22.04 possibly due to ipv6 compatibility addresses
Is this the right place to submit this?
- This is not a security vulnerability or a crashing bug
- This is not a question about how to use Istio
Bug Description
I wanted to test Ambient so I updated to 1.22.1 prior to trying and found that pods would get constantly disconnected and reconnected from the network and there was a furious amount of logging, the load on Loki made my system stress hard that it was logging so much.
After enabling Ambient on the namespace being tested the following type of messages were being logged.
Accepting that ipv6 support is in experimental stage I thought you should know anyway as it’s possible the hard failure change between 1.22.0 and 1.22.1 might account for some of this.
It’s been a few days since the last test - I just wanted to be sure I had looked at existing and previous issues plus changes for insight.
Running with stock Calico CNI otherwise - no changes apart from disabling some host internet connectivity (Ubuntu foo) that attempts to do this on all interfaces and produces spurious logged messages related to unreachable peers.
2024-06-09T15:12:59.358527Z error ambient failed to add pod to ipset: test/redis-58db77c5b6-5dl2q failed to add IP ::ffff:10.1.43.8 with and proto 6 to ipset istio-inpod-probes: exist
2024-06-09T15:12:59.358529Z error ambient failed to add pod to ztunnel: failed to add IP ::ffff:10.1.43.8 with and proto 6 to ipset istio-inpod-probes: exist
2024-06-09T15:12:59.358531Z error ambient Failed to handle add event: failed to add IP ::ffff:10.1.43.8 with and proto 6 to ipset istio-inpod-probes: exist
2024-06-09T15:12:59.358625Z error cni istio-cni cmdAdd failed to signal node Istio CNI agent: unable to push CNI event, error was 500
2024-06-09T15:12:59.358662Z error cni istio-cni cmdAdd error: unable to push CNI event, error was 500
2024-06-09T15:12:59.358667Z error cni istio-cni failed with: unable to push CNI event, error was 500
2024-06-09T15:12:59.377452Z info ambient in pod mode - adding pod test/hop-b-7b79c8f74b-8jsfk to ztunnel
2024-06-09T15:12:59.377548Z error ambient failed adding pod hop-b-7b79c8f74b-8jsfk to ipset istio-inpod-probes with ip ::ffff:10.1.43.45, error was failed to add IP ::ffff:10.1.43.45 with and proto 6 to ipset istio-inpod-probes: exist
For reference I have been running Istio for some time on this environment using sidecars with no problem and with CNI enabled using the overrides for the folder mentioned in the microk8s note ala…
cni:
cniBinDir: /var/snap/microk8s/current/opt/cni/bin
cniConfDir: /var/snap/microk8s/current/args/cni-network
Version
andrews@AndrewsiMac ~ % istioctl version
client version: 1.22.1
control plane version: 1.22.1
data plane version: 1.22.1 (10 proxies)
andrews@AndrewsiMac ~ % kubectl version
Client Version: v1.29.2
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.29.4
andrews@AndrewsiMac ~ %
Additional Information
n/a at present as my mesh is back without Ambient but can post if necessary when experiencing the problem. I couldn’t risk leaving this enabled due to the write load the logging was creating.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 45 (24 by maintainers)
Commits related to this issue
- cni: auto-detect partial IPv6 support Fixes issue in https://github.com/istio/istio/issues/51622#issuecomment-2188233310 — committed to howardjohn/istio by howardjohn 2 years ago
- cni: auto-detect partial IPv6 support Fixes issue in https://github.com/istio/istio/issues/51622#issuecomment-2188233310 — committed to howardjohn/istio by howardjohn 2 years ago
- cni: auto-detect partial IPv6 support (#51712) Fixes issue in https://github.com/istio/istio/issues/51622#issuecomment-2188233310 — committed to istio/istio by howardjohn 2 years ago
I reproduced it. on master, same EKS setup, with non-distroless images for debugging.
failed to update POD inpod: default/shell-56bd5dbdbf-jxntr failed to add route: permission deniedNo, #52127 has to do with startup and the ipset being there in the first place.
This issue is happening well after that, on ip insertion.
@laiminhtrung1997 can you open a new issue please, what you are seeing doesn’t seem related to ipv6 at all.
Dear @howardjohn I am using istio 1.22.3 but the issue related to ipv6 still occurs. The cluster is working normally until I scale in the AWS Auto Scaling Group (ASG) at night when not using it, then I scale out the ASG in the morning, and all the pods are not running with this message
The logs from istio-cni-node
Is this something that can be solved by just disabling V6 entirely, and taking an updated ztunnel dev build that actually supports fully disabling V6?
The latter is the only piece we didn’t have until very recently when @howardjohn added it.
That’s correct - there is no IPv6 support in 1.22 AFAIK by design, because it’s not stable or (more importantly) covered with automated testing yet. Non-ipv6 fixes have been backported.
At least in
istio-cniwe take some pains to always un map them IIRC, so if we have a problem it’s likely just V6 itself.Technically you can simply use
gcr.io/istio-testing/...:latestbut there may have been changes to the install charts, so its best to do the whole thing. In this specific case, there have been changes to the charts and some of the bug fixes are in CNI not ztunnel.Ok so based on all the info here I think all the issues are fixed. @bleggett is working to backport from master to 1.22. Anyone seeing these issues can try out the
masterbuilds (https://github.com/istio/istio/wiki/Dev Builds) to verify. Please LMK if there are any issues unfixed onmasterOk this got me down the wrong path thinking it was IPv6-mapped-IPv4 that is the issue. This is actually https://github.com/istio/istio/pull/51429 I think, which also cleared up the confusing logs
This also applies to the original issue I believe
I’m planning to try to reproduce this on Monday, but in the meantime if someone can show the pod.status.podIps on the pod and maybe
ip -j addrit would be good. Trying to understand if the platform is literally providing these v4-in-v6 addresses or if we are accidentally mapping them. I suspect the latter based on another bug I am tracking down