Bug 1092208

Summary: RBD volumes created with reversed stripe_unit and stripe_count parameters
Product: [Community] Virtualization Tools Reporter: Anchor Systems Managed Hosting <managed>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: acathrow, eblake
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-04-29 04:15:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Anchor Systems Managed Hosting 2014-04-29 02:00:52 UTC
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.

Comment 1 Eric Blake 2014-04-29 04:15:51 UTC
Will be in 1.2.4 release

commit 4cd508ba4fc3cc33c72629fe8b9012e73d8dd8bf
Author: Steven McDonald <steven.mcdonald.au>
Date:   Tue Apr 29 12:19:01 2014 +1000

    storage_backend_rbd: Correct argument order to rbd_create3
    
    The stripe_unit and stripe_count arguments are passed to rbd_create3 in
    the wrong order, resulting in a stripe size of 1 byte with 4194304
    stripes on newly created RBD volumes.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1092208
    Signed-off-by: Steven McDonald <steven.mcdonald.au>