-
Notifications
You must be signed in to change notification settings - Fork 243
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
utils_disk/libvirt_disk: add way to handle disk by path #3729
utils_disk/libvirt_disk: add way to handle disk by path #3729
Conversation
7890122
to
3aeb20c
Compare
3aeb20c
to
4345a92
Compare
Used in autotest/tp-libvirt#5060 |
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.
The rest is ok to me.
virttest/utils_disk.py
Outdated
if err: | ||
raise exceptions.TestError("Failed to list partitions in /dev/disk/by-path") | ||
r = out.split() | ||
logging.debug("Partitions by path: %s", r) |
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.
logging.debug("Partitions by path: %s", r) | |
LOG.debug("Partitions by path: %s", r) |
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.
@chloerh Thank you! Updated.
Partitions in /proc/partitions are not persistent which can lead to problems when a test checks if a disk was cold plugged. Use persistent naming from /dev/disk/by-path which allows us to easily identify those disks and partitions with the attached disk by their libvirt <address/>. Add and update other functions to be compatible with this way of dealing with partitions. Signed-off-by: Sebastian Mitterle <smitterl@redhat.com>
4345a92
to
d303afb
Compare
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
Partitions in /proc/partitions are not persistent which
can lead to problems when a test checks if a disk was cold
plugged.
Use persistent naming from /dev/disk/by-path which allows
.us to easily identify those disks and partitions with
the attached disk by their libvirt
Add and update other functions to be compatible with this way
of dealing with partitions.