Re: [libosinfo PATCH 1/2] tests: Avoid re-using the curl handler on URIs tests

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

 



On Mon, Feb 04, 2019 at 02:44:25PM +0100, Fabiano Fidêncio wrote:
> On CentOS, we've hit an issue that when a curl handler is re-used we end
> up receiving malfunctioning responses from NetBSD CDN.
> 
> Dan investigated the issue and suggested that the problem may be a
> timing issue happening only in certain versions of libcurl (as it only
> hit us when testing on el7).

The HTTP spec says

  "A response to a HEAD method should not have a body. If so, it
   must be ignored."

the problem is that libcurl in centos7 at least is not ignoring
the body....  Sometimes it closes the keepalive connetion so this
doesn't matter, but other times it gives us back the body that it
should be ignoring.

Anyway, closing the connection is a robust solution

> 
> The main difference of a working and a non-working system is that in the
> former when trying to re-use connection, we always get it's dead, and a new
> connection is opened; while in the latter sometimes the connection is
> detected as dead (but sometimes not), causing then the issue described
> above when the connection is not detected as dead.
> 
> In order to work the issue around, let's no re-use the curl handler but
> always open a new one for each of the URIs.
> 
> Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
> ---
>  tests/test-imageuris.c | 37 ++++++++++++++++++-------------------
>  tests/test-mediauris.c | 37 ++++++++++++++++++-------------------
>  tests/test-treeuris.c  | 38 ++++++++++++++++++--------------------
>  3 files changed, 54 insertions(+), 58 deletions(-)

Reviewed-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux