[libvirt] [PATCH] qemu: Avoid assigning unavailable migration ports

Ján Tomko jtomko at redhat.com
Thu Oct 17 11:44:33 UTC 2013


On 10/15/2013 02:42 PM, Jiri Denemark wrote:
> From: WangYufei <james.wangyufei at huawei.com>
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1019053
> 
> When we migrate vms concurrently, there's a chance that libvirtd on
> destination assigns the same port for different migrations, which will
> lead to migration failure during prepare phase on destination. So we use
> virPortAllocator here to solve the problem.
> 
> Signed-off-by: WangYufei <james.wangyufei at huawei.com>
> Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
> ---
>  src/qemu/qemu_command.h   |  3 +++
>  src/qemu/qemu_conf.h      |  6 +++---
>  src/qemu/qemu_domain.h    |  1 +
>  src/qemu/qemu_driver.c    |  6 ++++++
>  src/qemu/qemu_migration.c | 39 +++++++++++++++++++++++++--------------
>  5 files changed, 38 insertions(+), 17 deletions(-)
> 

> --- a/src/qemu/qemu_domain.h
> +++ b/src/qemu/qemu_domain.h
> @@ -160,6 +160,7 @@ struct _qemuDomainObjPrivate {
>      unsigned long migMaxBandwidth;
>      char *origname;
>      int nbdPort; /* Port used for migration with NBD */
> +    int migrationPort;
>  
>      virChrdevsPtr devs;
>  

unsigned short might be nicer here.

ACK

Jan


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20131017/05c46ef4/attachment-0001.sig>


More information about the libvir-list mailing list