spiegel_podman/pkg
Paul Holzinger 0443c5166e
inspect: ignore ENOENT during device lookup
When we walk the /dev tree we need to lookup all device paths. Now in
order to get the major and minor version we have to actually stat each
device. This can again fail of course. There is at least a race between
the readdir at stat call so it must ignore ENOENT errors to avoid
the race condition as this is not a user problem. Second, we should
also not return other errors and just log them instead, returning an
error means stopping the walk and returning early which means inspect
fails with an error which would be bad.

Also there seems to be cases were ENOENT will be returned all the time,
e.g. when a device is forcefully removed. In the reported bug this is
triggered with iSCSI devices.

Because the caller does already lookup the device from the created map
it reports a warning there if the device is missing on the host so it
is not a problem to ignore a error during lookup here.

[NO NEW TESTS NEEDED] Requires special device setup to trigger
consistentlyand we cannot do that in CI.

Fixes https://issues.redhat.com/browse/RHEL-11158

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2023-10-04 13:26:21 +02:00
..
annotations Remove ReservedAnnotations from kube generate specification 2023-01-18 08:46:24 -05:00
api compat API: speed up network list 2023-09-20 13:08:42 +02:00
auth fix(deps): update module github.com/docker/docker to v24 2023-05-22 15:32:12 +02:00
autoupdate auto update: fix usage of --authfile 2023-07-05 08:30:39 +02:00
bindings Fix all ports exposed by kube play 2023-09-23 19:53:46 +02:00
channel bump golangci-lint to v1.50.1 2022-12-15 13:39:56 +01:00
checkpoint Merge pull request #19951 from Luap99/small-remote 2023-09-14 15:27:45 +02:00
copy pkg: switch to golang native error wrapping 2022-07-08 08:54:47 +02:00
criu vendor: update checkpointctl to v1.1.0 2023-09-12 08:41:02 +01:00
ctime Replace deprecated ioutil 2022-09-20 15:34:27 -04:00
domain vendor: update module github.com/docker/distribution to v2.8.3+incompatible 2023-10-03 13:54:26 +02:00
env fix(env): parsing --env incorrect in cli 2023-08-09 18:52:30 +08:00
errorhandling Fix typos 2023-02-11 18:23:24 +01:00
inspect pkg/inspect: remove unused ImageResult type 2022-05-24 16:07:39 +02:00
k8s.io kube: add DaemonSet support for generate 2023-09-12 10:30:57 +05:30
lookup source code comments and docs: fix typos, language, Markdown layout 2023-05-22 07:52:16 +02:00
machine Fix locale issues with WSL version detection 2023-10-03 08:37:27 -05:00
namespaces source code comments and docs: fix typos, language, Markdown layout 2023-05-22 07:52:16 +02:00
parallel Fix stutters 2022-09-10 07:52:00 -04:00
ps Cleanup CIDFile on podman-remote run --rm command 2023-08-01 14:24:55 -04:00
rctl pkg/rctl: Remove unused cgo dependency 2022-10-31 15:13:48 +00:00
rootless add a podman-compose command 2023-07-24 19:23:04 +02:00
seccomp pkg: switch to golang native error wrapping 2022-07-08 08:54:47 +02:00
selinux Fix SELinux functions names to not be repetitive 2020-04-23 15:57:34 -04:00
signal Run codespell on code 2022-11-04 10:57:41 -04:00
specgen Add DefaultMode to kube play 2023-09-29 11:58:38 -04:00
specgenutil Merge pull request #20149 from ygalblum/quadlet-container-mount 2023-09-28 05:38:52 -04:00
specgenutilexternal Quadlet container mount - support non key=val options 2023-09-27 16:20:00 +03:00
strongunits introduce pkg/strongunits 2023-09-20 11:19:41 -05:00
systemd Quadlet container mount - support non key=val options 2023-09-27 16:20:00 +03:00
terminal podman ssh work, using new c/common interface 2022-08-09 14:00:58 -04:00
timetype bump golangci-lint to v1.49.0 2022-10-17 09:19:41 +02:00
trust Revert the usage of home.GetConfigHome() 2023-07-17 18:29:06 +02:00
util inspect: ignore ENOENT during device lookup 2023-10-04 13:26:21 +02:00