-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
storage: Exclude eMMC "boot" non-partitions from multipath logic #20329
storage: Exclude eMMC "boot" non-partitions from multipath logic #20329
Conversation
8a14c96
to
3cf24bc
Compare
I have no idea how to test this... We might have to be content with not breaking anything that we can test, and getting feedback from the reporter of #20250. |
Agreed - that's why we have packit COPRs, for easy user testing 😁 |
pkg/storaged/client.js
Outdated
// to the main Drive. We identify them by their name, just like | ||
// UDisks2. | ||
|
||
if (utils.decode_filename(block.Device).match(/^mmcblk[0-9]boot[0-9]$/)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't work, the devices have a /dev/
prefix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- if (utils.decode_filename(block.Device).match(/^mmcblk[0-9]boot[0-9]$/))
+ if (utils.decode_filename(block.Device).match(/\/dev\/mmcblk[0-9]boot[0-9]$/))
This works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also our add_disk
code does this:
559 │ if not serial:
560 │ serial = f"DISK{index}"
561 │ dev = 'sd' + string.ascii_lowercase[index]
562 │ extra = "<boot order='1'/>" if boot_disk else ""
563 │ disk_desc = TEST_DISK_XML % {
564 │ 'file': image,
565 │ 'serial': serial,
566 │ 'unit': index,
567 │ 'dev': dev,
568 │ 'type': image_type,
569 │ 'extra': extra,
570 │ }
So the device name seems user controlled, we could add a test for that? Or maybe via the ram_disk
route?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the device name seems user controlled
Not really... I think the dev = 'sd' + index
is just a good guess at what the device will be called in the guest. It doesn't control it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't work, the devices have a
/dev/
prefix
Ouch, that's why we test, I guess. :-) Thanks!
eMMC devices can have "boot" sub-devices which should be excluded from multipath considerations, just like partitions. Fixes cockpit-project#20250
3cf24bc
to
a3f1f0a
Compare
@jelly, can you please test again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works!
// UDisks2. | ||
|
||
if (utils.decode_filename(block.Device).match(/\/dev\/mmcblk[0-9]boot[0-9]$/)) | ||
return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This added line is not executed by any test.
eMMC devices can have "boot" sub-devices which should be excluded from multipath considerations, just like partitions.
Fixes #20250