From 5a29fe42450f3e917497d89c33e8e0cd6ba9dc07 Mon Sep 17 00:00:00 2001 From: Sebastien Badia Date: Mon, 22 Sep 2014 00:41:43 +0200 Subject: [PATCH] compute/hypervisor: Fix block_migration_flag MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When using block migration, you need to specify one of NON_SHARED_INC or NON_SHARED_DISK, otherwise the data is not transfered. VIR_MIGRATE_LIVE is needed to be able to live migrate VM and not pause them during the migration « Do not pause the VM during migration » http://libvirt.org/git/?p=libvirt.git;a=blob;f=src/libvirt.c;h=48065359507f80cb1440aadc3baaea6af00c2a42;hb=HEAD#l6039 In Juno, we also have the VIR_MIGRATE_TUNNELLED « Tunnel migration data over the libvirt RPC channel » https://github.com/openstack/nova/blob/442f21c08cc720cfd5d6f5a637572b3c6512bff2/nova/virt/libvirt/driver.py#L161-L163 http://libvirt.org/git/?p=libvirt.git;a=blob;f=src/libvirt.c;h=48065359507f80cb1440aadc3baaea6af00c2a42;hb=HEAD#l6041 But we have a error with qemu-nbd… virNetSocketReadWire:1477 : End of file while reading data: Input/output error qemuMigrationBeginPhase:2088 : NBD in tunnelled migration is currently not supported When not using VIR_MIGRATE_TUNNELLED flag, a new TCP connexion is created during migration to transfer the disk image. --- manifests/compute/hypervisor.pp | 3 +-- spec/classes/cloud_compute_hypervisor_spec.rb | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/manifests/compute/hypervisor.pp b/manifests/compute/hypervisor.pp index c82a6d4c..aa80c345 100644 --- a/manifests/compute/hypervisor.pp +++ b/manifests/compute/hypervisor.pp @@ -33,7 +33,6 @@ # (optional) Allow to manage or not TSO issue. # Default to true. # - class cloud::compute::hypervisor( $server_proxyclient_address = '127.0.0.1', $libvirt_type = 'kvm', @@ -260,7 +259,7 @@ Host * 'libvirt/inject_key': value => false; 'libvirt/inject_partition': value => '-2'; 'libvirt/live_migration_flag': value => 'VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_PERSIST_DEST'; - 'libvirt/block_migration_flag': value => 'VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_DOMAIN_BLOCK_REBASE_COPY,VIR_DOMAIN_BLOCK_REBASE_SHALLOW'; + 'libvirt/block_migration_flag': value => 'VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_NON_SHARED_INC'; } class { 'ceilometer::agent::compute': } diff --git a/spec/classes/cloud_compute_hypervisor_spec.rb b/spec/classes/cloud_compute_hypervisor_spec.rb index db61e15b..5508668d 100644 --- a/spec/classes/cloud_compute_hypervisor_spec.rb +++ b/spec/classes/cloud_compute_hypervisor_spec.rb @@ -243,7 +243,7 @@ describe 'cloud::compute::hypervisor' do should contain_nova_config('libvirt/inject_key').with('value' => false) should contain_nova_config('libvirt/inject_partition').with('value' => '-2') should contain_nova_config('libvirt/live_migration_flag').with('value' => 'VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_PERSIST_DEST') - should contain_nova_config('libvirt/block_migration_flag').with('value' => 'VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_DOMAIN_BLOCK_REBASE_COPY,VIR_DOMAIN_BLOCK_REBASE_SHALLOW') + should contain_nova_config('libvirt/block_migration_flag').with('value' => 'VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_NON_SHARED_INC') end context 'with dbus on Ubuntu' do