-
Notifications
You must be signed in to change notification settings - Fork 260
fix: [NPM-WIN] ability to reassign Pod associated with Endpoint #1806
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44d97f1 to
468f1d0
Compare
huntergregory
commented
Feb 22, 2023
huntergregory
commented
Feb 22, 2023
ccef902 to
aade8fb
Compare
6166bd1 to
d20fb6c
Compare
123fae7 to
3927fbf
Compare
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
Contributor
Author
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
vakalapa
approved these changes
Mar 8, 2023
rjdenney
pushed a commit
that referenced
this pull request
Mar 13, 2023
* reset acls for pods marked for delete * simplify: remove stalePodKey * add log for associating pod with endpoint * reorganize win dp uts * UTs for issue 1729 (fail because podMarkedForDelete is not used) * update controller mock to use deleted pod metadata * rename podMarkedForDelete to deletedPod * all UTs (noticing edge in ipsetmanager now) * updatePod() works for all sequences * work with updatePodCache and existing controlplane * remove pod delete logic * remove change incorrect comment * fix lint * fix gofumpt * remove changes to dp.go logs/comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #1729. Improves on Pod markedForDelete idea in original commits of #1503 (see 398c99e).
Overview
NPM may incorrectly assign a Pod to an Endpoint. NPM needs to be able to reconcile this.
Scenario
Pod x/a, x/b, and NPM all restart at same time. Pod x/a had IP 10.224.0.1 before restart. Pod x/b has 10.224.0.1 after restart.
NPM can receive the following sequence of events:
Pod x/b create --> Pod x/a create --> Pod x/a delete(considered impossible)Changes
When receiving Pod B event, DP must make sure there are no Pod A ACLs on the Endpoint. Also, DP must not process Pod A events for the same IP afterwards.
Minor Changes
Remove complex, unnecessary stalePodKey logic. Stale Pod Key was designed to handle this (impossible) situation: a Pod's Update event comes in after its Delete event. It is safe to assume that the Pod Controller won't send an Update after a Delete event for the same Pod/IP pair.