-
Notifications
You must be signed in to change notification settings - Fork 1.1k
server: run post stop hooks before updating container status #9422
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
base: main
Are you sure you want to change the base?
Conversation
Skipping CI for Draft Pull Request. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: haircommander The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
9d66d4e
to
804d2fe
Compare
16f489f
to
a34023d
Compare
ContainerStateToDisk will call UpdateContainerStatus which will update the internal representation of the container state to be stopped. While correct, it opens a race where the kubelet may take action on a container that seems stopped before post stop hooks are run. Signed-off-by: Peter Hunt <pehunt@redhat.com>
a34023d
to
5223c2d
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9422 +/- ##
===========================================
- Coverage 67.13% 39.54% -27.60%
===========================================
Files 202 191 -11
Lines 27939 27756 -183
===========================================
- Hits 18756 10975 -7781
- Misses 7610 15290 +7680
+ Partials 1573 1491 -82 🚀 New features to boost your workflow:
|
A friendly reminder that this PR had no activity for 30 days. |
@haircommander #9405 merged now, so I guess it's time to revisit this one, here :-) |
So I applied this on top of OCPBUGS-59416 (#9351): It works fine, but I still have no way of testing the original customer issue, as PR9351 by itself fixes my own test case, too (meaning that my reproducer doesn't catch 100% of possible issues) |
/kind bug
What type of PR is this?
What this PR does / why we need it:
ContainerStateToDisk will call UpdateContainerStatus which will update the internal representation of the container state to be stopped. While correct, it opens a race where the kubelet may take action on a container that seems stopped before post stop hooks are run.
Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?