RBD volumes created with reversed stripe_unit and stripe_count parameters
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libvirt |
Fix Released
|
Medium
|
|||
libvirt (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Trusty |
Fix Released
|
High
|
Unassigned |
Bug Description
=======
SRU Justification:
1. Impact: very slow rbd volumes
2. Test case: see below (create an RBD volume and check the stripe unit and count)
3. Regression potential: the patch simply fixes the argument order in a fn call and does nothing else, so there should be no regressions.
=======
Copied from upstream bug at https:/
"When creating an RBD volume with 'virsh vol-create-as', the newly created volume gets a stripe unit of 1 byte and a stripe count of 4194304. This results in an RBD volume which is unusably slow (in my tests, it took over 30 minutes for GRUB to load in an affected guest)."
This bug has been fixed upstream for libvirt 1.2.4, but the fix has not been backported for trusty-updates. This means this functionality is broken and unusable in the current LTS.
information type: | Public → Public Security |
description: | updated |
Changed in libvirt (Ubuntu): | |
importance: | Undecided → High |
status: | Confirmed → Triaged |
Changed in libvirt (Ubuntu): | |
status: | Triaged → Fix Released |
Changed in libvirt (Ubuntu Trusty): | |
importance: | Undecided → High |
description: | updated |
Changed in libvirt: | |
importance: | Unknown → Medium |
status: | Unknown → Fix Released |
Description of problem:
When creating an RBD volume with 'virsh vol-create-as', the newly created volume gets a stripe unit of 1 byte and a stripe count of 4194304. This results in an RBD volume which is unusably slow (in my tests, it took over 30 minutes for GRUB to load in an affected guest).
How reproducible:
Run the following on an RBD-enabled system:
virsh vol-create-as $RBD_POOL test 10G
rbd info $RBD_POOL/test
Actual results:
'rbd info' reports a stripe unit and count as described above.
Expected results:
The stripe unit should be 4 MiB, and the stripe count should be 1.
Additional info:
This is caused by incorrect parameter ordering on line 495 of src/storage/ storage_ backend_ rbd.c. libvirt passes stripe_count before stripe_unit to rbd_create3, but the order of these parameters in librbd.h has stripe_unit before stripe_count. Thus, these parameters end up being reversed.
I will be sending a trivial patch which fixes this problem to the libvirt mailing list shortly.