-
Notifications
You must be signed in to change notification settings - Fork 168
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
virtual_disks_multivms: fix disk discovery #5323
Conversation
|
9502f76
to
f520cd7
Compare
@chunfuwen Please help review, thanks! |
@chunfuwen Thank you for your review, I addressed your feedback. Please, could you review again? |
Re-run for patch v2
|
f520cd7
to
f7fd768
Compare
I've tried to identify the new disk as not mounted and no children that are mounted but then the test at some point mounts it and might not find it anymore. OTOH, using serial doesn't work for LUN type disks "error: unsupported configuration: scsi-block 'lun' devices do not support the serial property" |
f7fd768
to
2ce6018
Compare
The tests used the disk target as identifier for the disk inside of the VM. However, the target is not guaranteed to show up in the guest as-is, especially given that the /dev/XdY paths are not persistent and can change between boots. Use instead a function that identifies a new disk inside of a VM as the one disk that has no root mount on itself, its partitions or volumes. Finally, the `delete_scsi_disk` doesn't return any value so it was always looping for the full timeout. Wrap it into a function that confirms if both the module and device have been removed. Signed-off-by: Sebastian Mitterle <[email protected]>
2ce6018
to
ef3a7e9
Compare
@chunfuwen I think this is now the final working version. Unfortunately, via serial wouldn't work with LUNs and the algorithm gets a bit more complicated. Please have a look. |
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.
lgtm
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.
LGTM
Depends on avocado-framework/avocado-vt#3815
The tests used the disk target as identifier for the
disk inside of the VM. However, the target is not guaranteed
to show up in the guest as-is, especially given that the
/dev/XdY paths are not persistent and can change between boots.
Use instead a function that identifies a new disk inside of a VM
as the one disk that has no root mount on itself, its partitions
or volumes.
Finally, the
delete_scsi_disk
doesn't return any value so itwas always looping for the full timeout. Wrap it into a function
that confirms if both the module and device have been removed.
Signed-off-by: Sebastian Mitterle [email protected]