libvirt.connection.pre_block_migration() may pass wrong size

Bug #932179 reported by Pádraig Brady on 2012-02-14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
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?

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.

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

Fix proposed to branch: master

Changed in nova:
assignee: nobody → Pádraig Brady (p-draigbrady)
status: New → In Progress

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) on 2012-02-29
Changed in nova:
milestone: none → essex-4
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in nova:
milestone: essex-4 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers