Blame SOURCES/0081-RHEL-8-v2v-rhv-upload-Remove-restriction-on-oa-spars.patch

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