-
Notifications
You must be signed in to change notification settings - Fork 127
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
Rebases #180: ip-reconciler: Use ContainerID instead of PodRef #399
base: master
Are you sure you want to change the base?
Conversation
refactored on top of control loop changes by Doug
I understand that the PR changes whereabout to change the identifier of allocation from podRef(Pod namespace/name) to contianer id. So how about to change reconciler and other code to match between Pod and allocation pool, i.e. garbageCollectPodIPs():pkg/controlloop/pod.go? |
Tomo not sure I'm following... This is to change the identifier during reconciliation. Do you mean to change the identifier to pod and allocation pool? I'm probably being dense |
I actually ran this 50 times and got 3 failures... One I believe was a flake with a timeout starting the network controller, and then these two errors:
and
|
whereabouts/pkg/controlloop/pod.go Line 225 in 0d7d2be
|
So, in a discussion with Tomo, he demonstrated that under crio, the containerid doesn't match the pod sandbox, so, this won't work under all runtimes. So we'll need a different approach for having a uniqueid to delete on for all container runtimes. |
I discussed with Tomo, it seems the containerID and sandboxID is the same on openshift with crio (I tested it on 4.14 with this PR applied) |
Let me correct that. ContainerID and sandboxID is different in crio/OpenShift, but @zshi-redhat test/verified that the PR fixes the issue. |
Hi all, I had a look at this and I think this fix is not complete. First of all, the issue happens when within a pool there are 2 entries (different ips) for the same pod reference. When the ip-control-loop runs, the method
Regarding the use of container ID, I think it's a bit weird that the person that wrote
I tested all this in my setup and wrote a unit test as well. Disclaimer: the fake k8sclient do not support to have 2 pods with the same name. Only the last one is stored. Other scenarios were tested by manually changing the order.
@dougbtv , @s1061123 , @zshi-redhat. Please let me know if this makes sense to you. |
@mlguerrero12 I proposed a new PR to address this issue. PTAL. |
This is a (somewhat manual) rebase of #180 --
It looks like it's working in my testing of it, but... I initially had some incorrect keys deleted only sometimes when I was first testing it, and getting the wrong IPs deleted?
So I was getting failures like:
However, with whatever finagling I was doing, those have gone away... Or so I think.
So I've been testing it in a loop to repeat it a bunch of times, like: