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

[Libguestfs] [PATCH v4 12/12] v2v: nbdkit: Add the retry filter unconditionally if it exists.



This experimental filter can be used to work around brief
interruptions in service, such as the network going down, firewalls
timing out connections etc., without requiring virt-v2v to be rerun.
---
 v2v/nbdkit.ml | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/v2v/nbdkit.ml b/v2v/nbdkit.ml
index 776eedce0..4866d3836 100644
--- a/v2v/nbdkit.ml
+++ b/v2v/nbdkit.ml
@@ -168,6 +168,13 @@ let common_create ?bandwidth plugin_name plugin_args plugin_env =
     )
     else [] in
 
+  (* Retry filter (if it exists) can be used to get around brief
+   * interruptions in service.  It must be closest to the plugin.
+   *)
+  if Sys.file_exists (filterdir // "nbdkit-retry-filter.so") then (
+    add_arg "--filter"; add_arg "retry"
+  );
+
   let args = get_args () @ [ plugin_name ] @ plugin_args @ rate_args in
 
   { plugin_name; args; env; dump_config; dump_plugin; filterdir }
-- 
2.23.0


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