Files
Paul Holzinger d492b08442 [v4.6.1-rhel] 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.

Original Fixed https://issues.redhat.com/browse/RHEL-11158
This fixes: https://issues.redhat.com/browse/RHEL-20491

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
2024-04-05 16:53:22 -04:00
..
2022-12-15 13:39:56 +01:00
2022-09-20 15:34:27 -04:00
2023-02-11 18:23:24 +01:00
2024-02-02 11:09:54 -05:00
2022-09-10 07:52:00 -04:00
2023-05-02 10:30:07 -04:00
2024-02-02 11:09:54 -05:00
2022-11-04 10:57:41 -04:00
2023-07-20 15:46:27 -04:00
2022-10-17 09:19:41 +02:00