zed: Use ID_MODEL instead of ID_BUS for autoreplace #13633
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Fixes #13512
Description
We tried replacing an NVMe drive using autoreplace, only to see zed reject it with:
This happened because ZED saw that ID_BUS was not set by udev for the NVMe drive, and thus didn't think it was "real drive".
A better option is to look for ID_MODEL instead. In testing, I saw ID_MODEL get set for a SATA drive (RHEL 7), SAS drive
(RHEL 8) and NVMe drive (RHEL 8), but not for a virtual drive on a VM.
How Has This Been Tested?
Tested autoreplace using an NVMe drive that had an ID_MODEL udev entry but not ID_BUS.
Types of changes
Checklist:
Signed-off-by
.