search for: python_script

Displaying 20 results from an estimated 35 matches for "python_script".

2019 Sep 19
2
[PATCH 1/2] v2v: add optional tmpdir parameter for Python_script
Add an optional parameter for Python_script.create, to specific the temporary directory to use instead of creating a new one. --- v2v/python_script.ml | 13 ++++++++----- v2v/python_script.mli | 5 ++++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/v2v/python_script.ml b/v2v/python_script.ml index 3159373a1..6bb14ec1f 1...
2019 Sep 19
1
Re: [PATCH 2/2] v2v: -o rhv-upload: use same tmpdir for Python scripts
...c5c79..78e9145c6 100644 > --- a/v2v/output_rhv_upload.ml > +++ b/v2v/output_rhv_upload.ml > @@ -106,19 +106,19 @@ class output_rhv_upload output_alloc output_conn > > (* Create Python scripts for precheck, vmcheck, plugin and create VM. *) > let precheck_script = > - Python_script.create ~name:"rhv-upload-precheck.py" > + Python_script.create ~name:"rhv-upload-precheck.py" ~tmpdir > Output_rhv_upload_precheck_source.code in > let vmcheck_script = > - Python_script.create ~name:"rhv-upload-vmcheck.py&quot...
2018 Aug 05
1
Uneeded ?
Looking in recent patch: Author: Richard W.M. Jones <rjones@redhat.com> Date: Fri Aug 3 12:00:01 2018 +0100 v2v: python_script: Use correct syntax for array slices in documentation. Fixes commit 3d4df397320e8e86932f0b0b4d100644eefc99b4. diff --git a/v2v/python_script.mli b/v2v/python_script.mli index e30917833..cf137b142 100644 --- a/v2v/python_script.mli +++ b/v2v/python_script.mli @@ -44,7 +44,7 @@ with open(sys.ar...
2019 Sep 19
0
[PATCH 2/2] v2v: -o rhv-upload: use same tmpdir for Python scripts
...v2v/output_rhv_upload.ml index eec9c5c79..78e9145c6 100644 --- a/v2v/output_rhv_upload.ml +++ b/v2v/output_rhv_upload.ml @@ -106,19 +106,19 @@ class output_rhv_upload output_alloc output_conn (* Create Python scripts for precheck, vmcheck, plugin and create VM. *) let precheck_script = - Python_script.create ~name:"rhv-upload-precheck.py" + Python_script.create ~name:"rhv-upload-precheck.py" ~tmpdir Output_rhv_upload_precheck_source.code in let vmcheck_script = - Python_script.create ~name:"rhv-upload-vmcheck.py" + Python_script...
2019 Jan 08
2
[PATCH] v2v: -o rhv-upload: Allow configure commands to set the Python version.
...| 5 +++++ m4/guestfs-v2v.m4 | 38 ++++++++++++++++++++++++++++++++++++++ v2v/Makefile.am | 4 ++++ v2v/config.ml.in | 21 +++++++++++++++++++++ v2v/config.mli | 37 +++++++++++++++++++++++++++++++++++++ v2v/output_rhv_upload.ml | 18 +++++++++++++++--- v2v/python_script.ml | 15 +++++---------- v2v/python_script.mli | 14 +++++--------- 9 files changed, 131 insertions(+), 22 deletions(-) diff --git a/.gitignore b/.gitignore index fe5aa6d70..637bf7765 100644 --- a/.gitignore +++ b/.gitignore @@ -678,6 +678,7 @@ Makefile.in /utils/qemu-boot/qemu-boot /util...
2020 Apr 06
0
[PATCH virt-v2v v2 2/2] v2v: Allow large temporary directory to be set on a global basis.
...++++++++++--------- v2v/input_ova.ml | 4 ++-- v2v/input_vmx.ml | 3 +-- v2v/nbdkit.ml | 3 +-- v2v/output_glance.ml | 3 +-- v2v/output_null.ml | 3 +-- v2v/output_rhv_upload.ml | 29 ++++++++++++++++------------- v2v/parse_ova.ml | 6 ++---- v2v/python_script.ml | 12 +++--------- v2v/python_script.mli | 5 +---- v2v/utils.ml | 6 +++++- v2v/utils.mli | 5 +++++ v2v/v2v.ml | 14 ++++++-------- 13 files changed, 64 insertions(+), 58 deletions(-) diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod index 3f8cc...
2018 Dec 13
3
[PATCH] v2v: -o rhv-upload: decouple name of nbdkit python plugin
...n" let pidfile_timeout = 30 let finalization_timeout = 5*60 @@ -139,14 +140,14 @@ class output_rhv_upload output_alloc output_conn *) let error_unless_nbdkit_python_plugin_working () = let cmd = sprintf "nbdkit %s %s --dump-plugin >/dev/null" - Python_script.python + nbdkit_python_plugin (quote (Python_script.path plugin_script)) in debug "%s" cmd; if Sys.command cmd <> 0 then error (f_"nbdkit %s plugin is not installed or not working. It is required if you want to use ‘...
2020 Apr 06
6
[PATCH virt-v2v v2 0/2] v2v: Large temporary directory handling.
...ling for small temporary files and large temporary files. Small temporary files go into $TMPDIR (/tmp). Large files only go into $VIRT_V2V_TMPDIR or $LIBGUESTFS_CACHEDIR or /var/tmp. - Some code simplification, eg. we don't really need to pass a temporary directory parameter to the Python_script module. Rich.
2019 Sep 16
0
[PATCH 1/8] v2v: -o rhv-upload: split vmcheck out of precheck
...ass output_rhv_upload output_alloc output_conn let diskid_file_of_id id = tmpdir // sprintf "diskid.%d" id in - (* Create Python scripts for precheck, plugin and create VM. *) + (* Create Python scripts for precheck, vmcheck, plugin and create VM. *) let precheck_script = Python_script.create ~name:"rhv-upload-precheck.py" Output_rhv_upload_precheck_source.code in + let vmcheck_script = + Python_script.create ~name:"rhv-upload-vmcheck.py" + Output_rhv_upload_vmcheck_source.code in let plugin_script =...
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
2019 Sep 16
0
[PATCH 7/8] v2v: -o rhv-upload: remove uploaded disks on failure
...ce.ml: $(srcdir)/rhv-upload-precheck.py diff --git a/v2v/output_rhv_upload.ml b/v2v/output_rhv_upload.ml index 0952af188..89d8e9612 100644 --- a/v2v/output_rhv_upload.ml +++ b/v2v/output_rhv_upload.ml @@ -107,6 +107,9 @@ class output_rhv_upload output_alloc output_conn let createvm_script = Python_script.create ~name:"rhv-upload-createvm.py" Output_rhv_upload_createvm_source.code in + let deletedisks_script = + Python_script.create ~name:"rhv-upload-deletedisks.py" + Output_rhv_upload_deletedisks_source.code in (* Check...
2019 Apr 08
0
[PATCH 01/11] v2v: Move have_selinux to utils.
...*) let error_unless_vddk_libdir () = (match libdir with diff --git a/v2v/output_rhv_upload.ml b/v2v/output_rhv_upload.ml index 77c39107e..0709c8152 100644 --- a/v2v/output_rhv_upload.ml +++ b/v2v/output_rhv_upload.ml @@ -105,10 +105,6 @@ class output_rhv_upload output_alloc output_conn Python_script.create ~name:"rhv-upload-createvm.py" Output_rhv_upload_createvm_source.code in - (* Is SELinux enabled and enforcing on the host? *) - let have_selinux = - 0 = Sys.command "getenforce 2>/dev/null | grep -isq Enforcing" in - (* Check that t...
2019 Sep 17
1
Re: [PATCH 7/8] v2v: -o rhv-upload: remove uploaded disks on failure
...cy with other classes. See here for example: https://github.com/libguestfs/libguestfs/blob/dea9636c596acd030c9955057863cf080bdd89fb/v2v/output_openstack.ml#L395-L398 (1) Declare a val mutable in the object: val mutable delete_disks_on_exit = true > @@ -275,6 +290,13 @@ object > if Python_script.run_command vmcheck_script json_params [] <> 0 then > error (f_"failed vmchecks, see earlier errors"); > > + (* Set up an at-exit handler so we delete the orphan disks on failure. *) > + at_exit ( > + fun () -> > + if disks_uuids <&...
2018 Aug 17
8
[PATCH v3 4/4] v2v: Add --print-estimate option to print copy size
I rethought this again, as I think that it's a dangerous assumption to bake qemu-img measure output into our API. This patch series runs qemu-img measure behind the scenes, but then parses the output and sums it to a single number which we print. Doing that required a bit of reworking, moving the Jansson [JSON parser] bindings from virt-builder into the common directory and a couple of other
2019 Sep 16
0
[PATCH 3/8] v2v: -o rhv-upload: improve lookup of specified resources (RHBZ#1612653)
...2v/output_rhv_upload.ml @@ -223,6 +223,11 @@ See also the virt-v2v-output-rhv(1) manual.") object inherit output + (* The storage domain UUID. *) + val mutable rhv_storagedomain_uuid = None + (* The cluster UUID. *) + val mutable rhv_cluster_uuid = None + method precheck () = Python_script.error_unless_python_interpreter_found (); error_unless_ovirtsdk4_module_available (); @@ -237,6 +242,10 @@ object let json = JSON_parser.json_parser_tree_parse_file precheck_fn in debug "precheck output parsed as: %s" (JSON.string_of_doc ~fmt:JSON.Indented [&quot...
2018 Nov 19
2
[PATCH] common/mltools: Add a debug statement when we try to run a non-existent program.
Previously: $ virt-v2v -v -x -i disk fedora-28.img -o openstack -oo server-id=foo virt-v2v: libguestfs 1.39.11fedora=29,release=1.fc29,libvirt (x86_64) libvirt version: 4.5.0 virt-v2v: error: openstack: precheck failed, there may be a problem with authentication, see earlier error messages rm -rf '/var/tmp/null.dTxRFN' Notice there is no "earlier error message".
2019 Dec 13
8
[v2v PATCH 0/7] Various build fixes
Just like the similar series that already went in for libguestfs [1], do similar fixes also for virt-v2v, with additional fixes for the builddir!=srcdir case. This will also need the fix to subdir-rules.mk. [1] https://www.redhat.com/archives/libguestfs/2019-December/msg00062.html Pino Toscano (7): Update common to latest build: stop shipping files generated by configure build: use the
2020 Apr 02
6
[PATCH virt-v2v] v2v: Allow temporary directory to be set on a global basis.
...rt-v2v.pod | 21 +++++++++++++++++---- v2v/input_ova.ml | 4 ++-- v2v/input_vmx.ml | 3 +-- v2v/nbdkit.ml | 3 +-- v2v/output_glance.ml | 3 +-- v2v/output_null.ml | 5 ++--- v2v/output_rhv_upload.ml | 3 +-- v2v/parse_ova.ml | 5 ++--- v2v/python_script.ml | 3 +-- v2v/utils.ml | 8 ++++++-- v2v/utils.mli | 4 ++++ v2v/v2v.ml | 15 ++++++--------- 12 files changed, 44 insertions(+), 33 deletions(-) diff --git a/docs/virt-v2v.pod b/docs/virt-v2v.pod index ed95fdc8e..dbfd10cad 100644 --- a/docs/virt-v2v.p...
2018 Nov 20
0
Re: [PATCH] common/mltools: Add a debug statement when we try to run a non-existent program.
...de, fn, _) when errcode = Unix.ENOENT -> > + debug "%s: %s: executable not found" app fn; > + Or 127 This is OK. Though, in the specific case of output_openstack#precheck I'd still check for the existance of the "openstack" executable first, just like what Python_script.error_unless_python_interpreter_found does. This way there is a better error message to cover the case described in the commit message, even in case -v is not passed. -- Pino Toscano
2019 Jan 11
0
Re: [PATCH] v2v: -o rhv-upload: Allow configure commands to set the Python version.
...hon > + 2 scripts and use the following configure option to adjust this > + interpreter accordingly: > + > + [./configure --with-virt-v2v-python-interpreter=...] *) To support Python 2 way more changes are needed though, other than the interpreter, so patching one line more in python_script.ml is not a big deal in that case. > ./configure --with-virt-v2v-nbdkit-python-plugin=... This would be OKish, although needed because of downstream changes in Fedora (where the Python plugin of nbdkit is built also as Python 3, and this version is renamed to "python3"). -- Pino To...