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

97ae69
From aa5608a922bd35db28f555e53aea2308361991dd 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
---
97ae69
 v2v/output_rhv_upload.ml | 11 +----------
97ae69
 v2v/rhv-upload-plugin.py |  4 +---
97ae69
 v2v/virt-v2v.pod         |  6 ------
97ae69
 3 files changed, 2 insertions(+), 19 deletions(-)
97ae69
97ae69
diff --git a/v2v/output_rhv_upload.ml b/v2v/output_rhv_upload.ml
97ae69
index 7dbd98a0d..32c2f8f64 100644
97ae69
--- a/v2v/output_rhv_upload.ml
97ae69
+++ b/v2v/output_rhv_upload.ml
97ae69
@@ -176,19 +176,11 @@ See also \"OUTPUT TO RHV\" in the virt-v2v(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 ());
97ae69
@@ -241,7 +233,6 @@ object
97ae69
     error_unless_ovirtsdk4_module_available ();
97ae69
     error_unless_nbdkit_working ();
97ae69
     error_unless_nbdkit_python3_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
97ae69
index 4fad27fb8..41cb29992 100644
97ae69
--- a/v2v/rhv-upload-plugin.py
97ae69
+++ b/v2v/rhv-upload-plugin.py
97ae69
@@ -139,10 +139,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'],
97ae69
diff --git a/v2v/virt-v2v.pod b/v2v/virt-v2v.pod
97ae69
index 90443373f..91f575617 100644
97ae69
--- a/v2v/virt-v2v.pod
97ae69
+++ b/v2v/virt-v2v.pod
97ae69
@@ -1813,12 +1813,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
-- 
97ae69
2.17.1
97ae69