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

[NO NEW TESTS NEEDED] Remove infra ID from DB before removing containers #12047

Merged
merged 1 commit into from
Oct 21, 2021

Conversation

mheon
Copy link
Member

@mheon mheon commented Oct 20, 2021

If we interrupt pod removal between removing containers and removing the whole pod, the infra ID was still in the DB, and most pod operations would try to retrieve the infra container (and would this fail). Clear the infra ID from the DB just before we remove all containers to prevent this.

Fixes #12034

[NO NEW TESTS NEEDED] This race is just about impossible to repro.

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 20, 2021
Copy link
Member

@Luap99 Luap99 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
Copy link
Contributor

openshift-ci bot commented Oct 20, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Luap99, mheon

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

The pull request process is described 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

@rhatdan
Copy link
Member

rhatdan commented Oct 20, 2021

LGTM
Although tests do not seem to want to run.

[NO NEW TESTS NEEDED] seems to be ignored, perhaps you need to repush.

@Luap99
Copy link
Member

Luap99 commented Oct 20, 2021

@mheon You have to rebase

@mheon
Copy link
Member Author

mheon commented Oct 20, 2021

Rebased

@TomSweeneyRedHat
Copy link
Member

LGTM
sadly your title is too long now. You need to move the [NO NEW TESTS NEEDED] tag into your description, not subject.

If we interrupt pod removal between removing containers and
removing the whole pod, the infra ID was still in the DB, and
most pod operations would try to retrieve the infra container
(and would this fail). Clear the infra ID from the DB just before
we remove all containers to prevent this.

Fixes containers#12034

[NO NEW TESTS NEEDED] This is a very narrow race and I have no
idea how to repro it.

Signed-off-by: Matthew Heon <[email protected]>
@mheon mheon force-pushed the remove_infra_from_db branch from 4d70b21 to 30245f5 Compare October 20, 2021 18:56
@rhatdan
Copy link
Member

rhatdan commented Oct 21, 2021

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 21, 2021
@openshift-merge-robot openshift-merge-robot merged commit c09fab5 into containers:main Oct 21, 2021
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

podman pod ps aborts with Error: container [...] not found in DB: no such container
5 participants