[Libguestfs] [p2v PATCH 10/10] nbd.c: bind listening socket without AI_ADDRCONFIG

Richard W.M. Jones rjones at redhat.com
Fri Apr 1 10:39:38 UTC 2022


On Fri, Apr 01, 2022 at 12:07:06PM +0200, Laszlo Ersek wrote:
> Now the question is if we are bothered by this "RST" in the conversion
> log, as it's expected.

If conversion is successful then no one will be looking at the logs,
and if it fails then hopefully a search will bring up this thread.

We could do a full negotiation, but to do it properly would require
adding libnbd as another dependency.

> I think wait_for_nbd_server_to_start() does add a little bit of safety.
> Namely, if the child goes away unexpectedly (because the execlp() fails,
> or the new image exits for whatever reason very soon), we find out about
> that (with a timeout in the worst case), and don't start up "ssh -R".
> With wait_for_nbd_server_to_start() removed, this "child failure" will
> only be visible by virt-v2v attempting to connect back via "ssh -R", and
> then (with ssh on the p2v box getting an RST), witnessing a similarly
> abrubpt EOF / RST from sshd on the conversion server. Ultimately
> virt-v2v will fail, and this will be visible on virt-p2v, but that's a
> detour.

OK, makes sense.

> I agree that functionally, wait_for_nbd_server_to_start() is not
> necessary, as long as the child does not vanish. With the child present,
> there is always at least one file descriptor pointing to the file
> description pointing to the listening socket, so the p2v side of "ssh
> -R" will always have a socket to connect to.
> 
> I'll append a patch anyway to the series, just for discussion's sake.
> 
> > Does it work OK if you simply remove wait_for_nbd_server_to_start and
> > the place where that function is called?
> 
> Yes, the message disappears then.

Thanks,

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top


More information about the Libguestfs mailing list