RBD volumes created with reversed stripe_unit and stripe_count parameters

Bug #1447030 reported by Florian Haas
272
This bug affects 3 people
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://bugzilla.redhat.com/show_bug.cgi?id=1092208:

"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.

Revision history for this message
In , Anchor (anchor-redhat-bugs) wrote :

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.

Revision history for this message
In , Eric (eric-redhat-bugs) wrote :

Will be in 1.2.4 release

commit 4cd508ba4fc3cc33c72629fe8b9012e73d8dd8bf
Author: Steven McDonald <email address hidden>
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 <email address hidden>

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libvirt (Ubuntu):
status: New → Confirmed
information type: Public → Public Security
Florian Haas (fghaas)
description: updated
James Page (james-page)
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
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Florian, or anyone else affected,

Accepted libvirt into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/libvirt/1.2.2-0ubuntu13.1.11 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in libvirt (Ubuntu Trusty):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

@Florian,

is it possible for you to verify this bugfix in trusty-proposed?

Revision history for this message
Chris J Arges (arges) wrote :

Before:
$ sudo rbd info libvirt-pool/test
rbd image 'test':
 size 10240 MB in 2560 objects
 order 22 (4096 kB objects)
 block_name_prefix: rbd_data.10ef3d1b58ba
 format: 2
 features: layering, striping
 stripe unit: 1 bytes
 stripe count: 4194304

After:
$ sudo rbd info libvirt-pool/test2
rbd image 'test2':
 size 10240 MB in 2560 objects
 order 22 (4096 kB objects)
 block_name_prefix: rbd_data.10e83d1b58ba
 format: 2
 features: layering, striping
 stripe unit: 4096 kB
 stripe count: 1

Verified.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Chris J Arges (arges) wrote :

Hello Florian, or anyone else affected,

Accepted libvirt into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/libvirt/1.2.2-0ubuntu13.1.12 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: removed: verification-done
tags: added: verification-needed
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

fixed the tag, this was verified already

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libvirt - 1.2.2-0ubuntu13.1.12

---------------
libvirt (1.2.2-0ubuntu13.1.12) trusty-proposed; urgency=medium

  * Drop Support-incoming-migration-from-13.10-hosts.patch as it failed
    verification.

libvirt (1.2.2-0ubuntu13.1.11) trusty-proposed; urgency=medium

  * Support-incoming-migration-from-13.10-hosts.patch (LP: #1425619)
  * qemu-filterref-crash.patch: fix crash when removing filterref from
    interfaces (LP: #1448205)
  * storage_backend_rbd-correct-arg-order-to-rbd_create3: fix reversed
    arguments to rbd_create3. (LP: #1447030)

 -- Serge Hallyn <email address hidden> Thu, 18 Jun 2015 14:21:06 -0500

Changed in libvirt (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Update Released

The verification of the Stable Release Update for libvirt has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Changed in libvirt:
importance: Unknown → Medium
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.