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

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