Skip to content
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

endpoint: Skip waiting-to-regenerate -> waiting-for-identity state transitions #16271

Merged
merged 1 commit into from May 27, 2021

Conversation

jrajahalme
Copy link
Member

@jrajahalme jrajahalme commented May 21, 2021

Regeneration logic fails if waiting-for-identity changes to ready state in a scenario like this:

builder: ready -> waiting-to-regenerate
..
label change etc: waiting-to-regenerate -> waiting-for-identity
..
labels resolved: waiting-for-identity -> ready
..
builder: (ready) -> regenerating (FAILS as this is not expected)

Resolve this by giving precedence to the waiting-to-regenerate state
over the waiting-for-identity state. Compensate for possibly blocking
this state change in Cilium endpoint PATCH API.

Signed-off-by: Jarno Rajahalme jarno@isovalent.com

Fixed bug causing policy realization being skipped in some scenarios with endpoint identity churn.

@jrajahalme jrajahalme added kind/bug This is a bug in the Cilium logic. sig/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages. release-note/bug This PR fixes an issue in a previous release of Cilium. labels May 21, 2021
@jrajahalme jrajahalme requested a review from a team as a code owner May 21, 2021 18:29
@jrajahalme jrajahalme requested a review from aditighag May 21, 2021 18:29
@jrajahalme jrajahalme force-pushed the endpoint-fix-state-transition branch from 75d612d to cee6c1d Compare May 21, 2021 18:30
@jrajahalme
Copy link
Member Author

test-me-please

@jrajahalme jrajahalme force-pushed the endpoint-fix-state-transition branch from cee6c1d to f5b3b15 Compare May 21, 2021 18:46
@jrajahalme
Copy link
Member Author

test-me-please

@jrajahalme
Copy link
Member Author

test-1.21-4.9 hit by known flake #14959

@jrajahalme
Copy link
Member Author

test-1.21-4.9

Regeneration logic fails if waiting-for-identity changes to ready
state in a scenario like this:

  builder: ready -> waiting-to-regenerate
  ..
  label change etc: waiting-to-regenerate -> waiting-for-identity
  ..
  labels resolved: waiting-for-identity -> ready
  ..
  builder: (ready) -> regenerating (FAILS as this is not expected)

Resolve this by giving precedence to the waiting-to-regenerate state
over the waiting-for-identity state.  Compensate for possibly blocking
this state change in Cilium endpoint PATCH API.

Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
@jrajahalme jrajahalme force-pushed the endpoint-fix-state-transition branch from f5b3b15 to 82d21d1 Compare May 21, 2021 23:32
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from master in 1.9.8 May 21, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from master in 1.8.11 May 21, 2021
@jrajahalme
Copy link
Member Author

test-me-please

@jrajahalme
Copy link
Member Author

test-1.21-4.9 hit by known flake #14959

@jrajahalme
Copy link
Member Author

test-1.21-4.9

@jrajahalme
Copy link
Member Author

test-1.16-netnext hit by known flake #13853

@jrajahalme
Copy link
Member Author

test-1.16-netnext

@jrajahalme jrajahalme added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label May 26, 2021
@michi-covalent
Copy link
Contributor

ci-aks

@kaworu kaworu merged commit 1e5f74d into cilium:master May 27, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from master to Backport pending to v1.9 in 1.9.8 May 27, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Backport pending to v1.9 to Backport done to v1.9 in 1.9.8 May 27, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Backport pending to v1.9 to Backport done to v1.9 in 1.9.8 May 27, 2021
@qmonnet qmonnet mentioned this pull request Jun 1, 2021
23 tasks
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from master to Backport pending to v1.8 in 1.8.11 Jun 10, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from master to Backport pending to v1.8 in 1.8.11 Jun 10, 2021
@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Backport pending to v1.8 to Needs backport from master in 1.8.11 Jun 14, 2021
@aditighag
Copy link
Member

The backport labels weren't correctly set after the backport commits were re-added - #16497 (comment). Updating the labels manually.

@maintainer-s-little-helper maintainer-s-little-helper bot moved this from Needs backport from master to Backport done to v1.8 in 1.8.11 Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug This is a bug in the Cilium logic. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/bug This PR fixes an issue in a previous release of Cilium. sig/datapath Impacts bpf/ or low-level forwarding details, including map management and monitor messages.
Projects
No open projects
1.8.11
Backport done to v1.8
1.9.8
Backport done to v1.9
Development

Successfully merging this pull request may close these issues.

None yet

8 participants