Skip to content

fix listCoontainerStats not filter#1202

Merged
k8s-ci-robot merged 1 commit intokubernetes-sigs:masterfrom
lengrongfu:fix/container-valida-error
Jul 3, 2023
Merged

fix listCoontainerStats not filter#1202
k8s-ci-robot merged 1 commit intokubernetes-sigs:masterfrom
lengrongfu:fix/container-valida-error

Conversation

@lengrongfu
Copy link
Copy Markdown
Contributor

@lengrongfu lengrongfu commented Jul 1, 2023

What type of PR is this?

/kind bug

What this PR does / why we need it:

this test can not run containerd ci integration test.

Which issue(s) this PR fixes:

Fixes # #1201

Special notes for your reviewer:

Because the filter does not set containerd, not found will appear in the case of concurrency. When no filter is specified, containerd will obtain all the container metadata, and then obtain the container status through the metadata. The container id may still exist when obtaining all the metadata, but it will not exist when obtaining the container status. There will be a situation of not found.

For example, in the following steps create and start container is 9246d016f4e3ad776c2e89064278c03010caa3514d8851084bfbc7dbfd8d9cc9, but last not found container is e99aac75d556494eb78eb3c49157a1680972a29e5a095888857b186134713891.

It is because container e99aac75d556494eb78eb3c49157a1680972a29e5a095888857b186134713891 was deleted in the process of creat 9246d016f4e3ad776c2e89064278c03010caa3514d8851084bfbc7dbfd8d9cc9.

  Timeline >>
  STEP: create container @ 06/30/23 09:18:20.004
  STEP: Get image status for image: registry.k8s.io/e2e-test-images/busybox:1.29-2 @ 06/30/23 09:18:20.004
  STEP: Create container. @ 06/30/23 09:18:20.005
  Jun 30 09:18:20.061: INFO: Created container "9246d016f4e3ad776c2e89064278c03010caa3514d8851084bfbc7dbfd8d9cc9"

  STEP: start container @ 06/30/23 09:18:20.061
  STEP: Start container for containerID: 9246d016f4e3ad776c2e89064278c03010caa3514d8851084bfbc7dbfd8d9cc9 @ 06/30/23 09:18:20.061
  Jun 30 09:18:20.368: INFO: Started container "9246d016f4e3ad776c2e89064278c03010caa3514d8851084bfbc7dbfd8d9cc9"

  STEP: test container stats @ 06/30/23 09:18:20.368
  STEP: List container stats for all containers: @ 06/30/23 09:18:20.368
  Jun 30 09:18:20.491: INFO: Unexpected error occurred: rpc error: code = NotFound desc = failed to convert to cri containerd stats format: failed to get metrics handler for container "e99aac75d556494eb78eb3c49157a1680972a29e5a095888857b186134713891": failed to find sandbox id "003b9de6c65aaa798fa8b43a0271f90123adfdaa9c537d47d65fe7da76efb61b": not found

Does this PR introduce a user-facing change?

NONE

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jul 1, 2023
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jul 1, 2023
@lengrongfu
Copy link
Copy Markdown
Contributor Author

/assign feiskyer

@lengrongfu lengrongfu force-pushed the fix/container-valida-error branch from 0c4f301 to e643810 Compare July 3, 2023 02:32
@lengrongfu
Copy link
Copy Markdown
Contributor Author

/assign saschagrunert

@lengrongfu
Copy link
Copy Markdown
Contributor Author

/unassign feiskyer

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 3, 2023
@saschagrunert
Copy link
Copy Markdown
Member

Thank you for the fix @lengrongfu! 🙏

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lengrongfu, 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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 3, 2023
@k8s-ci-robot k8s-ci-robot merged commit 7c8d9e2 into kubernetes-sigs:master Jul 3, 2023
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants