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

Proposed by Corey Bryant
Status: Merged
Merged at revision: 693
Proposed branch: lp:~corey.bryant/nova/2014.1.2
Merge into: lp:~ubuntu-server-dev/nova/icehouse
Diff against target: 270 lines (+210/-13)
4 files modified
debian/changelog (+49/-0)
debian/patches/fix-requirements.patch (+0/-13)
debian/patches/libvirt-convert-cpu-features-attribute-from-list-to-.patch (+160/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~corey.bryant/nova/2014.1.2
Reviewer Review Type Date Requested Status
Chuck Short (community) Needs Fixing
Review via email: mp+230128@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Chuck Short (zulcss) wrote :

Can you resync the branch with what we have in the archive?

review: Needs Fixing
Revision history for this message
Corey Bryant (corey.bryant) wrote :

> Can you resync the branch with what we have in the archive?

Ok, new branch has been pushed after resyncing. The resync resulted in a new patch that hasn't been applied yet upstream.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

> > Can you resync the branch with what we have in the archive?
>
> Ok, new branch has been pushed after resyncing. The resync resulted in a new
> patch that hasn't been applied yet upstream.

The new patch is libvirt-convert-cpu-features-attribute-from-list-to-.patch

Revision history for this message
Corey Bryant (corey.bryant) wrote :

> Can you resync the branch with what we have in the archive?

Chuck, thanks for reviewing. I've resync'd and pushed a new version that is ready for review.

lp:~corey.bryant/nova/2014.1.2 updated
693. By James Page

* Resynchronize with stable/icehouse (c545075) (LP: #1354159):
  - [1408081] Mask block_device_info auth_password in virt driver debug logs
  - [8d7de91] VMware: Add check for datacenter with no datastore
  - [0d9419f] Fixes hyper-v volume attach when host is AD member
  - [1469c8e] Prevent clean-up of migrating instances on compute init
  - [0617601] VMware: use default values in get_info() when properties are missing
  - [c8df2ac] Set python hash seed to 0 in tox.ini
  - [7de0132] Do not pass instances without host to compute API
  - [811cab7] Do not process events for instances without host
  - [0e1580e] Attach/detach interface to paused instance with affect live flag
  - [397de7b] Turn periodic tasks off in all unit tests
  - [9f59ca7] Avoid possible timing attack in metadata api
  - [72cc37d] Handle service creation race by service workers
  - [af7ba1c] Fixes rbd backend image size
  - [a8b52c0] VMware: Fix race in spawn() when resizing cached image
  - [132d5a2] Avoid re-adding iptables rules for instances that have disappeared
  - [0142324] VMware: Fix fake raising the wrong exception in _remove_file
  - [b08f62a] Fix security group list when not defined for an instance
  - [f598864] libvirt: Make nwfilter driver use right filterref
  - [da777f1] Make sure domain exists before referencing it
  - [8d260a8] Scheduler: enable scheduler hint to pass the group name
  - [4c551d9] Instance groups: add method get_by_hint
  - [9f5d2a6] Avoid referencing stale instance/network_info dicts in firewall
  - [e43c43e] Neutronv2 api does not support neutron without port quota
  - [120ecf3] Fix the wrong dest of 'vlan' option and add new 'vlan_start' option
  - [f864329] Use default rpc_response_timeout in unit tests
  - [4aeefa7] Network: ensure that ports are 'unset' when instance is deleted
  - [a365897] Save connection info in libvirt after volume connect
  - [d1c5736] Cleanup allocating networks when InstanceNotFound is raised
  - [2f40191] Failure during termination should always leave state as error()
  - [485f25d] Use no_timer_check with soft-qemu
  - [0994254] Use correct project/user for quotas
  - [4c6b0f7] Revert "Remove broken quota-classes API"
  - [96212b1] libvirt: Refresh volume connection_info after volume snapshot
  - [c104f2f] Set the volume access mode during volume attach
  - [c754305] VCDriver - Ignore host in Maintenance mode in stats update
  - [4820dbb] VMware: Fix memory leaks caused by caches
  - [0252c87] Include pending task in log message on skip sync_power_state
  - [9095bcf] Fixes Hyper-V iSCSI target login method
  - [17e71f7] VMware: prevent image snapshot if no root disk defined
  - [c545075] versions API: ignore request with a body
* d/p/fix-requirements.patch: Refreshed.
* d/watch: Point to tarballs.openstack.org for release artifacts.
* Cherry picked two fixes from upstream.
  - [2cebfd2] libvirt: convert cpu features attribute from list to a set (LP: #1267191)
  - [b86a0e5] Fixes rdb backend image size (LP: #1219658)

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-06-24 15:47:40 +0000
3+++ debian/changelog 2014-08-08 18:21:34 +0000
4@@ -1,3 +1,52 @@
5+nova (1:2014.1.2-0ubuntu1) trusty; urgency=medium
6+
7+ * Resynchronize with stable/icehouse (c545075) (LP: #1354159):
8+ - [1408081] Mask block_device_info auth_password in virt driver debug logs
9+ - [8d7de91] VMware: Add check for datacenter with no datastore
10+ - [0d9419f] Fixes hyper-v volume attach when host is AD member
11+ - [1469c8e] Prevent clean-up of migrating instances on compute init
12+ - [0617601] VMware: use default values in get_info() when properties are missing
13+ - [c8df2ac] Set python hash seed to 0 in tox.ini
14+ - [7de0132] Do not pass instances without host to compute API
15+ - [811cab7] Do not process events for instances without host
16+ - [0e1580e] Attach/detach interface to paused instance with affect live flag
17+ - [397de7b] Turn periodic tasks off in all unit tests
18+ - [9f59ca7] Avoid possible timing attack in metadata api
19+ - [72cc37d] Handle service creation race by service workers
20+ - [af7ba1c] Fixes rbd backend image size
21+ - [a8b52c0] VMware: Fix race in spawn() when resizing cached image
22+ - [132d5a2] Avoid re-adding iptables rules for instances that have disappeared
23+ - [0142324] VMware: Fix fake raising the wrong exception in _remove_file
24+ - [b08f62a] Fix security group list when not defined for an instance
25+ - [f598864] libvirt: Make nwfilter driver use right filterref
26+ - [da777f1] Make sure domain exists before referencing it
27+ - [8d260a8] Scheduler: enable scheduler hint to pass the group name
28+ - [4c551d9] Instance groups: add method get_by_hint
29+ - [9f5d2a6] Avoid referencing stale instance/network_info dicts in firewall
30+ - [e43c43e] Neutronv2 api does not support neutron without port quota
31+ - [120ecf3] Fix the wrong dest of 'vlan' option and add new 'vlan_start' option
32+ - [f864329] Use default rpc_response_timeout in unit tests
33+ - [4aeefa7] Network: ensure that ports are 'unset' when instance is deleted
34+ - [a365897] Save connection info in libvirt after volume connect
35+ - [d1c5736] Cleanup allocating networks when InstanceNotFound is raised
36+ - [2f40191] Failure during termination should always leave state as error()
37+ - [485f25d] Use no_timer_check with soft-qemu
38+ - [0994254] Use correct project/user for quotas
39+ - [4c6b0f7] Revert "Remove broken quota-classes API"
40+ - [96212b1] libvirt: Refresh volume connection_info after volume snapshot
41+ - [c104f2f] Set the volume access mode during volume attach
42+ - [c754305] VCDriver - Ignore host in Maintenance mode in stats update
43+ - [4820dbb] VMware: Fix memory leaks caused by caches
44+ - [0252c87] Include pending task in log message on skip sync_power_state
45+ - [9095bcf] Fixes Hyper-V iSCSI target login method
46+ - [17e71f7] VMware: prevent image snapshot if no root disk defined
47+ - [c545075] versions API: ignore request with a body
48+ * d/p/fix-requirements.patch: Refreshed.
49+ * d/p/libvirt-convert-cpu-features-attribute-from-list-to-.patch: convert cpu
50+ features attribute from list to a set (LP: #1267191)
51+
52+ -- Corey Bryant <corey.bryant@canonical.com> Thu, 07 Aug 2014 17:16:50 -0400
53+
54 nova (1:2014.1.1-0ubuntu1) trusty; urgency=medium
55
56 * Resynchronize with stable/icehouse (867341f) (LP: #1328134):
57
58=== added file 'debian/patches/fix-requirements.patch'
59--- debian/patches/fix-requirements.patch 1970-01-01 00:00:00 +0000
60+++ debian/patches/fix-requirements.patch 2014-08-08 18:21:34 +0000
61@@ -0,0 +1,16 @@
62+Description: Disable websockify and set min version of six.
63+Author: Corey Bryant <corey.bryant@canonical.com>
64+Forwarded: Not needed.
65+--- a/requirements.txt
66++++ b/requirements.txt
67+@@ -25,9 +25,8 @@
68+ python-neutronclient>=2.3.4,<3
69+ python-glanceclient>=0.9.0
70+ python-keystoneclient>=0.7.0
71+-six>=1.6.0
72++six>=1.5.2
73+ stevedore>=0.14
74+-websockify>=0.5.1,<0.6
75+ wsgiref>=0.1.2
76+ oslo.config>=1.2.0
77+ oslo.rootwrap
78
79=== removed file 'debian/patches/fix-requirements.patch'
80--- debian/patches/fix-requirements.patch 2014-03-30 17:14:41 +0000
81+++ debian/patches/fix-requirements.patch 1970-01-01 00:00:00 +0000
82@@ -1,13 +0,0 @@
83-diff --git a/requirements.txt b/requirements.txt
84-index dd1c1af..93f27b3 100644
85---- a/requirements.txt
86-+++ b/requirements.txt
87-@@ -27,7 +27,6 @@ python-glanceclient>=0.9.0
88- python-keystoneclient>=0.7.0
89- six>=1.5.2
90- stevedore>=0.14
91--websockify>=0.5.1,<0.6
92- wsgiref>=0.1.2
93- oslo.config>=1.2.0
94- oslo.rootwrap
95-
96
97=== added file 'debian/patches/libvirt-convert-cpu-features-attribute-from-list-to-.patch'
98--- debian/patches/libvirt-convert-cpu-features-attribute-from-list-to-.patch 1970-01-01 00:00:00 +0000
99+++ debian/patches/libvirt-convert-cpu-features-attribute-from-list-to-.patch 2014-08-08 18:21:34 +0000
100@@ -0,0 +1,160 @@
101+Description: libvirt: convert cpu features attribute from list to a set
102+
103+Currently, the cpu features list which is being sent to libvirt,
104+when creating a domain or calling compareCPU, must contain only
105+unique entries. Multiple issues arise when we are updating the
106+features attribute in LibvirtConfigCPU class (for example during
107+migration).
108+
109+This change will change the features attribute from being a list
110+to a set. This make the LibvirtConfigCPU class keep only unique
111+features.
112+Adjusting the LibvirtConfigCPUFeature class to support set
113+operations by overriding the __eq__, __ne__ and __hash__
114+methods.
115+
116+Author: Vladik Romanovsky <vladik.romanovsky@enovance.com>
117+Origin: upstream, Change-Id: I6350fe0e827c860aea77cc4fe56f18f5c1483580
118+Bug-Ubuntu: #1303536
119+Last-Update: 2014-06-25
120+
121+---
122+ nova/tests/virt/libvirt/test_libvirt.py | 8 ++++----
123+ nova/tests/virt/libvirt/test_libvirt_config.py | 24 +++++++++++++++++++++++-
124+ nova/virt/libvirt/config.py | 16 +++++++++++++---
125+ nova/virt/libvirt/driver.py | 2 +-
126+ 4 files changed, 41 insertions(+), 9 deletions(-)
127+
128+diff --git a/nova/tests/virt/libvirt/test_libvirt.py b/nova/tests/virt/libvirt/test_libvirt.py
129+index 1f744b7..9139ab9 100644
130+--- a/nova/tests/virt/libvirt/test_libvirt.py
131++++ b/nova/tests/virt/libvirt/test_libvirt.py
132+@@ -2206,8 +2206,8 @@ class LibvirtConnTestCase(test.TestCase):
133+ cpu.model = "Opteron_G4"
134+ cpu.vendor = "AMD"
135+
136+- cpu.features.append(vconfig.LibvirtConfigGuestCPUFeature("tm2"))
137+- cpu.features.append(vconfig.LibvirtConfigGuestCPUFeature("ht"))
138++ cpu.add_feature(vconfig.LibvirtConfigGuestCPUFeature("tm2"))
139++ cpu.add_feature(vconfig.LibvirtConfigGuestCPUFeature("ht"))
140+
141+ caps = vconfig.LibvirtConfigCaps()
142+ caps.host = vconfig.LibvirtConfigCapsHost()
143+@@ -2235,8 +2235,8 @@ class LibvirtConnTestCase(test.TestCase):
144+ self.assertEqual(conf.cpu.model, "Opteron_G4")
145+ self.assertEqual(conf.cpu.vendor, "AMD")
146+ self.assertEqual(len(conf.cpu.features), 2)
147+- self.assertEqual(conf.cpu.features[0].name, "tm2")
148+- self.assertEqual(conf.cpu.features[1].name, "ht")
149++ self.assertEqual(conf.cpu.features.pop().name, "tm2")
150++ self.assertEqual(conf.cpu.features.pop().name, "ht")
151+
152+ def test_get_guest_cpu_config_custom_old(self):
153+ def get_lib_version_stub():
154+diff --git a/nova/tests/virt/libvirt/test_libvirt_config.py b/nova/tests/virt/libvirt/test_libvirt_config.py
155+index 2251bf8..fa65ebc 100644
156+--- a/nova/tests/virt/libvirt/test_libvirt_config.py
157++++ b/nova/tests/virt/libvirt/test_libvirt_config.py
158+@@ -235,8 +235,30 @@ class LibvirtConfigCPUTest(LibvirtConfigBaseTest):
159+ <arch>x86_64</arch>
160+ <model>Penryn</model>
161+ <vendor>Intel</vendor>
162++ <feature name="apic"/>
163+ <feature name="mtrr"/>
164++ </cpu>
165++ """)
166++
167++ def test_only_uniq_cpu_featues(self):
168++ obj = config.LibvirtConfigCPU()
169++ obj.model = "Penryn"
170++ obj.vendor = "Intel"
171++ obj.arch = "x86_64"
172++
173++ obj.add_feature(config.LibvirtConfigCPUFeature("mtrr"))
174++ obj.add_feature(config.LibvirtConfigCPUFeature("apic"))
175++ obj.add_feature(config.LibvirtConfigCPUFeature("apic"))
176++ obj.add_feature(config.LibvirtConfigCPUFeature("mtrr"))
177++
178++ xml = obj.to_xml()
179++ self.assertXmlEqual(xml, """
180++ <cpu>
181++ <arch>x86_64</arch>
182++ <model>Penryn</model>
183++ <vendor>Intel</vendor>
184+ <feature name="apic"/>
185++ <feature name="mtrr"/>
186+ </cpu>
187+ """)
188+
189+@@ -285,8 +307,8 @@ class LibvirtConfigGuestCPUTest(LibvirtConfigBaseTest):
190+ <arch>x86_64</arch>
191+ <model>Penryn</model>
192+ <vendor>Intel</vendor>
193+- <feature name="mtrr" policy="require"/>
194+ <feature name="apic" policy="require"/>
195++ <feature name="mtrr" policy="require"/>
196+ </cpu>
197+ """)
198+
199+diff --git a/nova/virt/libvirt/config.py b/nova/virt/libvirt/config.py
200+index a931b57..f32e178 100644
201+--- a/nova/virt/libvirt/config.py
202++++ b/nova/virt/libvirt/config.py
203+@@ -250,6 +250,15 @@ class LibvirtConfigCPUFeature(LibvirtConfigObject):
204+
205+ return ft
206+
207++ def __eq__(self, obj):
208++ return obj.name == self.name
209++
210++ def __ne__(self, obj):
211++ return obj.name != self.name
212++
213++ def __hash__(self):
214++ return hash(self.name)
215++
216+
217+ class LibvirtConfigCPU(LibvirtConfigObject):
218+
219+@@ -265,7 +274,7 @@ class LibvirtConfigCPU(LibvirtConfigObject):
220+ self.cores = None
221+ self.threads = None
222+
223+- self.features = []
224++ self.features = set()
225+
226+ def parse_dom(self, xmldoc):
227+ super(LibvirtConfigCPU, self).parse_dom(xmldoc)
228+@@ -305,13 +314,14 @@ class LibvirtConfigCPU(LibvirtConfigObject):
229+ top.set("threads", str(self.threads))
230+ cpu.append(top)
231+
232+- for f in self.features:
233++ # sorting the features to allow more predictable tests
234++ for f in sorted(self.features, key=lambda x: x.name):
235+ cpu.append(f.format_dom())
236+
237+ return cpu
238+
239+ def add_feature(self, feat):
240+- self.features.append(feat)
241++ self.features.add(feat)
242+
243+
244+ class LibvirtConfigGuestCPUFeature(LibvirtConfigCPUFeature):
245+diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py
246+index df367dd..7402363 100644
247+--- a/nova/virt/libvirt/driver.py
248++++ b/nova/virt/libvirt/driver.py
249+@@ -2888,7 +2888,7 @@ class LibvirtDriver(driver.ComputeDriver):
250+ for hostfeat in hostcpu.features:
251+ guestfeat = vconfig.LibvirtConfigGuestCPUFeature(hostfeat.name)
252+ guestfeat.policy = "require"
253+- guestcpu.features.append(guestfeat)
254++ guestcpu.add_feature(guestfeat)
255+
256+ return guestcpu
257+
258+--
259+1.9.1
260+
261
262=== modified file 'debian/patches/series'
263--- debian/patches/series 2014-06-24 15:47:40 +0000
264+++ debian/patches/series 2014-08-08 18:21:34 +0000
265@@ -1,4 +1,5 @@
266 # Ubuntu specific patches below here. Note these can be dropped eventually.
267+libvirt-convert-cpu-features-attribute-from-list-to-.patch
268 fix-requirements.patch
269 skip_ipv6_test.patch
270 arm-console-patch.patch

Subscribers

People subscribed via source and target branches