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

volume ls: fix race that caused it to fail #24479

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

Luap99
Copy link
Member

@Luap99 Luap99 commented Nov 6, 2024

If volume ls was called while another volume was removed at the right time it could have failed with "no such volume" as we did not ignore such error during listing. As we list things and this no longer exists the correct thing is to ignore the error and continue like we do with containers, pods, etc...

This was pretty easy to reproduce with these two commands running in different terminals:

while :; do bin/podman volume create test && bin/podman volume rm test || break; done
while :; do bin/podman volume ls || break ; done

I have a slight feeling that this might solve #23913 but I am not to sure there so I am not adding a Fixes here.

Does this PR introduce a user-facing change?

Fixed a race condition that caused podman volume ls to fail when another volume was removed at the same time.

If volume ls was called while another volume was removed at the right
time it could have failed with "no such volume" as we did not ignore
such error during listing. As we list things and this no longer exists
the correct thing is to ignore the error and continue like we do with
containers, pods, etc...

This was pretty easy to reproduce with these two commands running in
different terminals:
while :; do bin/podman volume create test && bin/podman volume rm test || break; done
while :; do bin/podman volume ls || break ; done

I have a slight feeling that this might solve containers#23913 but I am not to
sure there so I am not adding a Fixes here.

Signed-off-by: Paul Holzinger <[email protected]>
@openshift-ci openshift-ci bot added release-note approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 6, 2024
@github-actions github-actions bot added the kind/api-change Change to remote API; merits scrutiny label Nov 6, 2024
@Luap99
Copy link
Member Author

Luap99 commented Nov 6, 2024

@edsantiago PTAL, I think this fixes a very obvious volume ls flake. But I am still a bit confused about #23913 so I am not going to claim this closes it but I think it is possible it does

@Luap99 Luap99 added the No New Tests Allow PR to proceed without adding regression tests label Nov 6, 2024
Copy link
Member

@edsantiago edsantiago left a comment

Choose a reason for hiding this comment

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

LGTM regardless of whether or not it fixes the volume eater. Thank you.

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 Nov 6, 2024
Copy link
Contributor

openshift-ci bot commented Nov 6, 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 5cbb630 into containers:main Nov 6, 2024
77 checks passed
@Luap99 Luap99 deleted the volume-ls-race branch November 6, 2024 15:23
@Luap99 Luap99 added the 5.3 label Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5.3 approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/api-change Change to remote API; merits scrutiny 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.

3 participants