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 pod ps' fails with 'no such pod' #14736

Closed
ydayagi opened this issue Jun 27, 2022 · 2 comments · Fixed by #14741
Closed

'podman pod ps' fails with 'no such pod' #14736

ydayagi opened this issue Jun 27, 2022 · 2 comments · Fixed by #14741
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@ydayagi
Copy link
Contributor

ydayagi commented Jun 27, 2022

/kind bug
Description
listing pods while pods are deleted causes 'pod ps' to fail with exit code 125 and message 'no such pod'
This is much like #12034. However, it seems that in the other bug there was a focus on the deletion and not the 'pod ps' command.

Steps to reproduce the issue:

  1. create 10 pods

  2. delete 10 pods

  3. during deletion do 'podman pod ps'

Describe the results you received:
[ydayagi@fedora ~]$ sudo podman pod ps
Error: pod ea52fce12a3ce0c345aec62737c6e7819c2ced233cf822434706eca4db81c5c9 not found in database: no such pod

Describe the results you expected:
[ydayagi@fedora ~]$ sudo podman pod ps
POD ID NAME STATUS CREATED INFRA ID # OF CONTAINERS

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

[ydayagi@fedora ~]$ podman version
Version:      3.4.0
API Version:  3.4.0
Go Version:   go1.16.8
Built:        Thu Sep 30 22:32:16 2021
OS/Arch:      linux/amd64

Output of podman info --debug:

(paste your output here)

Package info (e.g. output of rpm -q podman or apt list podman):

podman-3.4.0-1.fc35.x86_64

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)

Checked troubleshooting. Did not test latest version.

Additional environment details (AWS, VirtualBox, physical, etc.):
VM with fedora 35

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Jun 27, 2022
@giuseppe
Copy link
Member

we have to ignore define.ErrNoSuchPod.

I'll work on a PR

@giuseppe
Copy link
Member

PR: #14741

giuseppe added a commit to giuseppe/libpod that referenced this issue Jun 28, 2022
the "pod ps" command first retrieves the list of all pods, then
iterates over the list to inspect each pod.  This introduce a race
since a pod could be deleted in the meanwhile by another process.

Solve it by ignoring the define.ErrNoSuchPod error.

Closes: containers#14736

Signed-off-by: Giuseppe Scrivano <[email protected]>
@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 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. 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 a pull request may close this issue.

2 participants