Merge lp:~corey.bryant/nova/2014.1.3 into lp:~ubuntu-server-dev/nova/icehouse

Proposed by Corey Bryant on 2014-10-03
Status: Merged
Merged at revision: 696
Proposed branch: lp:~corey.bryant/nova/2014.1.3
Merge into: lp:~ubuntu-server-dev/nova/icehouse
Diff against target: 421 lines (+102/-216)
4 files modified
debian/changelog (+60/-2)
debian/patches/libvirt-Handle-unsupported-host-capabilities.patch (+42/-53)
debian/patches/libvirt-convert-cpu-features-attribute-from-list-to-.patch (+0/-160)
debian/patches/series (+0/-1)
To merge this branch: bzr merge lp:~corey.bryant/nova/2014.1.3
Reviewer Review Type Date Requested Status
Ubuntu Server Developers 2014-10-03 Pending
Review via email: mp+237127@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2014-09-30 14:41:00 +0000
3+++ debian/changelog 2014-10-03 19:06:52 +0000
4@@ -1,9 +1,67 @@
5-nova (1:2014.1.2-0ubuntu1.1) UNRELEASED; urgency=medium
6+nova (1:2014.1.3-0ubuntu1) UNRELEASED; urgency=medium
7
8+ [ Liam Young ]
9 * d/p/cells-json-store.patch: Fix issue with nova-cells failing when using
10 JSON file to store cell information (LP: #1314677).
11
12- -- Liam Young <liam.young@canonical.com> Mon, 29 Sep 2014 12:59:24 +0000
13+ [ Corey Bryant ]
14+ * Resynchronize with stable/icehouse (a058646) (LP: #1377136):
15+ - [1a95c95] Adds tests for Hyper-V VM Utils
16+ - [bb47d55] Removes unnecessary instructions in test_hypervapi
17+ - [4f41d37] Fixes a Hyper-V list_instances localization issue
18+ - [9015410] Adds list_instance_uuids to the Hyper-V driver
19+ - [3371ad8] Add _wrap_db_error() support to Session.commit()
20+ - [dfb0e0f] Neutron: Atomic update of instance info cache
21+ - [bce481c] Ensure info cache updates don't overwhelm cells
22+ - [f58d95c] Sync process and str utils from oslo
23+ - [4e6371b] remove test_multiprocess_api
24+ - [7e09173] Fixes Hyper-V agent force_hyperv_utils_v1 flag issue
25+ - [7523ab4] Fix attaching config drive issue on Hyper-V when migrate instances
26+ - [74e0ba7] Fix live-migration failure in FC multipath case
27+ - [b61aa4d] libvirt: Save device_path in connection_info when booting from volume
28+ - [f93b8ee] Made unassigned networks visible in flat networking
29+ - [82cc3be] Do not fail cell's instance deletion, if it's missing info_cache
30+ - [d72c0a4] Fixes Hyper-V boot from volume root device issue
31+ - [0d3dad7] Fixes Hyper-V resize down exception
32+ - [5d5970a] db: Add @_retry_on_deadlock to service_update()
33+ - [9596f52] Add Hyper-V driver in the "compute_driver" option description
34+ - [4a8d6ca] Block sqlalchemy migrate 0.9.2 as it breaks all of nova
35+ - [311ab57] Move the error check for "brctl addif"
36+ - [df09c2a] Fix rootwrap for non openstack.org iqn's
37+ - [1613cd99] Fix instance boot when Ceph is used for ephemeral storage
38+ - [4bc680f] Make floatingip-ip-delete atomic with neutron
39+ - [0d69163] Fix race condition with vif plugging in finish migrate
40+ - [520aa4c] libvirt: Use VIR_DOMAIN_AFFECT_LIVE for paused instances
41+ - [3c34e37] add repr for event objects
42+ - [1b7ab22] make lifecycle event logs more clear
43+ - [e1d6e18] Catch missing Glance image attrs with None
44+ - [b591389] Update block_device_info to contain swap and ephemeral disks
45+ - [2155188] Adds get_instance_disk_info to compute drivers
46+ - [87f842d] Fixes Hyper-V vm state issue
47+ - [1106ef2] Fix expected error details from jsonschema
48+ - [e5e6bc7] Include next link when default limit is reached
49+ - [526853e] Fix FloatingIP.save() passing FixedIP object to sqlalchemy
50+ - [4e1e217] Read deleted instances during lifecycle events
51+ - [d8b9ba5] Add a retry_on_deadlock to reservations_expire
52+ - [b53adea] Add expire reservations in backport position.
53+ - [e874ee2] Fixes Hyper-V SCSI slot selection
54+ - [471e644] VMware: do not cache image when root_gb is 0
55+ - [825cfe4] Fix _parse_datetime in simple tenant usage extension
56+ - [073ee06] Avoid traceback logs from simple tenant usage extension
57+ - [9447203] replace NovaException with VirtualInterfaceCreate when neutron fails
58+ - [6b7cb1a] libvirt: convert cpu features attribute from list to a set
59+ - [7ca83e8] Delete image when backup operation failed on snapshot step
60+ - [82a13b3] VM in rescue state must have a restricted set of actions
61+ - [e7d2087] shelve doesn't work on nova-cells environment
62+ - [aeb71a8] libvirt: return the correct instance path while cleanup_resize
63+ - [cce6d22] Fix nova image-show with queued image
64+ - [aff80d5] _translate_from_glance() can cause an unnecessary HTTP request
65+ - [a058646] Loosen import_exceptions to cover all of gettextutils
66+ * d/p/libvirt-convert-cpu-features-attribute-from-list-to-.patch: Dropped.
67+ Code has been fixed upstream.
68+ * d/p/libvirt-Handle-unsupported-host-capabilities.patch: Rebased.
69+
70+ -- Corey Bryant <corey.bryant@canonical.com> Fri, 03 Oct 2014 13:11:04 -0400
71
72 nova (1:2014.1.2-0ubuntu1) trusty; urgency=medium
73
74
75=== modified file 'debian/patches/libvirt-Handle-unsupported-host-capabilities.patch'
76--- debian/patches/libvirt-Handle-unsupported-host-capabilities.patch 2014-06-24 15:47:40 +0000
77+++ debian/patches/libvirt-Handle-unsupported-host-capabilities.patch 2014-10-03 19:06:52 +0000
78@@ -1,10 +1,9 @@
79 Description: Fix exception when starting LXC containers with libvirt-lxc.
80 Author: Chuck Short <zulcss@ubuntu.com>
81 Forwarded: Not Needed.
82-diff -Naurp nova-2014.1.1.orig/nova/tests/virt/libvirt/fakelibvirt.py nova-2014.1.1/nova/tests/virt/libvirt/fakelibvirt.py
83---- nova-2014.1.1.orig/nova/tests/virt/libvirt/fakelibvirt.py 2014-06-05 17:33:22.000000000 -0400
84-+++ nova-2014.1.1/nova/tests/virt/libvirt/fakelibvirt.py 2014-06-09 12:00:11.032072000 -0400
85-@@ -172,18 +172,76 @@ def _parse_disk_info(element):
86+--- a/nova/tests/virt/libvirt/fakelibvirt.py
87++++ b/nova/tests/virt/libvirt/fakelibvirt.py
88+@@ -172,18 +172,76 @@
89
90
91 class libvirtError(Exception):
92@@ -89,7 +88,7 @@
93
94
95 class NWFilter(object):
96-@@ -219,8 +277,10 @@ class Domain(object):
97+@@ -219,8 +277,10 @@
98 try:
99 tree = etree.fromstring(xml)
100 except etree.ParseError:
101@@ -102,7 +101,7 @@
102
103 definition = {}
104
105-@@ -369,7 +429,11 @@ class Domain(object):
106+@@ -369,7 +429,11 @@
107 123456789L]
108
109 def migrateToURI(self, desturi, flags, dname, bandwidth):
110@@ -115,7 +114,7 @@
111
112 def attachDevice(self, xml):
113 disk_info = _parse_disk_info(etree.fromstring(xml))
114-@@ -380,7 +444,11 @@ class Domain(object):
115+@@ -380,7 +444,11 @@
116 def attachDeviceFlags(self, xml, flags):
117 if (flags & VIR_DOMAIN_AFFECT_LIVE and
118 self._state != VIR_DOMAIN_RUNNING):
119@@ -128,7 +127,7 @@
120 self.attachDevice(xml)
121
122 def detachDevice(self, xml):
123-@@ -533,9 +601,11 @@ class Connection(object):
124+@@ -533,9 +601,11 @@
125 'test:///default']
126
127 if uri not in uri_whitelist:
128@@ -143,7 +142,7 @@
129
130 self.readonly = readonly
131 self._uri = uri
132-@@ -594,16 +664,20 @@ class Connection(object):
133+@@ -594,16 +664,20 @@
134 def lookupByID(self, id):
135 if id in self._running_vms:
136 return self._running_vms[id]
137@@ -170,7 +169,7 @@
138
139 def _emit_lifecycle(self, dom, event, detail):
140 if VIR_DOMAIN_EVENT_ID_LIFECYCLE not in self._event_callbacks:
141-@@ -904,14 +978,21 @@ class Connection(object):
142+@@ -904,14 +978,21 @@
143 'user': 26728850000000L,
144 'iowait': 6121490000000L}
145 else:
146@@ -195,7 +194,7 @@
147
148 def nwfilterDefineXML(self, xml):
149 nwfilter = NWFilter(self, xml)
150-@@ -964,6 +1045,24 @@ def registerErrorHandler(handler, ctxt):
151+@@ -964,6 +1045,24 @@
152 pass
153
154
155@@ -220,18 +219,37 @@
156 virDomain = Domain
157
158
159-diff -Naurp nova-2014.1.1.orig/nova/tests/virt/libvirt/test_libvirt.py nova-2014.1.1/nova/tests/virt/libvirt/test_libvirt.py
160---- nova-2014.1.1.orig/nova/tests/virt/libvirt/test_libvirt.py 2014-06-05 17:33:22.000000000 -0400
161-+++ nova-2014.1.1/nova/tests/virt/libvirt/test_libvirt.py 2014-06-09 12:00:11.040072000 -0400
162-@@ -60,6 +60,7 @@ import nova.tests.image.fake
163- from nova.tests import matchers
164- from nova.tests.objects import test_pci_device
165- from nova.tests.virt.libvirt import fake_libvirt_utils
166-+from nova.tests.virt.libvirt import fakelibvirt
167- from nova import utils
168- from nova import version
169- from nova.virt import configdrive
170-@@ -80,7 +81,7 @@ from nova.virt import netutils
171+--- a/nova/virt/libvirt/driver.py
172++++ b/nova/virt/libvirt/driver.py
173+@@ -77,6 +77,7 @@
174+ from nova.openstack.common import excutils
175+ from nova.openstack.common import fileutils
176+ from nova.openstack.common.gettextutils import _
177++from nova.openstack.common.gettextutils import _LW
178+ from nova.openstack.common import importutils
179+ from nova.openstack.common import jsonutils
180+ from nova.openstack.common import log as logging
181+@@ -2888,9 +2889,14 @@
182+ # this -1 checking should be removed later.
183+ if features and features != -1:
184+ self._caps.host.cpu.parse_str(features)
185+- except libvirt.VIR_ERR_NO_SUPPORT:
186+- # Note(yjiang5): ignore if libvirt has no support
187+- pass
188++ except libvirt.libvirtError as ex:
189++ error_code = ex.get_error_code()
190++ if error_code == libvirt.VIR_ERR_NO_SUPPORT:
191++ LOG.warn(_LW("URI %(uri)s does not support full set"
192++ " of host capabilities: " "%(error)s"),
193++ {'uri': self.uri(), 'error': ex})
194++ else:
195++ raise
196+ return self._caps
197+
198+ def get_host_uuid(self):
199+--- a/nova/tests/virt/libvirt/test_libvirt.py
200++++ b/nova/tests/virt/libvirt/test_libvirt.py
201+@@ -83,7 +83,7 @@
202 try:
203 import libvirt
204 except ImportError:
205@@ -240,7 +258,7 @@
206 libvirt_driver.libvirt = libvirt
207
208
209-@@ -849,6 +850,42 @@ class LibvirtConnTestCase(test.TestCase)
210+@@ -887,6 +887,42 @@
211 caps = conn.get_host_capabilities()
212 self.assertIn('aes', [x.name for x in caps.host.cpu.features])
213
214@@ -283,32 +301,3 @@
215 def test_lxc_get_host_capabilities_failed(self):
216 conn = libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), True)
217
218-diff -Naurp nova-2014.1.1.orig/nova/virt/libvirt/driver.py nova-2014.1.1/nova/virt/libvirt/driver.py
219---- nova-2014.1.1.orig/nova/virt/libvirt/driver.py 2014-06-05 17:33:22.000000000 -0400
220-+++ nova-2014.1.1/nova/virt/libvirt/driver.py 2014-06-09 11:59:55.232072000 -0400
221-@@ -76,6 +76,7 @@ from nova.objects import service as serv
222- from nova.openstack.common import excutils
223- from nova.openstack.common import fileutils
224- from nova.openstack.common.gettextutils import _
225-+from nova.openstack.common.gettextutils import _LW
226- from nova.openstack.common import importutils
227- from nova.openstack.common import jsonutils
228- from nova.openstack.common import log as logging
229-@@ -2859,9 +2860,14 @@ class LibvirtDriver(driver.ComputeDriver
230- # this -1 checking should be removed later.
231- if features and features != -1:
232- self._caps.host.cpu.parse_str(features)
233-- except libvirt.VIR_ERR_NO_SUPPORT:
234-- # Note(yjiang5): ignore if libvirt has no support
235-- pass
236-+ except libvirt.libvirtError as ex:
237-+ error_code = ex.get_error_code()
238-+ if error_code == libvirt.VIR_ERR_NO_SUPPORT:
239-+ LOG.warn(_LW("URI %(uri)s does not support full set"
240-+ " of host capabilities: " "%(error)s"),
241-+ {'uri': self.uri(), 'error': ex})
242-+ else:
243-+ raise
244- return self._caps
245-
246- def get_host_uuid(self):
247
248=== removed file 'debian/patches/libvirt-convert-cpu-features-attribute-from-list-to-.patch'
249--- debian/patches/libvirt-convert-cpu-features-attribute-from-list-to-.patch 2014-08-08 17:43:35 +0000
250+++ debian/patches/libvirt-convert-cpu-features-attribute-from-list-to-.patch 1970-01-01 00:00:00 +0000
251@@ -1,160 +0,0 @@
252-Description: libvirt: convert cpu features attribute from list to a set
253-
254-Currently, the cpu features list which is being sent to libvirt,
255-when creating a domain or calling compareCPU, must contain only
256-unique entries. Multiple issues arise when we are updating the
257-features attribute in LibvirtConfigCPU class (for example during
258-migration).
259-
260-This change will change the features attribute from being a list
261-to a set. This make the LibvirtConfigCPU class keep only unique
262-features.
263-Adjusting the LibvirtConfigCPUFeature class to support set
264-operations by overriding the __eq__, __ne__ and __hash__
265-methods.
266-
267-Author: Vladik Romanovsky <vladik.romanovsky@enovance.com>
268-Origin: upstream, Change-Id: I6350fe0e827c860aea77cc4fe56f18f5c1483580
269-Bug-Ubuntu: #1303536
270-Last-Update: 2014-06-25
271-
272----
273- nova/tests/virt/libvirt/test_libvirt.py | 8 ++++----
274- nova/tests/virt/libvirt/test_libvirt_config.py | 24 +++++++++++++++++++++++-
275- nova/virt/libvirt/config.py | 16 +++++++++++++---
276- nova/virt/libvirt/driver.py | 2 +-
277- 4 files changed, 41 insertions(+), 9 deletions(-)
278-
279-diff --git a/nova/tests/virt/libvirt/test_libvirt.py b/nova/tests/virt/libvirt/test_libvirt.py
280-index 1f744b7..9139ab9 100644
281---- a/nova/tests/virt/libvirt/test_libvirt.py
282-+++ b/nova/tests/virt/libvirt/test_libvirt.py
283-@@ -2206,8 +2206,8 @@ class LibvirtConnTestCase(test.TestCase):
284- cpu.model = "Opteron_G4"
285- cpu.vendor = "AMD"
286-
287-- cpu.features.append(vconfig.LibvirtConfigGuestCPUFeature("tm2"))
288-- cpu.features.append(vconfig.LibvirtConfigGuestCPUFeature("ht"))
289-+ cpu.add_feature(vconfig.LibvirtConfigGuestCPUFeature("tm2"))
290-+ cpu.add_feature(vconfig.LibvirtConfigGuestCPUFeature("ht"))
291-
292- caps = vconfig.LibvirtConfigCaps()
293- caps.host = vconfig.LibvirtConfigCapsHost()
294-@@ -2235,8 +2235,8 @@ class LibvirtConnTestCase(test.TestCase):
295- self.assertEqual(conf.cpu.model, "Opteron_G4")
296- self.assertEqual(conf.cpu.vendor, "AMD")
297- self.assertEqual(len(conf.cpu.features), 2)
298-- self.assertEqual(conf.cpu.features[0].name, "tm2")
299-- self.assertEqual(conf.cpu.features[1].name, "ht")
300-+ self.assertEqual(conf.cpu.features.pop().name, "tm2")
301-+ self.assertEqual(conf.cpu.features.pop().name, "ht")
302-
303- def test_get_guest_cpu_config_custom_old(self):
304- def get_lib_version_stub():
305-diff --git a/nova/tests/virt/libvirt/test_libvirt_config.py b/nova/tests/virt/libvirt/test_libvirt_config.py
306-index 2251bf8..fa65ebc 100644
307---- a/nova/tests/virt/libvirt/test_libvirt_config.py
308-+++ b/nova/tests/virt/libvirt/test_libvirt_config.py
309-@@ -235,8 +235,30 @@ class LibvirtConfigCPUTest(LibvirtConfigBaseTest):
310- <arch>x86_64</arch>
311- <model>Penryn</model>
312- <vendor>Intel</vendor>
313-+ <feature name="apic"/>
314- <feature name="mtrr"/>
315-+ </cpu>
316-+ """)
317-+
318-+ def test_only_uniq_cpu_featues(self):
319-+ obj = config.LibvirtConfigCPU()
320-+ obj.model = "Penryn"
321-+ obj.vendor = "Intel"
322-+ obj.arch = "x86_64"
323-+
324-+ obj.add_feature(config.LibvirtConfigCPUFeature("mtrr"))
325-+ obj.add_feature(config.LibvirtConfigCPUFeature("apic"))
326-+ obj.add_feature(config.LibvirtConfigCPUFeature("apic"))
327-+ obj.add_feature(config.LibvirtConfigCPUFeature("mtrr"))
328-+
329-+ xml = obj.to_xml()
330-+ self.assertXmlEqual(xml, """
331-+ <cpu>
332-+ <arch>x86_64</arch>
333-+ <model>Penryn</model>
334-+ <vendor>Intel</vendor>
335- <feature name="apic"/>
336-+ <feature name="mtrr"/>
337- </cpu>
338- """)
339-
340-@@ -285,8 +307,8 @@ class LibvirtConfigGuestCPUTest(LibvirtConfigBaseTest):
341- <arch>x86_64</arch>
342- <model>Penryn</model>
343- <vendor>Intel</vendor>
344-- <feature name="mtrr" policy="require"/>
345- <feature name="apic" policy="require"/>
346-+ <feature name="mtrr" policy="require"/>
347- </cpu>
348- """)
349-
350-diff --git a/nova/virt/libvirt/config.py b/nova/virt/libvirt/config.py
351-index a931b57..f32e178 100644
352---- a/nova/virt/libvirt/config.py
353-+++ b/nova/virt/libvirt/config.py
354-@@ -250,6 +250,15 @@ class LibvirtConfigCPUFeature(LibvirtConfigObject):
355-
356- return ft
357-
358-+ def __eq__(self, obj):
359-+ return obj.name == self.name
360-+
361-+ def __ne__(self, obj):
362-+ return obj.name != self.name
363-+
364-+ def __hash__(self):
365-+ return hash(self.name)
366-+
367-
368- class LibvirtConfigCPU(LibvirtConfigObject):
369-
370-@@ -265,7 +274,7 @@ class LibvirtConfigCPU(LibvirtConfigObject):
371- self.cores = None
372- self.threads = None
373-
374-- self.features = []
375-+ self.features = set()
376-
377- def parse_dom(self, xmldoc):
378- super(LibvirtConfigCPU, self).parse_dom(xmldoc)
379-@@ -305,13 +314,14 @@ class LibvirtConfigCPU(LibvirtConfigObject):
380- top.set("threads", str(self.threads))
381- cpu.append(top)
382-
383-- for f in self.features:
384-+ # sorting the features to allow more predictable tests
385-+ for f in sorted(self.features, key=lambda x: x.name):
386- cpu.append(f.format_dom())
387-
388- return cpu
389-
390- def add_feature(self, feat):
391-- self.features.append(feat)
392-+ self.features.add(feat)
393-
394-
395- class LibvirtConfigGuestCPUFeature(LibvirtConfigCPUFeature):
396-diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py
397-index df367dd..7402363 100644
398---- a/nova/virt/libvirt/driver.py
399-+++ b/nova/virt/libvirt/driver.py
400-@@ -2888,7 +2888,7 @@ class LibvirtDriver(driver.ComputeDriver):
401- for hostfeat in hostcpu.features:
402- guestfeat = vconfig.LibvirtConfigGuestCPUFeature(hostfeat.name)
403- guestfeat.policy = "require"
404-- guestcpu.features.append(guestfeat)
405-+ guestcpu.add_feature(guestfeat)
406-
407- return guestcpu
408-
409---
410-1.9.1
411-
412
413=== modified file 'debian/patches/series'
414--- debian/patches/series 2014-09-30 14:41:00 +0000
415+++ debian/patches/series 2014-10-03 19:06:52 +0000
416@@ -1,5 +1,4 @@
417 # Ubuntu specific patches below here. Note these can be dropped eventually.
418-libvirt-convert-cpu-features-attribute-from-list-to-.patch
419 fix-requirements.patch
420 skip_ipv6_test.patch
421 arm-console-patch.patch

Subscribers

People subscribed via source and target branches