[openstack-dev] [nova][cinder][libvirt] Serious problem of block migration of a hybrid instance (instance based on local disk and cinder volume attached)

Matthew Gilliard matthew.gilliard at gmail.com
Wed May 20 22:12:30 UTC 2015


The change Dan refers to merged in Kilo. I assume that if you actually
found this problem then you're using an earlier OpenStack, so it's
worth noting that there's an outstanding backport:
https://review.openstack.org/#/c/176768/

Matthew


On Wed, May 20, 2015 at 3:21 AM, Daniel P. Berrange <berrange at redhat.com> wrote:
> On Wed, May 20, 2015 at 06:11:26PM +0800, Luo Gangyi wrote:
>> Hi devs,
>>
>>
>> I find a serious problem when I try to live migrate a hybrid instance
>> (instance based on local disk and cinder volume attached) .
>>
>>
>> In current nova, such operation is allowed.
>>
>>
>> But I don't think libvirt can deal with such condition correctly.
>>
>>
>> When block migration of a hybird intance is triggered, nova will initiate
>> a new connection to the volume in destination compute node and then
>> call libvirt to do the block migration.
>>
>> However, libvirt doesn't distinguish local disk and a network volume,
>> it may copy both local disk and cinder volume from source to destination.
>>
>> It is dangerous  to write the same volume simutaneously on source and
>> destination!! and apparently there is no need to do this!
>>
>> I believe we should do something to correct this, maybe patch libvirt?
>> or just forbid user do such operation?
>
> Both. Nova now forbids this
>
> commit d667b6a63e80b2f8d6311c2cf224ba32628eed84
> Author: Chris St. Pierre <stpierre at metacloud.com>
> Date:   Wed Dec 3 16:16:34 2014 -0600
>
>     libvirt: Fail when live block migrating instance with volumes
>
>     This raises an exception when attempting to live block migrate (nova
>     live-migration --block-migrate) an instance with attached volumes.
>     libvirt copies these volumes from themselves to themselves. At a
>     minimum, this is horribly slow and de-sparses a sparse volume; at
>     worst, this could cause massive data corruption.
>
>     Closes-Bug: 1398999
>     Change-Id: Ibcd423976bb9fea46e3e1cb23cc8e5cd944d8fc2
>
> And work is being done to allow libvirt to be told to skip cinder
> volumes when migrating:
>
>   https://www.redhat.com/archives/libvir-list/2015-May/msg00345.html
>
> Regards,
> Daniel
> --
> |: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
> |: http://libvirt.org              -o-             http://virt-manager.org :|
> |: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
> |: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



More information about the OpenStack-dev mailing list