Displaying 20 results from an estimated 38 matches for "diskid_file".
2018 Aug 14
2
[PATCH] v2v: -o rhv-upload: Fix error message disk numbering (RHBZ#1615885).
...sages above are not sufficient to diagnose the problem then add the
*)
let nr_disks = List.length targets in
let image_uuids =
- List.map (
- fun t ->
+ List.mapi (
+ fun i t ->
let id = t.target_overlay.ov_source.s_disk_id in
let diskid_file = diskid_file_of_id id in
if not (wait_for_file diskid_file finalization_timeout) then
error (f_"transfer of disk %d/%d failed, see earlier error messages")
- (id+1) nr_disks;
+ (i+1) nr_disks;
let diskid = read_whole_fi...
2019 Sep 16
0
[PATCH 6/8] v2v: -o rhv-upload: collect disks UUIDs right after copy
...This file is written
+ * out by the nbdkit plugin on successful finalization of the
* transfer.
*)
- let nr_disks = List.length targets in
- let image_uuids =
- List.mapi (
- fun i t ->
- let id = t.target_overlay.ov_source.s_disk_id in
- let diskid_file = diskid_file_of_id id in
- if not (wait_for_file diskid_file finalization_timeout) then
- error (f_"transfer of disk %d/%d failed, see earlier error messages")
- (i+1) nr_disks;
- let diskid = read_whole_file diskid_file in
- diskid...
2019 Sep 16
16
[PATCH 0/8] v2v: various fixed for -o rhv-upload
This patch series fixes various issues in the rhv-upload output mode:
- properly find and use RHV resources
- cleanup orphan disks, and possibly the current disk transfer on
failure
In reality, the first 4 patches deal with resources, and the other 4
with cleanups. The latter block can be theoretically sent alone --
I just happened to start working on it as part of my "let's fix
2018 Aug 14
0
Re: [PATCH] v2v: -o rhv-upload: Fix error message disk numbering (RHBZ#1615885).
...e problem then add the
> *)
> let nr_disks = List.length targets in
> let image_uuids =
> - List.map (
> - fun t ->
> + List.mapi (
> + fun i t ->
> let id = t.target_overlay.ov_source.s_disk_id in
> let diskid_file = diskid_file_of_id id in
> if not (wait_for_file diskid_file finalization_timeout) then
> error (f_"transfer of disk %d/%d failed, see earlier error messages")
> - (id+1) nr_disks;
> + (i+1) nr_disks;
This works only...
2019 Sep 09
1
Re: [PATCH] v2v: rhv-upload-plugin - improve wait logic after finalize (RHBZ#1680361)
...break
> except sdk.NotFoundError:
> - pass
> + raise RuntimeError("transfer failed: disk %s not found" %
> disk_id)
>
> # Write the disk ID file. Only do this on successful completion.
> with builtin_open(params['diskid_file'], 'w') as fp:
> --
> 1.8.3.1
>
Looks good.
Nir
2019 Nov 17
2
Re: [PATCH 06/18] rhv-upload: Fix cleanup after errors
...connection.close()
> return
>
> try:
> disk = h['disk']
> - transfer_service = h['transfer_service']
>
> transfer_service.finalize()
>
> @@ -548,11 +546,6 @@ def close(h):
> with builtins.open(params['diskid_file'], 'w') as fp:
> fp.write(disk.id)
>
> - except:
> - # Otherwise on any failure we must clean up the disk.
> - delete_disk_on_failure(h)
> - raise
> -
> finally:
> connection.close()
>
> --
> 2.21.0
&...
2019 Sep 09
3
[PATCH] v2v: rhv-upload-plugin - improve wait logic after finalize
This is a patch which Daniel Erez wrote originally. I have modified
it only to fix a small bug in the debug() statement, and Ilanit kindly
tested it here:
https://bugzilla.redhat.com/show_bug.cgi?id=1680361#c38
Rich.
2019 Mar 17
2
Re: [PATCH v2] v2v: rhv-upload-plugin - improve wait logic after finalize (RHBZ#1680361)
On Sun, Mar 17, 2019 at 3:51 PM Daniel Erez <derez@redhat.com> wrote:
> After invoking transfer_service.finalize, check operation
> status by examining DiskStatus.
> This is done instead of failing after a predefined timeout
> regardless the status.
>
> * not verified *
>
> Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1680361
> ---
>
2018 Mar 08
6
[PATCH v5 0/4] v2v: Add -o rhv-upload output mode.
Mainly minor fixes and code cleanups over the v4 patch.
There are still several problems with this patch, but it is in a
reviewable state, especially the Python code.
Rich.
2018 Mar 08
0
[PATCH v5 4/4] v2v: Add -o rhv-upload output mode.
...e
+ rhv_cafile rhv_direct =
+ (* Create a temporary directory which will be deleted on exit. *)
+ let tmpdir =
+ let base_dir = (open_guestfs ())#get_cachedir () in
+ let t = Mkdtemp.temp_dir ~base_dir "rhvupload." in
+ rmdir_on_exit t;
+ t in
+
+ let diskid_file_of_id id = tmpdir // sprintf "diskid.%d" id in
+
+ (* Write the Python precheck, plugin and create VM to a temporary file. *)
+ let precheck =
+ let precheck = tmpdir // "rhv-upload-precheck.py" in
+ with_open_out
+ precheck
+ (fun chan -> output_string chan...
2018 Mar 08
2
Re: [PATCH v5 4/4] v2v: Add -o rhv-upload output mode.
...v_direct =
> + (* Create a temporary directory which will be deleted on exit. *)
> + let tmpdir =
> + let base_dir = (open_guestfs ())#get_cachedir () in
> + let t = Mkdtemp.temp_dir ~base_dir "rhvupload." in
> + rmdir_on_exit t;
> + t in
> +
> + let diskid_file_of_id id = tmpdir // sprintf "diskid.%d" id in
> +
> + (* Write the Python precheck, plugin and create VM to a temporary file.
> *)
> + let precheck =
> + let precheck = tmpdir // "rhv-upload-precheck.py" in
> + with_open_out
> + precheck
> +...
2018 Mar 11
2
Re: [PATCH v5 4/4] v2v: Add -o rhv-upload output mode.
...v_direct =
> + (* Create a temporary directory which will be deleted on exit. *)
> + let tmpdir =
> + let base_dir = (open_guestfs ())#get_cachedir () in
> + let t = Mkdtemp.temp_dir ~base_dir "rhvupload." in
> + rmdir_on_exit t;
> + t in
> +
> + let diskid_file_of_id id = tmpdir // sprintf "diskid.%d" id in
> +
> + (* Write the Python precheck, plugin and create VM to a temporary file. *)
> + let precheck =
> + let precheck = tmpdir // "rhv-upload-precheck.py" in
> + with_open_out
> + precheck
> +...
2018 Mar 09
1
Re: [PATCH v5 4/4] v2v: Add -o rhv-upload output mode.
...a temporary directory which will be deleted on exit. *)
> + let tmpdir =
> + let base_dir = (open_guestfs ())#get_cachedir () in
> + let t = Mkdtemp.temp_dir ~base_dir "rhvupload." in
> + rmdir_on_exit t;
> + t in
> +
> + let diskid_file_of_id id = tmpdir // sprintf "diskid.%d" id in
> +
> + (* Write the Python precheck, plugin and create VM to a temporary
> file. *)
> + let precheck =
> + let precheck = tmpdir // "rhv-upload-precheck.py" in
> + with_open_out
>...
2018 Mar 21
2
[PATCH v6] v2v: Add -o rhv-upload output mode.
v5 was here:
https://www.redhat.com/archives/libguestfs/2018-March/msg00032.html
There is only a single patch in this version because the other
patches went upstream.
This patch adds the virt-v2v -o rhv-upload mode
(https://bugzilla.redhat.com/show_bug.cgi?id=1557273).
Compared to v5, this adds the ability to make zero, trim and flush
requests to the oVirt imageio server
2018 Mar 21
0
[PATCH v6] v2v: Add -o rhv-upload output mode.
...rhv_direct rhv_verifypeer =
+ (* Create a temporary directory which will be deleted on exit. *)
+ let tmpdir =
+ let base_dir = (open_guestfs ())#get_cachedir () in
+ let t = Mkdtemp.temp_dir ~base_dir "rhvupload." in
+ rmdir_on_exit t;
+ t in
+
+ let diskid_file_of_id id = tmpdir // sprintf "diskid.%d" id in
+
+ (* Write the Python precheck, plugin and create VM to a temporary file. *)
+ let precheck =
+ let precheck = tmpdir // "rhv-upload-precheck.py" in
+ with_open_out
+ precheck
+ (fun chan -> output_string chan...
2018 Mar 12
1
[PATCH RHEL 7] RHEL 7: -o rhv-upload: Use Python 2 instead of Python
For interest only, here is the patch required to make -o rhv-upload
work with Python 2 (for RHEL 7). I don't think we want this upstream.
A couple of remarks:
* It's supposed to be possible to add ‘coding: utf-8’ to the top of
.py files to make Python 2 accept that the file is UTF-8 (otherwise
it gives an error on loading). However I added this and it didn't
appear to make any
2019 Sep 19
2
[PATCH] v2v: -o rhv-upload: add -oo rhv-disk-uuid option
...(
- fun (target_format, ov) ->
+ fun ((target_format, ov), uuid) ->
let id = ov.ov_source.s_disk_id in
let disk_name = sprintf "%s-%03d" output_name id in
let json_params =
@@ -332,6 +352,12 @@ object
let json_params =
("diskid_file", JSON.String diskid_file) :: json_params in
+ let json_params =
+ match uuid with
+ | None -> json_params
+ | Some uuid ->
+ ("rhv_disk_uuid", JSON.String uuid) :: json_params in
+
(* Write the JSON parameters to a file....
2019 Aug 08
2
Re: [PATCH v3] v2v: rhv-upload-plugin - improve wait logic after finalize (RHBZ#1680361)
...break
> except sdk.NotFoundError:
> - pass
> + raise RuntimeError("transfer failed: disk %s not found" % disk_id)
>
> # Write the disk ID file. Only do this on successful completion.
> with builtins.open(params['diskid_file'], 'w') as fp:
Ilanit tested this patch for us. Unfortunately it fails for reasons I
don't really understand but seem to be deep inside the RHV API:
nbdkit: python[1]: error: /var/tmp/v2v.sZm0my/rhv-upload-plugin.py: close: error: ['Traceback (most recent call last):
', &...
2018 Mar 06
5
[PATCH v4 0/3] v2v: Add -o rhv-upload output mode.
Previous versions:
v3: https://www.redhat.com/archives/libguestfs/2018-March/msg00000.html
v2: https://www.redhat.com/archives/libguestfs/2018-February/msg00177.html
v1: https://www.redhat.com/archives/libguestfs/2018-February/msg00139.html
This completely rethinks the approach taken by the previous patches.
Instead of trying to involve qemu's curl driver, this uses a small
Python 3
2018 Mar 22
0
[PATCH v7 6/6] v2v: Add -o rhv-upload output mode (RHBZ#1557273).
...put_storage
+ rhv_options =
+ (* Create a temporary directory which will be deleted on exit. *)
+ let tmpdir =
+ let base_dir = (open_guestfs ())#get_cachedir () in
+ let t = Mkdtemp.temp_dir ~base_dir "rhvupload." in
+ rmdir_on_exit t;
+ t in
+
+ let diskid_file_of_id id = tmpdir // sprintf "diskid.%d" id in
+
+ (* Write the Python precheck, plugin and create VM to a temporary file. *)
+ let precheck =
+ let precheck = tmpdir // "rhv-upload-precheck.py" in
+ with_open_out
+ precheck
+ (fun chan -> output_string chan...