lsblk.py: add devid in output#60
Conversation
fe01fbb to
e95e45a
Compare
42030bd to
822bcdf
Compare
|
Hi, I'm looking at the PR. I've refreshed the CI to test the changes on Python 3.6 on master, and so I've rebased your commits on it |
Ok! |
|
Looks OK from what I've seen, can you squash the commits? |
822bcdf to
d066fa7
Compare
Add a function to get disk/by-id names from a device name, and add it to the output Signed-off-by: Arnaud Garcia-Fernandez <arnaud.garcia-fernandez@vates.tech>
|
Ping for review @Nambrok |
Nambrok
left a comment
There was a problem hiding this comment.
I have not identified problems with the code, by I do think we only want the by-id one to identify disks.
In this configuration, we also have FS and partition path, those could change.
Currently restricting to by-id. Signed-off-by: Arnaud Garcia-Fernandez <arnaud.garcia-fernandez@vates.tech>
Done, with a simple way to change behavior in the future, and include other by-something, like by-label for example. |
Add a function to get disk/by-id names from a device name, and add it to the output
Any resemblance with a previous PR is not completely random.
Performance tests are on par with the previous PR, which is : not good enough.
New version will call once the udev database, and get all data readily available, which is way better.
Here is a comparison of the four methods, times are for querying sequentially the three hosts of the pool.
Pool (l1, l2, l3) is the corresponding pool on XOlab.
Pool (yp1, yp2, yp3) is a virtual home pool.
Using command:
xe host-call-plugin host-uuid=<uuid> plugin=lsblk.py fn=list_block_devices.There are other differences between the three methods
/dev/disk/by-id//dev/disk/by-*/The scope of the links returned could be tuned to limit to by-id, or not, performances wouldn't be altered.