Skip to content

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

Merged
openshift-merge-robot merged 1 commit into
podman-container-tools:mainfrom
mheon:remove_infra_from_db
Oct 21, 2021
Merged

[NO NEW TESTS NEEDED] Remove infra ID from DB before removing containers#12047
openshift-merge-robot merged 1 commit into
podman-container-tools:mainfrom
mheon:remove_infra_from_db

Conversation

@mheon

@mheon mheon commented Oct 20, 2021

Copy link
Copy Markdown
Contributor

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

@Luap99 Luap99 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@openshift-ci

openshift-ci Bot commented Oct 20, 2021

Copy link
Copy Markdown
Contributor

[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

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

@rhatdan

rhatdan commented Oct 20, 2021

Copy link
Copy Markdown
Contributor

LGTM
Although tests do not seem to want to run.

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

@Luap99

Luap99 commented Oct 20, 2021

Copy link
Copy Markdown
Member

@mheon You have to rebase

@mheon

mheon commented Oct 20, 2021

Copy link
Copy Markdown
Contributor Author

Rebased

@TomSweeneyRedHat

Copy link
Copy Markdown
Contributor

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 podman-container-tools#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 <mheon@redhat.com>
@mheon
mheon force-pushed the remove_infra_from_db branch from 4d70b21 to 30245f5 Compare October 20, 2021 18:56
@rhatdan

rhatdan commented Oct 21, 2021

Copy link
Copy Markdown
Contributor

/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 podman-container-tools: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