-
Notifications
You must be signed in to change notification settings - Fork 142
🐛 Fixes leftover podref issue #556
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
🐛 Fixes leftover podref issue #556
Conversation
|
@thomasferrandiz please check |
|
This patch works perfectly on top of version 0.8.0, but it still does not work on the main branch. I would like to ask if it's possible to create a patch release (0.8.1) that includes this fix. Additionally, I tried using Node Slice Fast IPAM since it addresses leader election issues, but instead of helping, it worsened the situation. I have opened an issue explaining the problem: #558. Please take a look. |
I think this is not how it should be. You need to make your fix to the main branch, and once it works, you back-port it to the release branch.
|
but there is no 0.8.0 branch and code changed quite a lot since 0.8.0 with addition of fast ipam node slice, so main will need a different fix. Is there a way to merge just this fix on 0.8.0? I know merging it on main is not going to help, I opened the PR just to share my patch. /hold |
|
I think we should cut a release branch for 0.8 as you're pointing out. @dougbtv could you assist in that? What do you think ? |
yes, that would be great. |
There shouldn't be major changes. The fast ipam node slice was meant to be a optional feature. Just for experimentation purposes. We should aim at fixing master primarily |
It looks like the pod controller is not running at all on |
|
That's a different issue. I'll have a look as well. But that shouldn't be a reason to create a fix for a tag and not in the master branch. |
7bb198a to
bd450af
Compare
Pull Request Test Coverage Report for Build 13952054331Details
💛 - Coveralls |
|
Really appreciate the contrib, and I'm definitely open to making a v0.8.1 and releasing it. However, I'd really appreciate the eye towards getting it fixed against the current master branch. I will add this to the maintainer's agenda for next week (which I will miss, but can follow up subsequently) |
yes, I will try to fix it on the main too. |
|
@mlguerrero12 kindly check this when you get time. |
|
@adilGhaffarDev, I also see that the pod controller is not running on master. Will provide a fix soon |
Thank you. This fix should still be needed. Can we merge this too once you have fixed the pod controller? |
|
yes, I will review and test these changes after we fix master |
|
@adilGhaffarDev, I still need to test some things from the current code, but it seems to me you are not fixing the issue with the leader election (occasional missing of pod names) but some missing data needed in |
When cleanupFunc is called from garbageCollectPodIPs for deallocation, it fails due to improperly initialized client and wbClient in pod.go. Specifically, it fails at leader election. The old code initializes the This PR ensures proper initialization so that leader election and deallocation work correctly: With this fix, cleanupFunc receives correctly initialized parameters, allowing leader election to function properly and ensuring successful deallocation. |
|
I can also see that there are some stuff missing. So, client.clientSet is the k8s client that is already defined but didn't realize until now that client.namespace is not set. So, yes, this one is missing for the leader election part. After that, it calls Your findings are correct. Just wanted to clarify the different sections. Good catch @adilGhaffarDev |
bd450af to
e4bf4f3
Compare
|
@adilGhaffarDev, could you please rebase? |
Signed-off-by: Muhammad Adil Ghaffar <[email protected]>
e4bf4f3 to
2dd0c8f
Compare
done |
|
after the merge of #577 I have tested this PR on main branch and the issue is fixed on main too. |
18d7b92
into
k8snetworkplumbingwg:master
What this PR does / why we need it:
Leader election fails when
IPManagementis called fromgarbageCollectPodIPsinpod.go, this PR fixes theKubernetesIPAMandClientcreation inpod.go, which resolves the leader election issue.Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #483
Special notes for your reviewer (optional):