Files
Paul Holzinger e1caf80e81 podman ps: fix racy pod name query
The pod name was queried without holding the container lock, thus it was
possible that the pod was deleted in the meantime and podman just failed
with "no such pod" as the errors.Is() check matched the wrong error.

Move it into the locked code this should prevent anyone from removing
the pod while the container is part of it. Also fix the returned error,
there is no reason to special case one specific error just wrap any error
here so callers at least know where it happened. However this is not
good enough because the batch doesn't update the state which means it
see everything before the container was locked. In this case it might be
possible the ctr and pod was already removed so let the caller skip both
ctr and pod removed errors.

Fixes #23282

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-07-18 17:34:26 +02:00
..
2020-04-15 16:09:27 -05:00
2024-07-18 17:34:26 +02:00