Re: [PATCH 1/1] qemu: libvirt live migration over RDMA of ipv6 addr failed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 27, 2017 at 09:01:43 -0600, David Dai wrote:
> Using libvirt to do live migration over RDMA via ip v6 address failed. 
> For example:
> # virsh migrate  --live --migrateuri rdma://[deba::2222]:49152  \
>               rhel73_host1_guest1 qemu+ssh://[deba::2222]/system --verbose
> root@deba::2222's password:
> error: internal error: unable to execute QEMU command 'migrate': RDMA ERROR:  
>                   could not rdma_getaddrinfo address deba
> 
> As we can see, the ip v6 address used by rdma_getaddrinfo() has only "deba" 
> part. It should be "deba::2222".
...
> 
> Signed-off-by: David Dai <zdai@xxxxxxxxxxxxxxxxxx>
> ---
>  src/qemu/qemu_monitor.c |    8 ++++++--
>  1 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
> index b7be5e7..258665c 100644
> --- a/src/qemu/qemu_monitor.c
> +++ b/src/qemu/qemu_monitor.c
> @@ -2577,8 +2577,12 @@ qemuMonitorMigrateToHost(qemuMonitorPtr mon,
>  
>      QEMU_CHECK_MONITOR(mon);
>  
> -    if (virAsprintf(&uri, "%s:%s:%d", protocol, hostname, port) < 0)
> -        return -1;
> +    if (strchr(hostname, ':')) {
> +        if (virAsprintf(&uri, "%s:[%s]:%d", protocol, hostname, port) < 0)
> +            return -1;
> +    } else if (virAsprintf(&uri, "%s:%s:%d", protocol, hostname, port) < 0) {
> +            return -1;

Wrong indentation.

> +    }
>  
>      if (mon->json)
>          ret = qemuMonitorJSONMigrate(mon, flags, uri);

Oops. Normal (non-RDMA) migration uses the connection initiated by
libvirt and this code was only used with old QEMU which did not support
migration to a FD... until RDMA migration was introduced.

Thanks for fixing the issue. ACK and pushed after striping most of the
commit message as we don't really need to track the history of the
patch.

Jirka

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux