Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@openshift-cherrypick-robot

This is an automated cherry-pick of #4263

/assign fidencio

None

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]>
@openshift-ci-robot openshift-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Oct 20, 2020
@codecov
Copy link

codecov bot commented Oct 20, 2020

Codecov Report

Merging #4283 into release-1.19 will decrease coverage by 0.00%.
The diff coverage is 0.00%.

@@               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              

@fidencio
Copy link
Contributor

/area vm

@openshift-ci-robot openshift-ci-robot added the area/vm Runtime VM related pull requests and issues label Oct 20, 2020
Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 20, 2020
@openshift-ci-robot
Copy link

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 20, 2020
@fidencio
Copy link
Contributor

/retest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/vm Runtime VM related pull requests and issues dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants