Blame SOURCES/0030-RHEL-7-v2v-rhv-upload-Remove-restriction-on-oa-spars.patch

85dfdf
From aef93211935578c97aedef2c4581bb9b7a9bb4d4 Mon Sep 17 00:00:00 2001
97ae69
From: "Richard W.M. Jones" <rjones@redhat.com>
97ae69
Date: Mon, 14 May 2018 10:16:58 +0100
97ae69
Subject: [PATCH] RHEL 7: v2v: rhv-upload: Remove restriction on -oa sparse.
97ae69
97ae69
See: https://bugzilla.redhat.com/show_bug.cgi?id=1565681
97ae69
and the v2v-devel private thread "Do we already support migration using FC?"
97ae69
---
a034fe
 v2v/output_rhv_upload.ml    | 11 +----------
a034fe
 v2v/rhv-upload-plugin.py    |  4 +---
a034fe
 v2v/virt-v2v-output-rhv.pod |  8 +-------
a034fe
 3 files changed, 3 insertions(+), 20 deletions(-)
97ae69
97ae69
diff --git a/v2v/output_rhv_upload.ml b/v2v/output_rhv_upload.ml
a034fe
index c2a5c72c7..3d6d99008 100644
97ae69
--- a/v2v/output_rhv_upload.ml
97ae69
+++ b/v2v/output_rhv_upload.ml
a034fe
@@ -164,19 +164,11 @@ See also the virt-v2v-output-rhv(1) manual.")
97ae69
       error (f_"nbdkit was compiled without SELinux support.  You will have to recompile nbdkit with libselinux-devel installed, or else set SELinux to Permissive mode while doing the conversion.")
97ae69
   in
97ae69
 
97ae69
-  (* Output format/sparse must be raw/sparse.  We may be able to
97ae69
-   * lift this limitation in future, but it requires changes on the
97ae69
-   * RHV side.  See TODO file for details.  XXX
97ae69
-   *)
97ae69
+  (* Output format must be raw. *)
97ae69
   let error_current_limitation required_param =
97ae69
     error (f_"rhv-upload: currently you must use ā€˜%sā€™.  This restriction will be loosened in a future version.") required_param
97ae69
   in
97ae69
 
97ae69
-  let error_unless_output_alloc_sparse () =
97ae69
-    if output_alloc <> Sparse then
97ae69
-      error_current_limitation "-oa sparse"
97ae69
-  in
97ae69
-
97ae69
   (* JSON parameters which are invariant between disks. *)
97ae69
   let json_params = [
97ae69
     "verbose", JSON.Bool (verbose ());
a034fe
@@ -229,7 +221,6 @@ object
97ae69
     error_unless_ovirtsdk4_module_available ();
97ae69
     error_unless_nbdkit_working ();
a034fe
     error_unless_nbdkit_python_plugin_working ();
97ae69
-    error_unless_output_alloc_sparse ();
97ae69
     if have_selinux then
97ae69
       error_unless_nbdkit_compiled_with_selinux ()
97ae69
 
97ae69
diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py
85dfdf
index 4d61a089b..a631d54d6 100644
97ae69
--- a/v2v/rhv-upload-plugin.py
97ae69
+++ b/v2v/rhv-upload-plugin.py
a034fe
@@ -140,10 +140,8 @@ def open(readonly):
97ae69
             format = disk_format,
97ae69
             initial_size = params['disk_size'],
97ae69
             provisioned_size = params['disk_size'],
97ae69
-            # XXX Ignores params['output_sparse'].
97ae69
-            # Handling this properly will be complex, see:
97ae69
             # https://www.redhat.com/archives/libguestfs/2018-March/msg00177.html
97ae69
-            sparse = True,
97ae69
+            sparse = params['output_sparse'],
97ae69
             storage_domains = [
97ae69
                 types.StorageDomain(
97ae69
                     name = params['output_storage'],
a034fe
diff --git a/v2v/virt-v2v-output-rhv.pod b/v2v/virt-v2v-output-rhv.pod
a034fe
index 651f61dae..4608cac45 100644
a034fe
--- a/v2v/virt-v2v-output-rhv.pod
a034fe
+++ b/v2v/virt-v2v-output-rhv.pod
a034fe
@@ -5,7 +5,7 @@ virt-v2v-output-rhv - Using virt-v2v to convert guests to oVirt or RHV
a034fe
 =head1 SYNOPSIS
a034fe
 
a034fe
  virt-v2v [-i* options] -o rhv-upload [-oc ENGINE_URL] -os STORAGE
a034fe
-                        [-op PASSWORD] [-of raw]
a034fe
+                        [-op PASSWORD]
a034fe
                         [-oo rhv-cafile=FILE]
a034fe
                         [-oo rhv-cluster=CLUSTER]
a034fe
                         [-oo rhv-direct]
a034fe
@@ -78,12 +78,6 @@ username is not specified then virt-v2v defaults to using
97ae69
 C<admin@internal> which is the typical superuser account for oVirt
97ae69
 instances.
97ae69
 
97ae69
-=item I<-of raw>
97ae69
-
97ae69
-Currently you must use I<-of raw> and you cannot use I<-oa preallocated>.
97ae69
-
97ae69
-These restrictions will be loosened in a future version.
97ae69
-
97ae69
 =item I<-op> F<password-file>
97ae69
 
97ae69
 A file containing a password to be used when connecting to the oVirt
97ae69
-- 
a034fe
2.21.0
97ae69