-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[release-1.19] runtime_vm: Fix non terminating pods #4283
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
[release-1.19] runtime_vm: Fix non terminating pods #4283
Conversation
Signed-off-by: Fabiano Fidêncio <[email protected]>
Passing ttrpc.ErrClosed to errdefs.FromGRPC() will result in an "ttrpc: closed: unknown" error, which we can't match in any possible way. Knowing that let's, instead, return errdefs.ErrNotFound, as already done in updateContainerStatus() so we can properly match the error when it occurs. Signed-off-by: Fabiano Fidêncio <[email protected]>
In the goroutine used to monitor whether the container was terminated or not, we should not fail in case the VM was shutdown, as this is expected to happen and will cause a ttrpc.ErrClosed. runtime's wait() function, however, will returns errdefs.ErrNotFound when a ttrpc.ErrCloses happens in order to avoid returning "ttrpc: closed: unknown" (see previous commit) and that's the reason we just check for errdefs.ErrNotFound and do not error out in that case. Signed-off-by: Fabiano Fidêncio <[email protected]>
If the VM is down when removing the container, ttrpc.ErrClosed would be returned and we'd return this error up in the chain. However, if the VM is down, so is the container and we could simply ignore the error reported, as already done in a few other parts of our code. Signed-off-by: Fabiano Fidêncio <[email protected]>
Codecov Report
@@ Coverage Diff @@
## release-1.19 #4283 +/- ##
================================================
- Coverage 39.55% 39.54% -0.01%
================================================
Files 110 110
Lines 8294 8296 +2
================================================
Hits 3281 3281
- Misses 4686 4688 +2
Partials 327 327 |
|
/area vm |
saschagrunert
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: openshift-cherrypick-robot, saschagrunert The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
This is an automated cherry-pick of #4263
/assign fidencio