|
|
61e9b3 |
From f3ea9ceb1c3c9741d4f62d0c1d23b7c94634353a Mon Sep 17 00:00:00 2001
|
|
|
61e9b3 |
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
|
61e9b3 |
Date: Thu, 28 May 2020 11:40:45 +0100
|
|
|
61e9b3 |
Subject: [PATCH] v2v: Remove extraneous '=' when setting bandwidth
|
|
|
61e9b3 |
(RHBZ#1841096).
|
|
|
61e9b3 |
|
|
|
61e9b3 |
Commit c3a54d6aed6dfc65f9ffa59976bb8d20044c03a8 ("v2v: Add standalone
|
|
|
61e9b3 |
nbdkit module.") was supposed to be a simple refactoring but it broke
|
|
|
61e9b3 |
the --bandwidth and --bandwidth-file options (amongst other things).
|
|
|
61e9b3 |
|
|
|
61e9b3 |
Because of an extra '=' character which was accidentally left over, it
|
|
|
61e9b3 |
would add an extra character in the nbdkit-rate-filter command line.
|
|
|
61e9b3 |
For example:
|
|
|
61e9b3 |
|
|
|
61e9b3 |
virt-v2v .. --bandwidth 200M
|
|
|
61e9b3 |
|
|
|
61e9b3 |
would invoke:
|
|
|
61e9b3 |
|
|
|
61e9b3 |
nbdkit .. --filter rate rate==200M
|
|
|
61e9b3 |
|
|
|
61e9b3 |
which causes a parse error. The --bandwidth-file option does not
|
|
|
61e9b3 |
invoke a parse error but does not work, for similar reasons.
|
|
|
61e9b3 |
|
|
|
61e9b3 |
Thanks: Ming Xie
|
|
|
61e9b3 |
(cherry picked from commit a89a084b2d0f6d40716c1d34969f6c49ea28e9b3)
|
|
|
61e9b3 |
---
|
|
|
61e9b3 |
v2v/nbdkit_sources.ml | 6 +++---
|
|
|
61e9b3 |
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
61e9b3 |
|
|
|
61e9b3 |
diff --git a/v2v/nbdkit_sources.ml b/v2v/nbdkit_sources.ml
|
|
|
61e9b3 |
index 979c3773..402dfd0e 100644
|
|
|
61e9b3 |
--- a/v2v/nbdkit_sources.ml
|
|
|
61e9b3 |
+++ b/v2v/nbdkit_sources.ml
|
|
|
61e9b3 |
@@ -118,11 +118,11 @@ let common_create ?bandwidth ?extra_debug ?extra_env plugin_name plugin_args =
|
|
|
61e9b3 |
let args =
|
|
|
61e9b3 |
match bandwidth with
|
|
|
61e9b3 |
| StaticBandwidth rate ->
|
|
|
61e9b3 |
- [ "rate=", rate ]
|
|
|
61e9b3 |
+ [ "rate", rate ]
|
|
|
61e9b3 |
| DynamicBandwidth (None, filename) ->
|
|
|
61e9b3 |
- [ "rate-file=", filename ]
|
|
|
61e9b3 |
+ [ "rate-file", filename ]
|
|
|
61e9b3 |
| DynamicBandwidth (Some rate, filename) ->
|
|
|
61e9b3 |
- [ "rate=", rate; "rate-file=", filename ] in
|
|
|
61e9b3 |
+ [ "rate", rate; "rate-file", filename ] in
|
|
|
61e9b3 |
cmd, args
|
|
|
61e9b3 |
)
|
|
|
61e9b3 |
else cmd, [] in
|
|
|
61e9b3 |
--
|
|
|
61e9b3 |
2.27.0
|
|
|
61e9b3 |
|