Wrong image size using rbd backend for libvirt

Bug #1219658 reported by Haomai Wang
96
This bug affects 14 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Havana
Fix Released
High
Yaguang Tang
nova (Ubuntu)
Fix Released
Undecided
Haomai Wang
Trusty
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

 * The original fix for bug 1219658 introduced a factor of 1024 error
 in the resulting rbd image size. Big impact.

[Test Case]

 * To have icehouse openstack using rbd image backend for libvirt:

Images seem to be 1024 larger than expected.

For example (comment #3):

# rbd -p images info ae9d23f0-b5a0-4d92-a15d-b3f23d276c72_disk rbd image 'ae9d23f0-b5a0-4d92-a15d-b3f23d276c72_disk':
        size 20480 GB in 5242880 objects
        order 22 (4096 kB objects)
        block_name_prefix: rbd_data.1cac92ae8944a
        format: 2
        features: layering

when the expect size should be 20 GB.

[Regression Potential]

 * Fix is running in a big production without any problem.

 * RDB backend could stop working (keeping the bug will eventualy cause
   an outage for those who use rdb backend)

[Other Info]

For rbd image backend for libvirt, the root partition will use the image size not 'disk' size. It lack of resize root volume in the codes.

Haomai Wang (haomai)
Changed in nova:
assignee: nobody → Haomai Wang (haomai)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/44640

tags: added: libvirt
Changed in nova:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/44640
Committed: http://github.com/openstack/nova/commit/1b66a47b5f4cbcdf1a9a1ec38532474588a3fee2
Submitter: Jenkins
Branch: master

commit 1b66a47b5f4cbcdf1a9a1ec38532474588a3fee2
Author: Haomai Wang <email address hidden>
Date: Mon Sep 2 15:25:51 2013 +0800

    Fix incorrect root partition size and compatible volume name

    When using rbd backend, it needs to resize volume size if size presents. Else
    we will get wrong image size.

    Rbd volume always uses uuid as the main pattern of volume name, now change to
    it is necessary.

    Fix bug 1219658

    Change-Id: I3dc8d639b066eac35d190b8d4687c41c9f4d5824

tags: added: havana-backport-potential
Revision history for this message
Jean-Sebastien Mouret (js-mouret) wrote :

Images seem to be 1024 larger than expected.

For example:

# rbd -p images info ae9d23f0-b5a0-4d92-a15d-b3f23d276c72_disk rbd image 'ae9d23f0-b5a0-4d92-a15d-b3f23d276c72_disk':
        size 20480 GB in 5242880 objects
        order 22 (4096 kB objects)
        block_name_prefix: rbd_data.1cac92ae8944a
        format: 2
        features: layering

when the expect size should be 20 GB.

Versions: ceph v0.72.2, nova 2014.1-git201312190904-trusty

Revision history for this message
Sam Morrison (sorrison) wrote :

Fix for the out by a factor of 1024 issue is at https://review.openstack.org/#/c/81974/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/87455

Revision history for this message
Jeffrey Zhang (jeffrey4l) wrote :

I also affact by this bug. What's the status of this bug now?

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/98753

Revision history for this message
Pádraig Brady (p-draigbrady) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/92512/

Revision history for this message
Pádraig Brady (p-draigbrady) wrote :

FYI, we'll include this fix in the impending "2014.1.1" RDO packages

Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

Here goes my SRU proposal:

nova (1:2014.1.1-0ubuntu2) trusty; urgency=high

  * Cherry picked two fixes from upstream.
    - [2cebfd2] libvirt: convert cpu features attribute from list to a set (LP: #1267191)
    - [b86a0e5] Fixes rdb backend image size (LP: #1219658)

I've created a hotfix from 1:2014.1.1-0ubuntu1 (already in -proposed) for some other uses.

Since I'm creating 1 fix for 2 bugs, please take a look at url bellow for the other bug as well.

https://bugs.launchpad.net/nova/+bug/1267191

Attaching debdiff.

description: updated
affects: nova → nova (Ubuntu)
description: updated
Revision history for this message
Chuck Short (zulcss) wrote :

Rafael, this needs to have an SRU testcase as in:

https://wiki.ubuntu.com/StableReleaseUpdates

chuck

description: updated
description: updated
Chris J Arges (arges)
Changed in nova (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Haomai, or anyone else affected,

Accepted nova into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/nova/1:2014.1.1-0ubuntu2 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 nova (Ubuntu Trusty):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

Changed this to verification-done because since this SRU proposal this has been running in a big server farm without any issues or regressions.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Scott Kitterman (kitterman) wrote : Update Released

The verification of the Stable Release Update for nova 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.

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

This bug was fixed in the package nova - 1:2014.1.1-0ubuntu2

---------------
nova (1:2014.1.1-0ubuntu2) trusty; urgency=high

  * Cherry picked two fixes from upstream.
    - [2cebfd2] libvirt: convert cpu features attribute from list to a set (LP: #1267191)
    - [b86a0e5] Fixes rdb backend image size (LP: #1219658)
 -- Rafael David Tinoco <email address hidden> Wed, 25 Jun 2014 12:56:15 -0300

Changed in nova (Ubuntu Trusty):
status: Fix Committed → Fix Released
Alan Pevec (apevec)
tags: removed: havana-backport-potential
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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