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

e9bfca
From aa5608a922bd35db28f555e53aea2308361991dd Mon Sep 17 00:00:00 2001
e9bfca
From: "Richard W.M. Jones" <rjones@redhat.com>
e9bfca
Date: Mon, 14 May 2018 10:16:58 +0100
e9bfca
Subject: [PATCH] RHEL 7: v2v: rhv-upload: Remove restriction on -oa sparse.
e9bfca
e9bfca
See: https://bugzilla.redhat.com/show_bug.cgi?id=1565681
e9bfca
and the v2v-devel private thread "Do we already support migration using FC?"
e9bfca
---
e9bfca
 v2v/output_rhv_upload.ml | 11 +----------
e9bfca
 v2v/rhv-upload-plugin.py |  4 +---
e9bfca
 v2v/virt-v2v.pod         |  6 ------
e9bfca
 3 files changed, 2 insertions(+), 19 deletions(-)
e9bfca
e9bfca
diff --git a/v2v/output_rhv_upload.ml b/v2v/output_rhv_upload.ml
e9bfca
index 7dbd98a0d..32c2f8f64 100644
e9bfca
--- a/v2v/output_rhv_upload.ml
e9bfca
+++ b/v2v/output_rhv_upload.ml
e9bfca
@@ -176,19 +176,11 @@ See also \"OUTPUT TO RHV\" in the virt-v2v(1) manual.")
e9bfca
       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.")
e9bfca
   in
e9bfca
 
e9bfca
-  (* Output format/sparse must be raw/sparse.  We may be able to
e9bfca
-   * lift this limitation in future, but it requires changes on the
e9bfca
-   * RHV side.  See TODO file for details.  XXX
e9bfca
-   *)
e9bfca
+  (* Output format must be raw. *)
e9bfca
   let error_current_limitation required_param =
e9bfca
     error (f_"rhv-upload: currently you must use ā€˜%sā€™.  This restriction will be loosened in a future version.") required_param
e9bfca
   in
e9bfca
 
e9bfca
-  let error_unless_output_alloc_sparse () =
e9bfca
-    if output_alloc <> Sparse then
e9bfca
-      error_current_limitation "-oa sparse"
e9bfca
-  in
e9bfca
-
e9bfca
   (* JSON parameters which are invariant between disks. *)
e9bfca
   let json_params = [
e9bfca
     "verbose", JSON.Bool (verbose ());
e9bfca
@@ -241,7 +233,6 @@ object
e9bfca
     error_unless_ovirtsdk4_module_available ();
e9bfca
     error_unless_nbdkit_working ();
e9bfca
     error_unless_nbdkit_python3_working ();
e9bfca
-    error_unless_output_alloc_sparse ();
e9bfca
     if have_selinux then
e9bfca
       error_unless_nbdkit_compiled_with_selinux ()
e9bfca
 
e9bfca
diff --git a/v2v/rhv-upload-plugin.py b/v2v/rhv-upload-plugin.py
e9bfca
index 4fad27fb8..41cb29992 100644
e9bfca
--- a/v2v/rhv-upload-plugin.py
e9bfca
+++ b/v2v/rhv-upload-plugin.py
e9bfca
@@ -139,10 +139,8 @@ def open(readonly):
e9bfca
             format = disk_format,
e9bfca
             initial_size = params['disk_size'],
e9bfca
             provisioned_size = params['disk_size'],
e9bfca
-            # XXX Ignores params['output_sparse'].
e9bfca
-            # Handling this properly will be complex, see:
e9bfca
             # https://www.redhat.com/archives/libguestfs/2018-March/msg00177.html
e9bfca
-            sparse = True,
e9bfca
+            sparse = params['output_sparse'],
e9bfca
             storage_domains = [
e9bfca
                 types.StorageDomain(
e9bfca
                     name = params['output_storage'],
e9bfca
diff --git a/v2v/virt-v2v.pod b/v2v/virt-v2v.pod
e9bfca
index 90443373f..91f575617 100644
e9bfca
--- a/v2v/virt-v2v.pod
e9bfca
+++ b/v2v/virt-v2v.pod
e9bfca
@@ -1813,12 +1813,6 @@ username is not specified then virt-v2v defaults to using
e9bfca
 C<admin@internal> which is the typical superuser account for oVirt
e9bfca
 instances.
e9bfca
 
e9bfca
-=item I<-of raw>
e9bfca
-
e9bfca
-Currently you must use I<-of raw> and you cannot use I<-oa preallocated>.
e9bfca
-
e9bfca
-These restrictions will be loosened in a future version.
e9bfca
-
e9bfca
 =item I<-op> F<password-file>
e9bfca
 
e9bfca
 A file containing a password to be used when connecting to the oVirt
e9bfca
-- 
8ff76f
2.20.1
e9bfca