Merge ~paelzer/ubuntu/+source/virt-manager:merge-2.2.1-4-groovy into ubuntu/+source/virt-manager:ubuntu/groovy-devel

Proposed by Christian Ehrhardt 
Status: Merged
Approved by: Christian Ehrhardt 
Approved revision: 1d05962b9f5ca8afd5ede04f1e8821e5f3aeced2
Merge reported by: Christian Ehrhardt 
Merged at revision: 1d05962b9f5ca8afd5ede04f1e8821e5f3aeced2
Proposed branch: ~paelzer/ubuntu/+source/virt-manager:merge-2.2.1-4-groovy
Merge into: ubuntu/+source/virt-manager:ubuntu/groovy-devel
Diff against target: 85 lines (+63/-0)
3 files modified
debian/changelog (+7/-0)
debian/patches/lp-1847105-addstorage-Return-to-using-qcow2-sparse-by-default.patch (+55/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Andreas Hasenack Approve
Canonical Server Pending
git-ubuntu developers Pending
Review via email: mp+391055@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Confirmed, this does not need the libvirt build from the PPA - just the virt-manager fix is enough.
Would be awesome to get this uploaded soon to SRU then before groovy freezes even more.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Previous version (takes ages):
  38191 ? Sl 0:12 \_ /usr/bin/qemu-img create -f qcow2 -o preallocation=falloc,compat=1.1,lazy_refcounts /var/lib/libvirt/images/ubuntu20.04.qcow2 26214400K

New version:
root@nsn7:~# apt-cache policy virt-manager
virt-manager:
  Installed: 1:2.2.1-4ubuntu2~ppa1
  Candidate: 1:2.2.1-4ubuntu2~ppa1
  Version table:
 *** 1:2.2.1-4ubuntu2~ppa1 500
        500 http://ppa.launchpad.net/ci-train-ppa-service/4238/ubuntu groovy/main amd64 Packages
        500 http://ppa.launchpad.net/ci-train-ppa-service/4238/ubuntu groovy/main i386 Packages
        100 /var/lib/dpkg/status
     1:2.2.1-4ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu groovy/universe amd64 Packages
        500 http://archive.ubuntu.com/ubuntu groovy/universe i386 Packages

Was so wuick I couldn't grab the ps output on the first try. Ok, got it now:
  47925 ? Sl 0:00 \_ /usr/bin/qemu-img create -f qcow2 -o preallocation=metadata,compat=1.1,lazy_refcounts /var/lib/libvirt/images/ubuntu20.04.qcow2 26214400K

DEP3 header has a minor typo "existin":
Backport-Note: upstream also changed some tests not existin in groovy

Ack to the removed test hunks

review: Approve
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Thanks, typo fixed

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

To ssh://git.launchpad.net/~usd-import-team/ubuntu/+source/virt-manager
 * [new tag] upload/1%2.2.1-4ubuntu2 -> upload/1%2.2.1-4ubuntu2

Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading virt-manager_2.2.1-4ubuntu2.dsc: done.
  Uploading virt-manager_2.2.1-4ubuntu2.debian.tar.xz: done.
  Uploading virt-manager_2.2.1-4ubuntu2_source.buildinfo: done.
  Uploading virt-manager_2.2.1-4ubuntu2_source.changes: done.
Successfully uploaded packages.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

migrated
 virt-manager | 1:2.2.1-4ubuntu2 | groovy/universe | source, all

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index cee8249..3bb98cd 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+virt-manager (1:2.2.1-4ubuntu2) groovy; urgency=medium
7+
8+ * d/p/lp-1847105-addstorage-Return-to-using-qcow2-sparse-by-default.patch:
9+ fix slow disk allocation when using the defaults to to falloc (LP: #1847105)
10+
11+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Mon, 21 Sep 2020 16:28:36 +0200
12+
13 virt-manager (1:2.2.1-4ubuntu1) groovy; urgency=medium
14
15 * Merge with Debian unstable. Remaining changes:
16diff --git a/debian/patches/lp-1847105-addstorage-Return-to-using-qcow2-sparse-by-default.patch b/debian/patches/lp-1847105-addstorage-Return-to-using-qcow2-sparse-by-default.patch
17new file mode 100644
18index 0000000..9e5d819
19--- /dev/null
20+++ b/debian/patches/lp-1847105-addstorage-Return-to-using-qcow2-sparse-by-default.patch
21@@ -0,0 +1,55 @@
22+From ba08f84b3408744e9aa9763d100e8aa217c1f5ff Mon Sep 17 00:00:00 2001
23+From: Cole Robinson <crobinso@redhat.com>
24+Date: Sat, 19 Sep 2020 18:06:45 -0400
25+Subject: [PATCH] addstorage: Return to using qcow2 sparse by default
26+
27+https://bugzilla.redhat.com/show_bug.cgi?id=1759454
28+
29+See 15a6a7e2105440df528f75c4df4d2471df28bd1e
30+
31+The idea behind virt-manager's sparse vs nonsparse default, is that if
32+the user selected 'raw' for as the default image format, assume they
33+want to maximize performance, so fully allocate the disk.
34+
35+qcow2 didn't support anything except sparse, so the sparse=True vs
36+sparse=False made no difference. So we always set sparse=False
37+
38+Then qcow2 grows non-sparse support, and virt-manager is suddenly
39+defaulting to it, which is not the intention.
40+
41+Default to sparse when requested format isn't raw
42+
43+Signed-off-by: Cole Robinson <crobinso@redhat.com>
44+
45+Backport-Note: upstream also changed some tests not existin in groovy
46+Origin: upstream, https://github.com/virt-manager/virt-manager/commit/ba08f84b34
47+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1847105
48+Last-Update: 2020-09-21
49+
50+---
51+ virtManager/device/addstorage.py | 8 ++++++--
52+ 3 files changed, 11 insertions(+), 11 deletions(-)
53+
54+--- a/virtManager/device/addstorage.py
55++++ b/virtManager/device/addstorage.py
56+@@ -176,14 +176,18 @@ class vmmAddStorage(vmmGObjectUI):
57+ if disk.wants_storage_creation():
58+ pool = disk.get_parent_pool()
59+ size = uiutil.spin_get_helper(self.widget("storage-size"))
60+- sparse = False
61++ fmt = self.conn.get_default_storage_format()
62++
63++ # If the user changed the default disk format to raw, assume
64++ # they want to maximize performance, so fully allocate the
65++ # disk image. Otherwise use sparse
66++ sparse = fmt != 'raw'
67+
68+ vol_install = virtinst.DeviceDisk.build_vol_install(
69+ disk.conn, os.path.basename(disk.path), pool,
70+ size, sparse)
71+ disk.set_vol_install(vol_install)
72+
73+- fmt = self.conn.get_default_storage_format()
74+ if disk.get_vol_install().supports_format():
75+ log.debug("Using default prefs format=%s for path=%s",
76+ fmt, disk.path)
77diff --git a/debian/patches/series b/debian/patches/series
78index 06e24c9..9bb79e9 100644
79--- a/debian/patches/series
80+++ b/debian/patches/series
81@@ -1,3 +1,4 @@
82 Use-usr-bin-python.patch
83 mark-libvirt-lxc.patch
84 legacy-images.patch
85+lp-1847105-addstorage-Return-to-using-qcow2-sparse-by-default.patch

Subscribers

People subscribed via source and target branches