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

podman auto-update/system df: fix ErrNoSuchCtr/Volume race #23305

Merged
merged 2 commits into from
Jul 18, 2024

Conversation

Luap99
Copy link
Member

@Luap99 Luap99 commented Jul 17, 2024

If a container is removed during the loop we should just ignore it. No
reason to log this as error to the user.

Fixes #23279

Does this PR introduce a user-facing change?

Fixed a race in podman auto-update and podman system df that would cause them to fail with an error if a container was removed at the same time.

@openshift-ci openshift-ci bot added do-not-merge/release-note-label-needed Enforce release-note requirement, even if just None approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 17, 2024
@Luap99 Luap99 added the No New Tests Allow PR to proceed without adding regression tests label Jul 17, 2024
@openshift-ci openshift-ci bot added release-note and removed do-not-merge/release-note-label-needed Enforce release-note requirement, even if just None labels Jul 17, 2024
@Luap99
Copy link
Member Author

Luap99 commented Jul 17, 2024

@edsantiago PTAL
That should help the parallel PR.

@edsantiago edsantiago changed the title podman auto-update/ystemd df: fix ErrNoSuchCtr/Volume race podman auto-update/system df: fix ErrNoSuchCtr/Volume race Jul 17, 2024
pkg/domain/infra/abi/system.go Outdated Show resolved Hide resolved
@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 17, 2024
If a container is removed during the loop we should just ignore it. No
reason to log this as error to the user.

Fixes containers#23279

Signed-off-by: Paul Holzinger <[email protected]>
When a container or volume is removed during the loop this is not a
problem and we should just skip it as it is not a user bug and just a
normal race.

Signed-off-by: Paul Holzinger <[email protected]>
@Luap99
Copy link
Member Author

Luap99 commented Jul 18, 2024

/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 18, 2024
@edsantiago
Copy link
Member

LGTM. @containers/podman-maintainers PTAL

Copy link
Member

@giuseppe giuseppe 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 openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 18, 2024
Copy link
Contributor

openshift-ci bot commented Jul 18, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: edsantiago, giuseppe, Luap99

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:
  • OWNERS [Luap99,edsantiago,giuseppe]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot openshift-merge-bot bot merged commit 22cf2b4 into containers:main Jul 18, 2024
82 checks passed
@Luap99 Luap99 deleted the auto-update-race branch July 18, 2024 11:33
@edsantiago
Copy link
Member

Ugh, just saw this in one of my laptop parallel runs (in the 610 test):

   [05:55:38.197225634] $ /home/esm/src/atomic/2018-02.podman/libpod/bin/podman system df --format {{"\n"}}                                                     
   [05:55:38.297883560] Error: Image 5e5299c48745 exists in local storage but may be corrupted (remove the image to resolve the issue): reading image "5e5299c48
745fd521eedc49358c97e9e8bacfae02c7110e270fad05eaa6d7a05": locating image with ID "5e5299c48745fd521eedc49358c97e9e8bacfae02c7110e270fad05eaa6d7a05": image not k
nown                                                                                                                                                            
   [05:55:38.301820892] [ rc=125 ]

Any connection to this PR?

@Luap99
Copy link
Member Author

Luap99 commented Jul 18, 2024

no (I only touched container/volume code) the image query code is in libimage (c/common). It is is possible that it has a similar issue there

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. lgtm Indicates that a PR is ready to be merged. No New Tests Allow PR to proceed without adding regression tests release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

race: podman auto-update barfs when containers disappear
3 participants