|
|
3d61c0 |
From a271e4c0e4415a179c26aa62ef8492fd6a2424f5 Mon Sep 17 00:00:00 2001
|
|
|
3d61c0 |
Message-Id: <a271e4c0e4415a179c26aa62ef8492fd6a2424f5@dist-git>
|
|
|
3d61c0 |
From: Pavel Hrdina <phrdina@redhat.com>
|
|
|
3d61c0 |
Date: Mon, 13 May 2019 10:29:23 -0400
|
|
|
3d61c0 |
Subject: [PATCH] clone: Fix inverted --nonsparse check
|
|
|
3d61c0 |
|
|
|
3d61c0 |
From: Cole Robinson <crobinso@redhat.com>
|
|
|
3d61c0 |
|
|
|
3d61c0 |
I botched 4f66c423f7 and inverted the sparse check, meaning --nonsparse
|
|
|
3d61c0 |
on the command line would actually request a sparse image. Fix it
|
|
|
3d61c0 |
|
|
|
3d61c0 |
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1675743
|
|
|
3d61c0 |
(cherry picked from commit 622a363e5bd19491bbf84ec35c6bfdaf8b54ae9a)
|
|
|
3d61c0 |
Signed-off-by: Cole Robinson <crobinso@redhat.com>
|
|
|
3d61c0 |
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
|
|
|
3d61c0 |
---
|
|
|
3d61c0 |
tests/clone-xml/cross-pool-disks-out.xml | 4 ++--
|
|
|
3d61c0 |
virtinst/cloner.py | 2 +-
|
|
|
3d61c0 |
2 files changed, 3 insertions(+), 3 deletions(-)
|
|
|
3d61c0 |
|
|
|
3d61c0 |
diff --git a/tests/clone-xml/cross-pool-disks-out.xml b/tests/clone-xml/cross-pool-disks-out.xml
|
|
|
3d61c0 |
index 6093e240..260f321c 100644
|
|
|
3d61c0 |
--- a/tests/clone-xml/cross-pool-disks-out.xml
|
|
|
3d61c0 |
+++ b/tests/clone-xml/cross-pool-disks-out.xml
|
|
|
3d61c0 |
@@ -1,7 +1,7 @@
|
|
|
3d61c0 |
<volume>
|
|
|
3d61c0 |
<name>new1.img</name>
|
|
|
3d61c0 |
<capacity>1000000</capacity>
|
|
|
3d61c0 |
- <allocation>1000000</allocation>
|
|
|
3d61c0 |
+ <allocation>50000</allocation>
|
|
|
3d61c0 |
<target>
|
|
|
3d61c0 |
<format type="qcow2"/>
|
|
|
3d61c0 |
<features>
|
|
|
3d61c0 |
@@ -12,7 +12,7 @@
|
|
|
3d61c0 |
<volume>
|
|
|
3d61c0 |
<name>new2.img</name>
|
|
|
3d61c0 |
<capacity>1000000</capacity>
|
|
|
3d61c0 |
- <allocation>1000000</allocation>
|
|
|
3d61c0 |
+ <allocation>50000</allocation>
|
|
|
3d61c0 |
<target>
|
|
|
3d61c0 |
<format type="qcow2"/>
|
|
|
3d61c0 |
<features>
|
|
|
3d61c0 |
diff --git a/virtinst/cloner.py b/virtinst/cloner.py
|
|
|
3d61c0 |
index 3ce44b15..6d1196d9 100644
|
|
|
3d61c0 |
--- a/virtinst/cloner.py
|
|
|
3d61c0 |
+++ b/virtinst/cloner.py
|
|
|
3d61c0 |
@@ -348,7 +348,7 @@ class Cloner(object):
|
|
|
3d61c0 |
vol_install.input_vol = orig_disk.get_vol_object()
|
|
|
3d61c0 |
vol_install.sync_input_vol(only_format=True)
|
|
|
3d61c0 |
|
|
|
3d61c0 |
- if self.clone_sparse:
|
|
|
3d61c0 |
+ if not self.clone_sparse:
|
|
|
3d61c0 |
vol_install.allocation = vol_install.capacity
|
|
|
3d61c0 |
vol_install.reflink = self.reflink
|
|
|
3d61c0 |
clone_disk.set_vol_install(vol_install)
|
|
|
3d61c0 |
--
|
|
|
3d61c0 |
2.21.0
|
|
|
3d61c0 |
|