]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
LVM: Pass volume size in MiB to copy_volume() during volume migration
authorMitsuhiro Tanino <mitsuhiro.tanino@hds.com>
Wed, 13 May 2015 15:59:13 +0000 (11:59 -0400)
committerEric Harney <eharney@redhat.com>
Thu, 14 May 2015 20:09:34 +0000 (16:09 -0400)
commitc0f12f28be44a2e05932de1f222698dce221b2b7
treeb356d31138f5a983ea275c003bca3b64a95a2b4c
parent4441272f29c5e129f96fb373c5971d3c63decfb2
LVM: Pass volume size in MiB to copy_volume() during volume migration

Currently migrate_volume() in lvm.py does not pass volume size in
MiB but passes volume size in GiB to copy_volume(). The size argument
of copy_volume() requires MiB value. As a result, if the volume size
is 1GiB, copy_volume() copies only 1MiB head of 1GiB volume to the
destination volume, and then the volume data is corrupted.
This patch fixes to pass volume size in MiB.

(cherry picked from commit a5da4c353a1df17341c1e745796e00a4ec1afd21)
Conflicts:
    cinder/tests/test_volume.py
    (Added mock for create_export.)

Closes-bug: #1454835
Change-Id: I8e06195dc3625ef07bc9858d844541e37a231b73
cinder/tests/test_volume.py
cinder/volume/drivers/lvm.py