pool create fails using the devices returned by the get_persistent_disk_name #15567
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
The following tests had the failure shown below:
Test Failure:
Problem is in
get_persistent_disk_name
function inblkdev.shlib
file.function is fetching a unqiue id using udevadm utility. It scan the output with
/disk/by-id
and taking 3rd element from separation.On awk use we get the two values from udevadm info command.
disk/by-id/scsi-36000c2983b8bf71d74b22eba4d8af792 disk/by-id/wwn/0x6000c2983b8bf71d74b22eba4d8af792
Until we get the
scsi-36000c2983b8bf71d74b22eba4d8af792
test runs file but when it gets 3rd element wwn test fails.Description
"udevadm info -q all -n $DEV_DSKDIR/$device | awk '/disk/by-id/ {print $2; exit}' "
command gives possible two output on system
In output 2 if we use
cut -d/ -f3
it providewwn
string. Because of this wherever we use it fails like:- zpool createSo instead using returning 3rd element better to return the entire string after second sepration.
How Has This Been Tested?
Types of changes
Checklist:
Signed-off-by
.