|
|
df3bb2 |
From 6e71dcc1c9c1d8dd37da3f0fd71fc97cc5cbe92f Mon Sep 17 00:00:00 2001
|
|
|
df3bb2 |
From: Pino Toscano <ptoscano@redhat.com>
|
|
|
df3bb2 |
Date: Thu, 13 Dec 2018 18:36:20 +0100
|
|
|
df3bb2 |
Subject: [PATCH] v2v: -o rhv-upload: decouple name of nbdkit python plugin
|
|
|
df3bb2 |
|
|
|
df3bb2 |
Do not assume that the Python plugin of nbdkit has the same name of the
|
|
|
df3bb2 |
Python interpreter.
|
|
|
df3bb2 |
|
|
|
df3bb2 |
Use the default upstream name of nbdkit to identify it; downstream
|
|
|
df3bb2 |
distributions must adjust this variable, in case they rename the Python
|
|
|
df3bb2 |
plugin of nbdkit.
|
|
|
df3bb2 |
|
|
|
df3bb2 |
(cherry picked from commit 6b80c5fb51f08d3e62393e6722655bbcd940f4e7)
|
|
|
df3bb2 |
---
|
|
|
df3bb2 |
v2v/output_rhv_upload.ml | 5 +++--
|
|
|
df3bb2 |
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
df3bb2 |
|
|
|
df3bb2 |
diff --git a/v2v/output_rhv_upload.ml b/v2v/output_rhv_upload.ml
|
|
|
df3bb2 |
index 7dbd98a0d..79a2fc8fd 100644
|
|
|
df3bb2 |
--- a/v2v/output_rhv_upload.ml
|
|
|
df3bb2 |
+++ b/v2v/output_rhv_upload.ml
|
|
|
df3bb2 |
@@ -79,6 +79,7 @@ let parse_output_options options =
|
|
|
df3bb2 |
{ rhv_cafile; rhv_cluster; rhv_direct; rhv_verifypeer }
|
|
|
df3bb2 |
|
|
|
df3bb2 |
let python3 = "python3" (* Defined by PEP 394 *)
|
|
|
df3bb2 |
+let nbdkit_python_plugin = "python"
|
|
|
df3bb2 |
let pidfile_timeout = 30
|
|
|
df3bb2 |
let finalization_timeout = 5*60
|
|
|
df3bb2 |
|
|
|
df3bb2 |
@@ -155,7 +156,7 @@ class output_rhv_upload output_alloc output_conn
|
|
|
df3bb2 |
*)
|
|
|
df3bb2 |
let error_unless_nbdkit_python3_working () =
|
|
|
df3bb2 |
let cmd = sprintf "nbdkit %s %s --dump-plugin >/dev/null"
|
|
|
df3bb2 |
- python3 (quote plugin) in
|
|
|
df3bb2 |
+ nbdkit_python_plugin (quote plugin) in
|
|
|
df3bb2 |
if Sys.command cmd <> 0 then
|
|
|
df3bb2 |
error (f_"nbdkit Python 3 plugin is not installed or not working. It is required if you want to use ‘-o rhv-upload’.
|
|
|
df3bb2 |
|
|
|
df3bb2 |
@@ -222,7 +223,7 @@ See also \"OUTPUT TO RHV\" in the virt-v2v(1) manual.")
|
|
|
df3bb2 |
"--newstyle"; (* use newstyle NBD protocol *)
|
|
|
df3bb2 |
"--exportname"; "/";
|
|
|
df3bb2 |
|
|
|
df3bb2 |
- "python3"; (* use the nbdkit Python 3 plugin *)
|
|
|
df3bb2 |
+ nbdkit_python_plugin; (* use the nbdkit Python plugin *)
|
|
|
df3bb2 |
plugin; (* Python plugin script *)
|
|
|
df3bb2 |
] in
|
|
|
df3bb2 |
let args = if verbose () then args @ ["--verbose"] else args in
|
|
|
df3bb2 |
--
|
|
|
df3bb2 |
2.21.0
|
|
|
df3bb2 |
|