Skip to content

Conversation

jsturtevant
Copy link
Contributor

@jsturtevant jsturtevant commented Jun 2, 2023

When a container is just created, exited state the container will not have stats. A common case for this in k8s is the init containers for a pod. They will be present in the listed containers but will not have a running task and there for no stats.

other information

This type of check to prevent querying containers there were not in valid state was in kubelet at some point: kubernetes/kubernetes#98509

@k8s-ci-robot
Copy link

Hi @jsturtevant. Thanks for your PR.

I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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/test-infra repository.

@jsturtevant
Copy link
Contributor Author

/cc @dcantah

@k8s-ci-robot k8s-ci-robot requested a review from dcantah June 5, 2023 16:15
@mansikulkarni96
Copy link

Thanks for working on this @jsturtevant !
Fix LGTM.

When a container is just created, exited state the container will not have stats. A common case for this in k8s is the init containers for a pod. The will be present in the listed containers but will not have a running task and there for no stats.

Signed-off-by: James Sturtevant <jstur@microsoft.com>
@jsturtevant jsturtevant force-pushed the fix-for-init-containers-windows-pod-stats branch from f054ea4 to 28a5199 Compare June 6, 2023 20:00
Copy link
Member

@dcantah dcantah left a comment

Choose a reason for hiding this comment

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

LGTM

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

Successfully merging this pull request may close these issues.

5 participants