8000 Endpoint/CEP Ownership Fix by tommyp1ckles · Pull Request #21768 · cilium/cilium · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Endpoint/CEP Ownership Fix #21768

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

Conversation

tommyp1ckles
Copy link
Contributor
@tommyp1ckles tommyp1ckles commented Oct 17, 2022

Fixes: #19931

Fix bugs where ciliumendpoints for statefulset pods where being incorrectly overwritten/deleted

@m
8000
aintainer-s-little-helper
Copy link

Commit 675c00e91ba2c5e7f6c65bc86dc04ba3b643f407 does not contain "Signed-off-by".

Please follow instructions provided in https://docs.cilium.io/en/stable/contributing/development/contributing_guide/#developer-s-certificate-of-origin

@maintainer-s-little-helper maintainer-s-little-helper bot added dont-merge/needs-sign-off The author needs to add signoff to their commits before merge. dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. labels Oct 17, 2022
@tommyp1ckles tommyp1ckles changed the title wip Endpoint/CEP Ownership Fix Oct 17, 2022
@tommyp1ckles tommyp1ckles changed the title Endpoint/CEP Ownership Fix WIP: Endpoint/CEP Ownership Fix Oct 17, 2022
@github-actions
Copy link

This pull request has been automatically marked as stale because it
has not had recent activity. It will be closed if no further activity
occurs. Thank you for your contributions.

@github-actions github-actions bot added stale The stale bot thinks this issue is old. Add "pinned" label to prevent this from becoming stale. and removed stale The stale bot thinks this issue is old. Add "pinned" label to prevent this from becoming stale. labels Nov 17, 2022
@tommyp1ckles tommyp1ckles force-pushed the pr/tommyp1ckles/cep-endpoint-sync-ownership-bug branch from 675c00e to a40b0b0 Compare November 22, 2022 06:27
@maintainer-s-little-helper maintainer-s-little-helper bot removed the dont-merge/needs-sign-off The author needs to add signoff to their commits before merge. label Nov 22, 2022
@tommyp1ckles
Copy link
Contributor Author

/test

@tommyp1ckles
Copy link
Contributor Author

/test-1.25-net-next

@tommyp1ckles tommyp1ckles force-pushed the pr/tommyp1ckles/cep-endpoint-sync-ownership-bug branch 2 times, most recently from 17fc9d0 to dcf9db8 Compare November 22, 2022 19:59
@tommyp1ckles tommyp1ckles changed the title WIP: Endpoint/CEP Ownership Fix Endpoint/CEP Ownership Fix Nov 22, 2022
@tommyp1ckles
Copy link
Contributor Author

/test

@tommyp1ckles tommyp1ckles force-pushed the pr/tommyp1ckles/cep-endpoint-sync-ownership-bug branch 2 times, most recently from 244455c to cf4705c Compare November 23, 2022 05:22
@tommyp1ckles tommyp1ckles marked this pull request as ready for review November 23, 2022 05:27
@tommyp1ckles tommyp1ckles requested review from a team as code owners November 23, 2022 05:27
@tommyp1ckles
Copy link
Contributor Author

/test

@tommyp1ckles tommyp1ckles force-pushed the pr/tommyp1ckles/cep-endpoint-sync-ownership-bug branch from cf4705c to 5a070c2 Compare November 23, 2022 06:12
@tommyp1ckles
Copy link
Contributor Author

/test

@tommyp1ckles tommyp1ckles force-pushed the pr/tommyp1ckles/cep-endpoint-sync-ownership-bug branch from 5a070c2 to 8d94b91 Compare November 23, 2022 16:19
@tommyp1ckles tommyp1ckles removed the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Nov 23, 2022
@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Nov 23, 2022
@tommyp1ckles
Copy link
Contributor Author

/test

@aanm
Copy link
Member
aanm commented Jan 10, 2023

@aanm Can we backport these changes?

@tommyp1ckles let's do it for 1.13 and 1.12 for now /cc @joestringer

This is intended to prevent endpoints from overwriting ciliumendpoints
that have the same name but are being managed by a new endpoint sync.

This can occur because endpointsynchronizer controllers can overlap when
restarting a statefulset (i.e. two CEPs will have the same namespace
and name as each other).

By adding an operation for patching the UID, this ensures that only
endpoints with the UID of the current CEP in apiserver will be able
to successfully mutate the CEP status. All other requests will be
rejected due to the immutability constraint on UID.

Fixes: cilium#19931

Signed-off-by: Tom Hadlaw <tom.hadlaw@isovalent.com>
This change adds writing the CiliumEndpoint UID to an endpoints restore.
CiliumEndpoint UID is not currently written alongside the stored restore data.
This can cause problems related to ambiguous ownership of CEPs by endpoint synchronizers.

Signed-off-by: Tom Hadlaw <tom.hadlaw@isovalent.com>
Prevents endpointsynchronizer from taking ownership and managing
ciliumendpoints, except in the case of endpoint restore where the
ciliumendpoint is on the same node as the agent.
This fixes bugs related to two endpointsynchronizers running for
pods of the same name (i.e. as can happen in the case of Stateful sets).

Fixes: cilium#19931

Signed-off-by: Tom Hadlaw <tom.hadlaw@isovalent.com>
Signed-off-by: Tom Hadlaw <tom.hadlaw@isovalent.com>
@tommyp1ckles tommyp1ckles force-pushed the pr/tommyp1ckles/cep-endpoint-sync-ownership-bug branch from 3306def to eabb193 Compare January 10, 2023 22:18
@tommyp1ckles
Copy link
Contributor Author

/test

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Jan 11, 2023
@aditighag aditighag merged commit aad0927 into cilium:master Jan 11, 2023
@aanm aanm added backport-done/1.12 The backport for Cilium 1.12.x for this PR is done. and removed backport-pending/1.12 labels Jan 17, 2023
@aanm aanm mentioned this pull request Jan 18, 2023
30 tasks
@ldelossa ldelossa added backport-done/1.13 The backport for Cilium 1.13.x for this PR is done. and removed backport-pending/1.13 labels Jan 18, 2023
@tommyp1ckles tommyp1ckles added the backport/author The backport will be carried out by the author of the PR. label Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/author The backport will be carried out by the author of the PR. backport-done/1.12 The backport for Cilium 1.12.x for this PR is done. backport-done/1.13 The backport for Cilium 1.13.x for this PR is done. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Endpoint contains wrong Pod IPv4 address
8 participants
0