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

Patch "checked" when pod not successful #27845

Merged
merged 7 commits into from
Dec 2, 2022

Conversation

dstandish
Copy link
Contributor

@dstandish dstandish commented Nov 22, 2022

In KPO, if pod gets stuck in terminating status, then we might keep reattaching to it.

the key change is the the addition of "or pod not successful" to the conditions for patching the pod as "checked"

We patch not just if "is delete" but also any time tha pod phase is not successful.

this is to ensure that if the pod takes a long time to get removed (or if it simply failed to start in the first place) that we make sure we don't reattach to it on the retry.

everything else is drive by refactor / cleanup

@boring-cyborg boring-cyborg bot added provider:cncf-kubernetes Kubernetes provider related issues area:providers labels Nov 22, 2022
if not self.is_delete_operator_pod:
with _suppress(Exception):
self.patch_already_checked(remote_pod)
if pod_phase != PodPhase.SUCCEEDED or not self.is_delete_operator_pod:
Copy link
Contributor Author

@dstandish dstandish Dec 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line (the addition of "or pod not successful") is the key change in this PR.

We patch not just if "is delete" but also any time tha pod phase is not successful.

this is to ensure that if the pod takes a long time to get removed (or if it simply failed to start in the first place) that we make sure we don't reattach to it on the retry.

everything else is drive by refactor / cleanup

In KPO, if pod gets stuck in terminating status, then we might keep reattaching to it.
@dstandish dstandish merged commit ebd7b67 into apache:main Dec 2, 2022
@dstandish dstandish deleted the kpo-always-patch branch December 2, 2022 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:providers provider:cncf-kubernetes Kubernetes provider related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants