|
|
d0ea73 |
From 6f116349a2a02739e64a39ab2aeb23706fac188b Mon Sep 17 00:00:00 2001
|
|
|
d0ea73 |
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
|
d0ea73 |
Date: Tue, 14 Aug 2018 12:50:07 +0100
|
|
|
d0ea73 |
Subject: [PATCH] v2v: -o rhv-upload: Fix error message disk numbering
|
|
|
d0ea73 |
(RHBZ#1615885).
|
|
|
d0ea73 |
|
|
|
d0ea73 |
The output method used the s_disk_id field assuming it was a unique,
|
|
|
d0ea73 |
monotonically increasing number counting from 0. However this is not
|
|
|
d0ea73 |
the case, the input method simply has to set s_disk_id to be unique
|
|
|
d0ea73 |
for each disk.
|
|
|
d0ea73 |
|
|
|
d0ea73 |
Fixes commit cc04573927cca97de60d544d37467e67c25867a7.
|
|
|
d0ea73 |
|
|
|
d0ea73 |
Thanks: Xiaodai Wang
|
|
|
d0ea73 |
(cherry picked from commit 90c9c12258fbb9a89d16f798725d16fe5bb3504c)
|
|
|
d0ea73 |
---
|
|
|
d0ea73 |
v2v/output_rhv_upload.ml | 6 +++---
|
|
|
d0ea73 |
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
d0ea73 |
|
|
|
d0ea73 |
diff --git a/v2v/output_rhv_upload.ml b/v2v/output_rhv_upload.ml
|
|
|
d0ea73 |
index 63fa2411a..7dbd98a0d 100644
|
|
|
d0ea73 |
--- a/v2v/output_rhv_upload.ml
|
|
|
d0ea73 |
+++ b/v2v/output_rhv_upload.ml
|
|
|
d0ea73 |
@@ -383,13 +383,13 @@ If the messages above are not sufficient to diagnose the problem then add the
|
|
|
d0ea73 |
*)
|
|
|
d0ea73 |
let nr_disks = List.length targets in
|
|
|
d0ea73 |
let image_uuids =
|
|
|
d0ea73 |
- List.map (
|
|
|
d0ea73 |
- fun t ->
|
|
|
d0ea73 |
+ List.mapi (
|
|
|
d0ea73 |
+ fun i t ->
|
|
|
d0ea73 |
let id = t.target_overlay.ov_source.s_disk_id in
|
|
|
d0ea73 |
let diskid_file = diskid_file_of_id id in
|
|
|
d0ea73 |
if not (wait_for_file diskid_file finalization_timeout) then
|
|
|
d0ea73 |
error (f_"transfer of disk %d/%d failed, see earlier error messages")
|
|
|
d0ea73 |
- (id+1) nr_disks;
|
|
|
d0ea73 |
+ (i+1) nr_disks;
|
|
|
d0ea73 |
let diskid = read_whole_file diskid_file in
|
|
|
d0ea73 |
diskid
|
|
|
d0ea73 |
) targets in
|
|
|
d0ea73 |
--
|
|
|
6b9fda |
2.21.0
|
|
|
d0ea73 |
|