8000 server: fix error handling for container status retrieval by sohankunkerkar · Pull Request #8488 · cri-o/cri-o · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

server: fix error handling for container status retrieval #8488

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

Closed
wants to merge 1 commit into from

Conversation

sohankunkerkar
Copy link
Member

What type of PR is this?

/kind bug
/kind cleanup

What this PR does / why we need it:

This change addresses issues where the Kubelet logs show numerous "ID does not exist" errors when attempting to retrieve container statuses.

I observed multiple instances of the following error in the Kubelet logs

Aug 18 08:43:01 ci-ln-c2xlq7b-72292-rcnfj-worker-a-86x2f kubenswrapper[2264]: I0818 08:43:01.586636    2264 pod_container_deletor.go:53] "DeleteContainer returned error" containerID={"Type":"cri-o","ID":"11f958631d8e575f086c6499b2ca431eb875f9f2f8e253f5882b06d69798d7e6"} err="failed to get container status \"11f958631d8e575f086c6499b2ca431eb875f9f2f8e253f5882b06d69798d7e6\": rpc error: code = NotFound desc = could not find container \"11f958631d8e575f086c6499b2ca431eb875f9f2f8e253f5882b06d69798d7e6\": container with ID starting with 11f958631d8e575f086c6499b2ca431eb875f9f2f8e253f5882b06d69798d7e6 not found: ID does not exist"

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?

None

Signed-off-by: Sohan Kunkerkar <sohank2602@gmail.com>
@openshift-ci openshift-ci bot 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. kind/bug Categorizes issue or PR as related to a bug. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Aug 19, 2024
@openshift-ci openshift-ci bot requested review from klihub and QiWang19 August 19, 2024 02:56
Copy link
Contributor
openshift-ci bot commented Aug 19, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sohankunkerkar
Once this PR has been reviewed and has the lgtm label, please assign umohnani8 for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

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

Copy link
codecov bot commented Aug 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.34%. Comparing base (36c2750) to head (8a20d35).
Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8488   +/-   ##
=======================================
  Coverage   49.34%   49.34%           
=======================================
  Files         153      153           
  Lines       17206    17206           
=======================================
  Hits         8491     8491           
  Misses       7648     7648           
  Partials     1067     1067           

@sohankunkerkar
Copy link
Member Author

/retest

Copy link
Contributor
openshift-ci bot commented Aug 19, 2024

@sohankunkerkar: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/ci-fedora-integration 8a20d35 link true /test ci-fedora-integration

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@@ -30,7 +31,7 @@ func (s *Server) RemoveContainer(ctx context.Context, req *types.RemoveContainer
// The RemoveContainer RPC is idempotent, and must not return an error
// if the container has already been removed. Ref:
// https://github.com/kubernetes/cri-api/blob/c20fa40/pkg/apis/runtime/v1/api.proto#L74-L75
if errors.Is(err, truncindex.ErrNotExist) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Have you looked at why checking for a wrapped error here does not work?

The call stack for this error is rather straightforward.

Copy link
Member

Choose a reason for hiding this comment

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

I agree the wrapping should technically work 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

ah, I think we need to backport #8431

@sohankunkerkar
Copy link
Member Author

Closing this in favor of back-porting #8431

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/bug Categorizes issue or PR as related to a bug. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. 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.

3 participants
0