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