libvirt.connection.pre_block_migration() may pass wrong size

Bug #932179 reported by Pádraig Brady
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Pádraig Brady

Bug Description

in the call to self._cache_image() size=instance_ref['ephemeral_gb'] is passed.
Note _cache_image() expects a full size for the size param. I.E. 10737418240 not 10
Also why is ephemeral_gb passed here. Shouldn't it be info['disk_size'] or something?

Revision history for this message
Johannes Erdfelt (johannes.erdfelt) wrote :

That code has been buggy for a while. It was previously instance_ref['local_gb'], which was also wrong. My patch was mostly a search and replace from local_gb to ephemeral_gb.

I think you're right that it probably should be info['disk_size'], but I'll have to spend some more time checking the code to be sure.

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

No worries, I thought you might know off the top of your head.
I'll have a look at some stage

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/4196

Changed in nova:
assignee: nobody → Pádraig Brady (p-draigbrady)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/4196
Committed: http://github.com/openstack/nova/commit/4289b6459707b656e61ff06669a3ed4baf2433e0
Submitter: Jenkins
Branch: master

commit 4289b6459707b656e61ff06669a3ed4baf2433e0
Author: Pádraig Brady <email address hidden>
Date: Wed Feb 15 15:44:29 2012 +0000

    fix pre_block_migration() interaction with libvirt cache

    Fixes bug 932179

    * nova/virt/libvirt/connection (pre_block_migration):
    Don't pass the 'ephemeral_gb' attribute as the size,
    since this has the wrong units and is the wrong quantity
    to pass anyway. Also don't check for file existence,
    or create the cow image as this is done within _cache_image()

    Change-Id: Id723ec8d119dacd4660e88e546e05af417c736fc

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → essex-4
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: essex-4 → 2012.1
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.