Skip to content
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

address another nil ptr check in podmanFactory.CanHandleAndAccept() #3566

Merged
merged 1 commit into from
Aug 7, 2024

Conversation

char8
Copy link
Contributor

@char8 char8 commented Jul 17, 2024

We ran into the same issue as #3464, but adding the check against cntr.State was insufficient to prevent the nil ptr panic.

The ContainerJSON type returned by InspectContainer embeds a ptr to ContainerJSONBase, and it seemed this ptr was nil in the return, leading cadvisor to crash loop on startup.

I haven't looked into the specific JSON response podman is returning to trigger this, so there's potentially a bug in the podman API itself where it returned a nil error and an empty payload in response to the inspect call.

I do see the podman daemon returning 500 error codes for some inspect queries, and it appears validateResponse (container/podman/podman.go:41) doesn't handle 5xx status codes? so that may be the underlying issue here - podman returns a 5xx and empty body, and the json decoder unmarshals it to a nil.

Happy to add handling for 5xx to this PR as an added measure if that is appropriate.

Copy link

google-cla bot commented Jul 17, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@k8s-ci-robot
Copy link
Collaborator

Hi @char8. Thanks for your PR.

I'm waiting for a google 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-sigs/prow repository.

@iwankgb
Copy link
Collaborator

iwankgb commented Jul 26, 2024

/ok-to-test

@char8
Copy link
Contributor Author

char8 commented Aug 6, 2024

CLA signed - sorry for the delay

@iwankgb iwankgb merged commit c15f44e into google:master Aug 7, 2024
14 checks passed
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.

3 participants