Blame SOURCES/0036-v2v-Disable-readahead-for-VMware-curl-sources-too-RH.patch

62f9b7
From e12604349587b67b3b4c3d0b7b1779999460a93d Mon Sep 17 00:00:00 2001
62f9b7
From: "Richard W.M. Jones" <rjones@redhat.com>
62f9b7
Date: Fri, 19 Jun 2020 13:43:47 +0100
62f9b7
Subject: [PATCH] v2v: Disable readahead for VMware curl sources too
62f9b7
 (RHBZ#1848862).
62f9b7
62f9b7
This appears to be the cause of timeouts during the conversion step
62f9b7
where VMware VCenter server's Tomcat HTTPS server stops responding to
62f9b7
requests (or rather, responds only with 503 errors).  The server later
62f9b7
recovers and in fact because of the retry filter the conversion
62f9b7
usually succeeds, but I found that we can avoid the problem by
62f9b7
disabling readahead.
62f9b7
62f9b7
(cherry picked from commit 9f4940068022d4e7abdfea6617b73a2b206f19aa)
62f9b7
---
62f9b7
 v2v/nbdkit_sources.ml | 8 ++++----
62f9b7
 1 file changed, 4 insertions(+), 4 deletions(-)
62f9b7
62f9b7
diff --git a/v2v/nbdkit_sources.ml b/v2v/nbdkit_sources.ml
62f9b7
index f5e91911..7c177e35 100644
62f9b7
--- a/v2v/nbdkit_sources.ml
62f9b7
+++ b/v2v/nbdkit_sources.ml
62f9b7
@@ -99,12 +99,12 @@ let common_create ?bandwidth ?extra_debug ?extra_env password
62f9b7
 
62f9b7
   (* Adding the readahead filter is always a win for our access
62f9b7
    * patterns.  If it doesn't exist don't worry.  However it
62f9b7
-   * breaks VMware servers (RHBZ#1832805).
62f9b7
+   * breaks VMware servers (RHBZ#1832805, RHBZ#1848862).
62f9b7
    *)
62f9b7
   let cmd =
62f9b7
-    if plugin_name <> "vddk" then
62f9b7
-      Nbdkit.add_filter_if_available cmd "readahead"
62f9b7
-    else cmd in
62f9b7
+    match plugin_name with
62f9b7
+    | "vddk" | "curl" -> cmd
62f9b7
+    | _ -> Nbdkit.add_filter_if_available cmd "readahead" in
62f9b7
 
62f9b7
   (* Caching extents speeds up qemu-img, especially its consecutive
62f9b7
    * block_status requests with req_one=1.
62f9b7
-- 
62f9b7
2.27.0
62f9b7