Merge ~paelzer/ubuntu/+source/virt-manager:bionic-lp-1763609 into ubuntu/+source/virt-manager:ubuntu/devel

Proposed by Christian Ehrhardt 
Status: Merged
Merge reported by: Christian Ehrhardt 
Merged at revision: 48cae6191b7d82aa6d89a8b361ef8544a8dd3756
Proposed branch: ~paelzer/ubuntu/+source/virt-manager:bionic-lp-1763609
Merge into: ubuntu/+source/virt-manager:ubuntu/devel
Diff against target: 173 lines (+31/-17)
10 files modified
NEWS.md (+5/-0)
PKG-INFO (+1/-1)
debian/changelog (+10/-0)
debian/control (+1/-0)
virt-manager.spec (+1/-1)
virtManager/domain.py (+1/-1)
virtManager/manager.py (+2/-2)
virtcli/cliconfig.py (+1/-1)
virtinst/util.py (+0/-5)
virtinst/xmlbuilder.py (+9/-6)
Reviewer Review Type Date Requested Status
Robie Basak Approve
Canonical Server Team Pending
Canonical Server packageset reviewers Pending
Review via email: mp+343168@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
41f2b97... by Christian Ehrhardt 

stable release 1.5.1 changes (LP: #1763618)

Signed-off-by: Christian Ehrhardt <email address hidden>

38418ab... by Christian Ehrhardt 

changelog: stable release 1.5.1 changes (LP: #1763618)

Signed-off-by: Christian Ehrhardt <email address hidden>

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

Extended by upstream stable fixes to avoid crashes in what we release in Bionic.

Revision history for this message
Robie Basak (racb) wrote :

Why doesn't this pull in a new upstream tarball instead of patching up to the equivalent against 1.5.0? Or have I misunderstood?

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

Minor updates on the virt stack where in the past taken as patches OR tarballs by Debian.
Due to that we evaluate on a given change if we want to do it as a patch (when ahead) to avoid getting in conflict with orig tarballs down the road.

Given how small the changes to 1.5.1 were I decided this is the least-pain approach for this case.

Revision history for this message
Robie Basak (racb) wrote :

OK, thanks.

I'm not sure about this pattern. I've not seen it before. I'm on the fence. I appreciate it might save future pain, but it also feels a little misleading to users, who might only glance at the version string and not the changelog.

I'm interested to know what other core devs think.

1e89f2d... by Christian Ehrhardt 

remove 1.5.1 as patch

Signed-off-by: Christian Ehrhardt <email address hidden>

48cae61... by Christian Ehrhardt 

changelog: use upstream tarball for 1.5.1 stable update

Signed-off-by: Christian Ehrhardt <email address hidden>

a48abc8... by Christian Ehrhardt 

New upstream release 1.5.1

Signed-off-by: Christian Ehrhardt <email address hidden>

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

As discussed on IRC, lets decouple the "lets gather opinions" from this case.
Here is had no strong reason so we can go either way.
I repackaged it the classic way with the new orig tarball.

Tarball is from: https://virt-manager.org/download/sources/virt-manager/virt-manager-1.5.1.tar.gz
MP is updated to match all that (removing the patch based approach and adapting changelog).

An new test build is uploaded to https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/3238

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

Thanks for the review - Tag pushed and source uploaded.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/NEWS.md b/NEWS.md
2index 46bf056..1eef998 100644
3--- a/NEWS.md
4+++ b/NEWS.md
5@@ -1,5 +1,10 @@
6 # Virtual Machine Manager News
7
8+## Release 1.5.1 (February 28, 2018)
9+- Bug fix release
10+- Fix potential crash with libxml2 error callbacks
11+- Fix disk/net/mem VM graphs
12+
13 ## Release 1.5.0 (February 06, 2018)
14 - python3 prep work (Radostin Stoyanov, Cole Robinson, Cédric Bosdonnat)
15 - Switch --location ISO to use isoinfo (Andrew Wong)
16diff --git a/PKG-INFO b/PKG-INFO
17index c3ecce2..8741bde 100644
18--- a/PKG-INFO
19+++ b/PKG-INFO
20@@ -1,6 +1,6 @@
21 Metadata-Version: 1.0
22 Name: virt-manager
23-Version: 1.5.0
24+Version: 1.5.1
25 Summary: UNKNOWN
26 Home-page: http://virt-manager.org
27 Author: Cole Robinson
28diff --git a/debian/changelog b/debian/changelog
29index 4b4928e..313de10 100644
30--- a/debian/changelog
31+++ b/debian/changelog
32@@ -1,3 +1,13 @@
33+virt-manager (1:1.5.1-0ubuntu1) bionic; urgency=medium
34+
35+ * d/control: virtinst needs isoinfo to introspect images. To fix that
36+ add a dependency to genisoimage to virtinst (LP: #1763609)
37+ * Merge with latest upstream stable release (LP: #1763618):
38+ - Fixes potential crash with libxml2 error callbacks
39+ - Fixes disk/net/mem VM graphs
40+
41+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Fri, 13 Apr 2018 09:36:46 +0200
42+
43 virt-manager (1:1.5.0-0ubuntu1) bionic; urgency=medium
44
45 * Merge with Debian unstable 1:1.4.3-1 (LP: #1747907 LP: #1741861)
46diff --git a/debian/control b/debian/control
47index 28fe1f0..6297811 100644
48--- a/debian/control
49+++ b/debian/control
50@@ -66,6 +66,7 @@ Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends}, python-libvirt (
51 python-ipaddr,
52 python-libxml2, python-requests,
53 gir1.2-libosinfo-1.0,
54+ genisoimage,
55 Recommends: virt-viewer, qemu-utils
56 Description: Programs to create and clone virtual machines
57 Virtinst is a set of commandline tools to create virtual machines using
58diff --git a/virt-manager.spec b/virt-manager.spec
59index 60f6d5d..aa1a8f3 100644
60--- a/virt-manager.spec
61+++ b/virt-manager.spec
62@@ -19,7 +19,7 @@
63 # End local config
64
65 Name: virt-manager
66-Version: 1.5.0
67+Version: 1.5.1
68 Release: 1%{?dist}
69 %global verrel %{version}-%{release}
70
71diff --git a/virtManager/domain.py b/virtManager/domain.py
72index ed94cf1..6d3dac2 100644
73--- a/virtManager/domain.py
74+++ b/virtManager/domain.py
75@@ -1984,7 +1984,7 @@ class vmmDomain(vmmLibvirtObject):
76 except libvirt.libvirtError as err:
77 logging.error("Error reading mem stats: %s", err)
78
79- pcentCurrMem = (curmem // float(totalmem)) * 100
80+ pcentCurrMem = (curmem / float(totalmem)) * 100
81 pcentCurrMem = max(0.0, min(pcentCurrMem, 100.0))
82
83 return pcentCurrMem, curmem
84diff --git a/virtManager/manager.py b/virtManager/manager.py
85index d6640fb..d38fc4e 100644
86--- a/virtManager/manager.py
87+++ b/virtManager/manager.py
88@@ -1068,7 +1068,7 @@ class vmmManager(vmmGObjectUI):
89 return
90
91 d1, d2 = obj.disk_io_vectors(GRAPH_LEN, self.max_disk_rate)
92- data = [(x + y) // 2 for x, y in zip(d1, d2)]
93+ data = [(x + y) / 2 for x, y in zip(d1, d2)]
94 cell.set_property('data_array', data)
95
96 def network_traffic_img(self, column_ignore, cell, model, _iter, data):
97@@ -1077,5 +1077,5 @@ class vmmManager(vmmGObjectUI):
98 return
99
100 d1, d2 = obj.network_traffic_vectors(GRAPH_LEN, self.max_net_rate)
101- data = [(x + y) // 2 for x, y in zip(d1, d2)]
102+ data = [(x + y) / 2 for x, y in zip(d1, d2)]
103 cell.set_property('data_array', data)
104diff --git a/virtcli/cliconfig.py b/virtcli/cliconfig.py
105index b2446b2..b58b116 100644
106--- a/virtcli/cliconfig.py
107+++ b/virtcli/cliconfig.py
108@@ -68,7 +68,7 @@ def _setup_gsettings_path(schemadir):
109 raise RuntimeError("Failed to compile local gsettings schemas")
110
111
112-__version__ = "1.5.0"
113+__version__ = "1.5.1"
114
115
116 class _CLIConfig(object):
117diff --git a/virtinst/util.py b/virtinst/util.py
118index 2a7bc4d..73c7f78 100644
119--- a/virtinst/util.py
120+++ b/virtinst/util.py
121@@ -298,12 +298,7 @@ def register_libvirt_error_handler():
122 def libvirt_callback(userdata, err):
123 ignore = userdata
124 ignore = err
125- def libxml2_callback(userdata, err):
126- ignore = userdata
127- logging.debug("libxml2 callback error: %s", err)
128 libvirt.registerErrorHandler(f=libvirt_callback, ctx=None)
129- import libxml2
130- libxml2.registerErrorHandler(f=libxml2_callback, ctx=None)
131
132
133 def ensure_meter(meter):
134diff --git a/virtinst/xmlbuilder.py b/virtinst/xmlbuilder.py
135index 550fea8..521a14f 100644
136--- a/virtinst/xmlbuilder.py
137+++ b/virtinst/xmlbuilder.py
138@@ -688,6 +688,10 @@ class _XMLState(object):
139 relative_object_xpath):
140 self._root_name = root_name
141 self._stub_path = "/%s" % self._root_name
142+ self._namespace = ""
143+ if ":" in self._root_name:
144+ ns = self._root_name.split(":")[0]
145+ self._namespace = " xmlns:%s='%s'" % (ns, _namespaces[ns])
146
147 # xpath of this object relative to its parent. So for a standalone
148 # <disk> this is empty, but if the disk is the forth one in a <domain>
149@@ -718,6 +722,10 @@ class _XMLState(object):
150
151 if not parsexml:
152 parsexml = self.make_xml_stub()
153+ elif self._namespace and "xmlns" not in parsexml:
154+ # Make sure passed in XML has required xmlns inserted
155+ parsexml = parsexml.replace("<" + self._root_name,
156+ "<" + self._root_name + self._namespace)
157
158 try:
159 doc = libxml2.parseDoc(parsexml)
160@@ -738,12 +746,7 @@ class _XMLState(object):
161
162
163 def make_xml_stub(self):
164- ret = "<%s" % self._root_name
165- if ":" in self._root_name:
166- ns = self._root_name.split(":")[0]
167- ret += " xmlns:%s='%s'" % (ns, _namespaces[ns])
168- ret += "/>"
169- return ret
170+ return "<%s%s/>" % (self._root_name, self._namespace)
171
172 def set_relative_object_xpath(self, xpath):
173 self._relative_object_xpath = xpath or ""

Subscribers

People subscribed via source and target branches