[libvirt] [PATCH 0/3] libxl: misc fixes for migration

Jim Fehlig posted 3 patches 6 years ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20180319232845.10619-1-jfehlig@suse.com
Test syntax-check passed
src/libvirt_private.syms    |  1 +
src/libxl/libxl_migration.c | 10 ++++----
src/rpc/virnetsocket.c      |  2 +-
src/util/virsocketaddr.c    | 60 +++++++++++++++++++++++++++++++++------------
src/util/virsocketaddr.h    |  4 +++
5 files changed, 55 insertions(+), 22 deletions(-)
[libvirt] [PATCH 0/3] libxl: misc fixes for migration
Posted by Jim Fehlig 6 years ago
While working on the {Begin,End}API improvements I noticed a few problems
in the migration code. The first two are trival, but the third describes
a problem I encountered while testing, and provides a potential fix. See
the patch for more details.

Jim Fehlig (3):
  libxl: dont dereference NULL libxlDomainObjPrivatePtr
  libxl: remove needless 'else' in libxlDomainMigrationPrepare
  util: introduce virSocketAddrParseQuiet

 src/libvirt_private.syms    |  1 +
 src/libxl/libxl_migration.c | 10 ++++----
 src/rpc/virnetsocket.c      |  2 +-
 src/util/virsocketaddr.c    | 60 +++++++++++++++++++++++++++++++++------------
 src/util/virsocketaddr.h    |  4 +++
 5 files changed, 55 insertions(+), 22 deletions(-)

-- 
2.16.2

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 0/3] libxl: misc fixes for migration
Posted by Olaf Hering 6 years ago
On Mon, Mar 19, Jim Fehlig wrote:

> While working on the {Begin,End}API improvements I noticed a few problems
> in the migration code. The first two are trival, but the third describes
> a problem I encountered while testing, and provides a potential fix. See
> the patch for more details.

I tried these changes with master. Without them the receiving side
reports this:

Mär 20 08:53:06 macintyre-old libvirtd[1275]: 2018-03-20 07:53:06.161+0000: 1317: error : virSocketAddrParseInternal:121 : Cannot parse socket address 'macintyre-old.arch.suse.de': Name or service not known
Mär 20 08:53:06 macintyre-old libvirtd[1275]: 2018-03-20 07:53:06.162+0000: 1317: error : virNetSocketNewListenTCP:389 : Unable to bind to port: Cannot assign requested address
Mär 20 08:53:06 macintyre-old libvirtd[1275]: 2018-03-20 07:53:06.162+0000: 1317: error : libxlDomainMigrationPrepare:759 : operation failed: Fail to create socket for incoming migration

With them just the parse error disappeared:

Mär 20 09:35:52 macintyre-old libvirtd[4527]: 2018-03-20 08:35:52.521+0000: 4531: error : virNetSocketNewListenTCP:389 : Unable to bind to port: Cannot assign requested address
Mär 20 09:35:52 macintyre-old libvirtd[4527]: 2018-03-20 08:35:52.521+0000: 4531: error : libxlDomainMigrationPrepare:758 : operation failed: Fail to create socket for incoming migration


Not sure why it fails just for me.

Olaf
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 0/3] libxl: misc fixes for migration
Posted by Olaf Hering 6 years ago
On Tue, Mar 20, Olaf Hering wrote:

> Mär 20 09:35:52 macintyre-old libvirtd[4527]: 2018-03-20 08:35:52.521+0000: 4531: error : virNetSocketNewListenTCP:389 : Unable to bind to port: Cannot assign requested address

After further debugging:

27672 16:04:46.774906 socket(PF_INET6, SOCK_STREAM, IPPROTO_TCP) = 35
27672 16:04:46.775041 setsockopt(35, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
27672 16:04:46.775172 setsockopt(35, SOL_IPV6, IPV6_V6ONLY, [1], 4) = 0
27672 16:04:46.775302 bind(35, {sa_family=AF_INET6, sin6_port=htons(49152), inet_pton(AF_INET6, "2620:113:80c0:8000:10:161:8:197", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = -1 EADDRNOTAVAIL (Cannot assign requested address)
27672 16:04:46.775455 gettid()          = 27672
27672 16:04:46.775590 write(4, "2018-03-20 15:04:46.775+0000: 27672: error : virNetSocketNewListenTCP:389 : Unable to bind to port: Cannot assign requested address\n", 132) = 132
27672 16:04:46.775742 gettid()          = 27672
27672 16:04:46.775875 write(4, "2018-03-20 15:04:46.775+0000: 27672: info : virObjectUnref:350 : OBJECT_UNREF: obj=0x7fa4bc003530\n", 98) = 98
27672 16:04:46.776026 gettid()          = 27672

So for some reason libvirtd tries to bind to ipv6 even if the host does
not have that ipv6 address at this point, only the link-local address.
Not sure if there is a way to detect that within libvirt. Perhaps it
should just move on with the runp list and try the next one?

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