compute/hypervisor: Fix block_migration_flag

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 »

442f21c08c/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.
This commit is contained in:
Sebastien Badia 2014-09-22 00:41:43 +02:00
parent 7029a0e365
commit 5a29fe4245
2 changed files with 2 additions and 3 deletions

View File

@ -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': }

View File

@ -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