Merge lp:~zulcss/nova/2014.1.1 into lp:~ubuntu-server-dev/nova/icehouse
- 2014.1.1
- Merge into icehouse
Proposed by
Chuck Short
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Merged at revision: | 687 | ||||||||
Proposed branch: | lp:~zulcss/nova/2014.1.1 | ||||||||
Merge into: | lp:~ubuntu-server-dev/nova/icehouse | ||||||||
Diff against target: |
393 lines (+365/-1) 4 files modified
debian/changelog (+49/-0) debian/nova_sudoers (+1/-1) debian/patches/fix-lxc-libvirt-starting.patch (+314/-0) debian/patches/series (+1/-0) |
||||||||
To merge this branch: | bzr merge lp:~zulcss/nova/2014.1.1 | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
James Page | Approve | ||
Review via email: mp+223546@code.launchpad.net |
Commit message
Description of the change
2014.1.1
To post a comment you must log in.
Revision history for this message
James Page (james-page) : | # |
review:
Approve
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-05-20 16:19:46 +0000 | |||
3 | +++ debian/changelog 2014-06-18 12:31:35 +0000 | |||
4 | @@ -1,3 +1,52 @@ | |||
5 | 1 | nova (1:2014.1.1-0ubuntu1.3) utopic; urgency=medium | ||
6 | 2 | |||
7 | 3 | * Resynchronize with stable/icehouse (867341f) (LP: #1328134) | ||
8 | 4 | - [867341f] Fix security group race condition while listing and deleting rules | ||
9 | 5 | - [ffcb176] VMware: ensure rescue instance is deleted when instance is deleted | ||
10 | 6 | - [fe4fe70] VMware: Log additional details of suds faults | ||
11 | 7 | - [43f0437] Add info_cache as expected attribute when evacuate instance | ||
12 | 8 | - [a2da9ce] VMware: uncaught exception during snapshot deletion | ||
13 | 9 | - [1a45944] Catch InstanceNotFound exception if migration fails | ||
14 | 10 | - [ee374f1] Do not wait for neutron event if not powering on libvirt domain | ||
15 | 11 | - [705ad64] Reap child processes gracefully if greenlet thread gets killed | ||
16 | 12 | - [f769bf8] Fixes arguments parsing when executing command | ||
17 | 13 | - [bedb66f] Use one query instead of two for quota_usages | ||
18 | 14 | - [422decd] VMWare - Check for compute node before triggering destroy | ||
19 | 15 | - [6629116] Use debug level logging in unit tests, but don't save them. | ||
20 | 16 | - [088b718] support local debug logging | ||
21 | 17 | - [080f785] Revert "Use debug level logging during unit tests" | ||
22 | 18 | - [fb03028] VMWare: add power off vm before detach disk during unrescue | ||
23 | 19 | - [d93427a] Check for None or timestamp in availability zone api sample | ||
24 | 20 | - [f5c3330f] Pass configured auth strategy to neutronclient | ||
25 | 21 | - [74d1043] remove unneeded call to network_api on rebuild_instance | ||
26 | 22 | - [f1fdb3c] Remove unnecessary call to fetch info_cache | ||
27 | 23 | - [395ec82] Remove metadata's network-api dependence on the database | ||
28 | 24 | - [a48d268] InvalidCPUInfo exception added to except block | ||
29 | 25 | - [77392a9] Moved the registration of lifecycle event handler in init_host() | ||
30 | 26 | - [40ae1ee] Fix display of server group members | ||
31 | 27 | - [66c7ca1] Change errors_out_migration decorator to work with RPC | ||
32 | 28 | - [e1e140b] Don't explode if we fail to unplug VIFs after a failed boot | ||
33 | 29 | - [c816488] Remove unneeded call to fetch network info on shutdown | ||
34 | 30 | - [7f9f3ef] Don't overwrite instance object with dict in _init_instance() | ||
35 | 31 | - [2728f1e] Fix bug detach volume fails with "KeyError" in EC2 | ||
36 | 32 | * debian/patches/fix-lxc-libvirt-starting.patch: Fix exception when starting | ||
37 | 33 | LXC containers. (LP: #1297962) | ||
38 | 34 | |||
39 | 35 | -- Chuck Short <zulcss@ubuntu.com> Mon, 09 Jun 2014 12:26:24 -0400 | ||
40 | 36 | |||
41 | 37 | nova (1:2014.1-0ubuntu1.2) trusty-security; urgency=medium | ||
42 | 38 | |||
43 | 39 | * SECURITY UPDATE: specify /etc/nova/rootwrap.conf for use with | ||
44 | 40 | nova-rootwrap | ||
45 | 41 | - CVE-2013-1068 (LP: #1185019) | ||
46 | 42 | |||
47 | 43 | -- Jamie Strandboge <jamie@ubuntu.com> Mon, 09 Jun 2014 09:32:44 -0500 | ||
48 | 44 | |||
49 | 45 | nova (1:2014.1-0ubuntu1.1) trusty; urgency=medium | ||
50 | 46 | |||
51 | 47 | * debian/patches/libvirt-Handle-unsupported-host-capabilities.patch: Fix | ||
52 | 48 | exception when starting instances with libvirt LXC or XEN. (LP: #1297962) | ||
53 | 49 | |||
54 | 1 | nova (1:2014.1-0ubuntu1) trusty; urgency=medium | 50 | nova (1:2014.1-0ubuntu1) trusty; urgency=medium |
55 | 2 | 51 | ||
56 | 3 | [ Chuck Short ] | 52 | [ Chuck Short ] |
57 | 4 | 53 | ||
58 | === modified file 'debian/nova_sudoers' | |||
59 | --- debian/nova_sudoers 2012-06-27 21:00:32 +0000 | |||
60 | +++ debian/nova_sudoers 2014-06-18 12:31:35 +0000 | |||
61 | @@ -1,3 +1,3 @@ | |||
62 | 1 | Defaults:nova !requiretty | 1 | Defaults:nova !requiretty |
63 | 2 | 2 | ||
65 | 3 | nova ALL = (root) NOPASSWD: /usr/bin/nova-rootwrap | 3 | nova ALL = (root) NOPASSWD: /usr/bin/nova-rootwrap /etc/nova/rootwrap.conf * |
66 | 4 | 4 | ||
67 | === added file 'debian/patches/fix-lxc-libvirt-starting.patch' | |||
68 | --- debian/patches/fix-lxc-libvirt-starting.patch 1970-01-01 00:00:00 +0000 | |||
69 | +++ debian/patches/fix-lxc-libvirt-starting.patch 2014-06-18 12:31:35 +0000 | |||
70 | @@ -0,0 +1,314 @@ | |||
71 | 1 | Description: Fix exception when starting LXC containers with libvirt-lxc. | ||
72 | 2 | Author: Chuck Short <zulcss@ubuntu.com> | ||
73 | 3 | Forwarded: Not Needed. | ||
74 | 4 | diff -Naurp nova-2014.1.1.orig/nova/tests/virt/libvirt/fakelibvirt.py nova-2014.1.1/nova/tests/virt/libvirt/fakelibvirt.py | ||
75 | 5 | --- nova-2014.1.1.orig/nova/tests/virt/libvirt/fakelibvirt.py 2014-06-05 17:33:22.000000000 -0400 | ||
76 | 6 | +++ nova-2014.1.1/nova/tests/virt/libvirt/fakelibvirt.py 2014-06-09 12:00:11.032072000 -0400 | ||
77 | 7 | @@ -172,18 +172,76 @@ def _parse_disk_info(element): | ||
78 | 8 | |||
79 | 9 | |||
80 | 10 | class libvirtError(Exception): | ||
81 | 11 | - def __init__(self, msg, | ||
82 | 12 | - error_code=VIR_ERR_INTERNAL_ERROR, | ||
83 | 13 | - error_domain=VIR_FROM_QEMU): | ||
84 | 14 | - self.error_code = error_code | ||
85 | 15 | - self.error_domain = error_domain | ||
86 | 16 | - Exception(self, msg) | ||
87 | 17 | + """This class was copied and slightly modified from | ||
88 | 18 | + `libvirt-python:libvirt-override.py`. | ||
89 | 19 | + | ||
90 | 20 | + Since a test environment will use the real `libvirt-python` version of | ||
91 | 21 | + `libvirtError` if it's installed and not this fake, we need to maintain | ||
92 | 22 | + strict compatability with the original class, including `__init__` args | ||
93 | 23 | + and instance-attributes. | ||
94 | 24 | + | ||
95 | 25 | + To create a libvirtError instance you should: | ||
96 | 26 | + | ||
97 | 27 | + # Create an unsupported error exception | ||
98 | 28 | + exc = libvirtError('my message') | ||
99 | 29 | + exc.err = (libvirt.VIR_ERR_NO_SUPPORT,) | ||
100 | 30 | + | ||
101 | 31 | + self.err is a tuple of form: | ||
102 | 32 | + (error_code, error_domain, error_message, error_level, str1, str2, | ||
103 | 33 | + str3, int1, int2) | ||
104 | 34 | + | ||
105 | 35 | + Alternatively, you can use the `make_libvirtError` convenience function to | ||
106 | 36 | + allow you to specify these attributes in one shot. | ||
107 | 37 | + """ | ||
108 | 38 | + def __init__(self, defmsg, conn=None, dom=None, net=None, pool=None, | ||
109 | 39 | + vol=None): | ||
110 | 40 | + Exception.__init__(self, defmsg) | ||
111 | 41 | + self.err = None | ||
112 | 42 | |||
113 | 43 | def get_error_code(self): | ||
114 | 44 | - return self.error_code | ||
115 | 45 | + if self.err is None: | ||
116 | 46 | + return None | ||
117 | 47 | + return self.err[0] | ||
118 | 48 | |||
119 | 49 | def get_error_domain(self): | ||
120 | 50 | - return self.error_domain | ||
121 | 51 | + if self.err is None: | ||
122 | 52 | + return None | ||
123 | 53 | + return self.err[1] | ||
124 | 54 | + | ||
125 | 55 | + def get_error_message(self): | ||
126 | 56 | + if self.err is None: | ||
127 | 57 | + return None | ||
128 | 58 | + return self.err[2] | ||
129 | 59 | + | ||
130 | 60 | + def get_error_level(self): | ||
131 | 61 | + if self.err is None: | ||
132 | 62 | + return None | ||
133 | 63 | + return self.err[3] | ||
134 | 64 | + | ||
135 | 65 | + def get_str1(self): | ||
136 | 66 | + if self.err is None: | ||
137 | 67 | + return None | ||
138 | 68 | + return self.err[4] | ||
139 | 69 | + | ||
140 | 70 | + def get_str2(self): | ||
141 | 71 | + if self.err is None: | ||
142 | 72 | + return None | ||
143 | 73 | + return self.err[5] | ||
144 | 74 | + | ||
145 | 75 | + def get_str3(self): | ||
146 | 76 | + if self.err is None: | ||
147 | 77 | + return None | ||
148 | 78 | + return self.err[6] | ||
149 | 79 | + | ||
150 | 80 | + def get_int1(self): | ||
151 | 81 | + if self.err is None: | ||
152 | 82 | + return None | ||
153 | 83 | + return self.err[7] | ||
154 | 84 | + | ||
155 | 85 | + def get_int2(self): | ||
156 | 86 | + if self.err is None: | ||
157 | 87 | + return None | ||
158 | 88 | + return self.err[8] | ||
159 | 89 | |||
160 | 90 | |||
161 | 91 | class NWFilter(object): | ||
162 | 92 | @@ -219,8 +277,10 @@ class Domain(object): | ||
163 | 93 | try: | ||
164 | 94 | tree = etree.fromstring(xml) | ||
165 | 95 | except etree.ParseError: | ||
166 | 96 | - raise libvirtError("Invalid XML.", | ||
167 | 97 | - VIR_ERR_XML_DETAIL, VIR_FROM_DOMAIN) | ||
168 | 98 | + raise make_libvirtError( | ||
169 | 99 | + libvirtError, "Invalid XML.", | ||
170 | 100 | + error_code=VIR_ERR_XML_DETAIL, | ||
171 | 101 | + error_domain=VIR_FROM_DOMAIN) | ||
172 | 102 | |||
173 | 103 | definition = {} | ||
174 | 104 | |||
175 | 105 | @@ -369,7 +429,11 @@ class Domain(object): | ||
176 | 106 | 123456789L] | ||
177 | 107 | |||
178 | 108 | def migrateToURI(self, desturi, flags, dname, bandwidth): | ||
179 | 109 | - raise libvirtError("Migration always fails for fake libvirt!") | ||
180 | 110 | + raise make_libvirtError( | ||
181 | 111 | + libvirtError, | ||
182 | 112 | + "Migration always fails for fake libvirt!", | ||
183 | 113 | + error_code=VIR_ERR_INTERNAL_ERROR, | ||
184 | 114 | + error_domain=VIR_FROM_QEMU) | ||
185 | 115 | |||
186 | 116 | def attachDevice(self, xml): | ||
187 | 117 | disk_info = _parse_disk_info(etree.fromstring(xml)) | ||
188 | 118 | @@ -380,7 +444,11 @@ class Domain(object): | ||
189 | 119 | def attachDeviceFlags(self, xml, flags): | ||
190 | 120 | if (flags & VIR_DOMAIN_AFFECT_LIVE and | ||
191 | 121 | self._state != VIR_DOMAIN_RUNNING): | ||
192 | 122 | - raise libvirtError("AFFECT_LIVE only allowed for running domains!") | ||
193 | 123 | + raise make_libvirtError( | ||
194 | 124 | + libvirtError, | ||
195 | 125 | + "AFFECT_LIVE only allowed for running domains!", | ||
196 | 126 | + error_code=VIR_ERR_INTERNAL_ERROR, | ||
197 | 127 | + error_domain=VIR_FROM_QEMU) | ||
198 | 128 | self.attachDevice(xml) | ||
199 | 129 | |||
200 | 130 | def detachDevice(self, xml): | ||
201 | 131 | @@ -533,9 +601,11 @@ class Connection(object): | ||
202 | 132 | 'test:///default'] | ||
203 | 133 | |||
204 | 134 | if uri not in uri_whitelist: | ||
205 | 135 | - raise libvirtError("libvirt error: no connection driver " | ||
206 | 136 | - "available for No connection for URI %s" % uri, | ||
207 | 137 | - 5, 0) | ||
208 | 138 | + raise make_libvirtError( | ||
209 | 139 | + libvirtError, | ||
210 | 140 | + "libvirt error: no connection driver " | ||
211 | 141 | + "available for No connection for URI %s" % uri, | ||
212 | 142 | + error_code=5, error_domain=0) | ||
213 | 143 | |||
214 | 144 | self.readonly = readonly | ||
215 | 145 | self._uri = uri | ||
216 | 146 | @@ -594,16 +664,20 @@ class Connection(object): | ||
217 | 147 | def lookupByID(self, id): | ||
218 | 148 | if id in self._running_vms: | ||
219 | 149 | return self._running_vms[id] | ||
220 | 150 | - raise libvirtError('Domain not found: no domain with matching ' | ||
221 | 151 | - 'id %d' % id, | ||
222 | 152 | - VIR_ERR_NO_DOMAIN, VIR_FROM_QEMU) | ||
223 | 153 | + raise make_libvirtError( | ||
224 | 154 | + libvirtError, | ||
225 | 155 | + 'Domain not found: no domain with matching id %d' % id, | ||
226 | 156 | + error_code=VIR_ERR_NO_DOMAIN, | ||
227 | 157 | + error_domain=VIR_FROM_QEMU) | ||
228 | 158 | |||
229 | 159 | def lookupByName(self, name): | ||
230 | 160 | if name in self._vms: | ||
231 | 161 | return self._vms[name] | ||
232 | 162 | - raise libvirtError('Domain not found: no domain with matching ' | ||
233 | 163 | - 'name "%s"' % name, | ||
234 | 164 | - VIR_ERR_NO_DOMAIN, VIR_FROM_QEMU) | ||
235 | 165 | + raise make_libvirtError( | ||
236 | 166 | + libvirtError, | ||
237 | 167 | + 'Domain not found: no domain with matching name "%s"' % name, | ||
238 | 168 | + error_code=VIR_ERR_NO_DOMAIN, | ||
239 | 169 | + error_domain=VIR_FROM_QEMU) | ||
240 | 170 | |||
241 | 171 | def _emit_lifecycle(self, dom, event, detail): | ||
242 | 172 | if VIR_DOMAIN_EVENT_ID_LIFECYCLE not in self._event_callbacks: | ||
243 | 173 | @@ -904,14 +978,21 @@ class Connection(object): | ||
244 | 174 | 'user': 26728850000000L, | ||
245 | 175 | 'iowait': 6121490000000L} | ||
246 | 176 | else: | ||
247 | 177 | - raise libvirtError("invalid argument: Invalid cpu number") | ||
248 | 178 | + raise make_libvirtError( | ||
249 | 179 | + libvirtError, | ||
250 | 180 | + "invalid argument: Invalid cpu number", | ||
251 | 181 | + error_code=VIR_ERR_INTERNAL_ERROR, | ||
252 | 182 | + error_domain=VIR_FROM_QEMU) | ||
253 | 183 | |||
254 | 184 | def nwfilterLookupByName(self, name): | ||
255 | 185 | try: | ||
256 | 186 | return self._nwfilters[name] | ||
257 | 187 | except KeyError: | ||
258 | 188 | - raise libvirtError("no nwfilter with matching name %s" % name, | ||
259 | 189 | - VIR_ERR_NO_NWFILTER, VIR_FROM_NWFILTER) | ||
260 | 190 | + raise make_libvirtError( | ||
261 | 191 | + libvirtError, | ||
262 | 192 | + "no nwfilter with matching name %s" % name, | ||
263 | 193 | + error_code=VIR_ERR_NO_NWFILTER, | ||
264 | 194 | + error_domain=VIR_FROM_NWFILTER) | ||
265 | 195 | |||
266 | 196 | def nwfilterDefineXML(self, xml): | ||
267 | 197 | nwfilter = NWFilter(self, xml) | ||
268 | 198 | @@ -964,6 +1045,24 @@ def registerErrorHandler(handler, ctxt): | ||
269 | 199 | pass | ||
270 | 200 | |||
271 | 201 | |||
272 | 202 | +def make_libvirtError(error_class, msg, error_code=None, | ||
273 | 203 | + error_domain=None, error_message=None, | ||
274 | 204 | + error_level=None, str1=None, str2=None, str3=None, | ||
275 | 205 | + int1=None, int2=None): | ||
276 | 206 | + """Convenience function for creating `libvirtError` exceptions which | ||
277 | 207 | + allow you to specify arguments in constructor without having to manipulate | ||
278 | 208 | + the `err` tuple directly. | ||
279 | 209 | + | ||
280 | 210 | + We need to pass in `error_class` to this function because it may be | ||
281 | 211 | + `libvirt.libvirtError` or `fakelibvirt.libvirtError` depending on whether | ||
282 | 212 | + `libvirt-python` is installed. | ||
283 | 213 | + """ | ||
284 | 214 | + exc = error_class(msg) | ||
285 | 215 | + exc.err = (error_code, error_domain, error_message, error_level, | ||
286 | 216 | + str1, str2, str3, int1, int2) | ||
287 | 217 | + return exc | ||
288 | 218 | + | ||
289 | 219 | + | ||
290 | 220 | virDomain = Domain | ||
291 | 221 | |||
292 | 222 | |||
293 | 223 | 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 | ||
294 | 224 | --- nova-2014.1.1.orig/nova/tests/virt/libvirt/test_libvirt.py 2014-06-05 17:33:22.000000000 -0400 | ||
295 | 225 | +++ nova-2014.1.1/nova/tests/virt/libvirt/test_libvirt.py 2014-06-09 12:00:11.040072000 -0400 | ||
296 | 226 | @@ -60,6 +60,7 @@ import nova.tests.image.fake | ||
297 | 227 | from nova.tests import matchers | ||
298 | 228 | from nova.tests.objects import test_pci_device | ||
299 | 229 | from nova.tests.virt.libvirt import fake_libvirt_utils | ||
300 | 230 | +from nova.tests.virt.libvirt import fakelibvirt | ||
301 | 231 | from nova import utils | ||
302 | 232 | from nova import version | ||
303 | 233 | from nova.virt import configdrive | ||
304 | 234 | @@ -80,7 +81,7 @@ from nova.virt import netutils | ||
305 | 235 | try: | ||
306 | 236 | import libvirt | ||
307 | 237 | except ImportError: | ||
308 | 238 | - import nova.tests.virt.libvirt.fakelibvirt as libvirt | ||
309 | 239 | + libvirt = fakelibvirt | ||
310 | 240 | libvirt_driver.libvirt = libvirt | ||
311 | 241 | |||
312 | 242 | |||
313 | 243 | @@ -849,6 +850,42 @@ class LibvirtConnTestCase(test.TestCase) | ||
314 | 244 | caps = conn.get_host_capabilities() | ||
315 | 245 | self.assertIn('aes', [x.name for x in caps.host.cpu.features]) | ||
316 | 246 | |||
317 | 247 | + def test_baseline_cpu_not_supported(self): | ||
318 | 248 | + conn = libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), True) | ||
319 | 249 | + | ||
320 | 250 | + # `mock` has trouble stubbing attributes that don't exist yet, so | ||
321 | 251 | + # fallback to plain-Python attribute setting/deleting | ||
322 | 252 | + cap_str = 'VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES' | ||
323 | 253 | + if not hasattr(libvirt_driver.libvirt, cap_str): | ||
324 | 254 | + setattr(libvirt_driver.libvirt, cap_str, True) | ||
325 | 255 | + self.addCleanup(delattr, libvirt_driver.libvirt, cap_str) | ||
326 | 256 | + | ||
327 | 257 | + # Handle just the NO_SUPPORT error | ||
328 | 258 | + not_supported_exc = fakelibvirt.make_libvirtError( | ||
329 | 259 | + libvirt.libvirtError, | ||
330 | 260 | + 'this function is not supported by the connection driver:' | ||
331 | 261 | + ' virConnectBaselineCPU', | ||
332 | 262 | + error_code=libvirt.VIR_ERR_NO_SUPPORT) | ||
333 | 263 | + | ||
334 | 264 | + with mock.patch.object(conn._conn, 'baselineCPU', | ||
335 | 265 | + side_effect=not_supported_exc): | ||
336 | 266 | + caps = conn.get_host_capabilities() | ||
337 | 267 | + self.assertEqual(vconfig.LibvirtConfigCaps, type(caps)) | ||
338 | 268 | + self.assertNotIn('aes', [x.name for x in caps.host.cpu.features]) | ||
339 | 269 | + | ||
340 | 270 | + # Clear cached result so we can test again... | ||
341 | 271 | + conn._caps = None | ||
342 | 272 | + | ||
343 | 273 | + # Other errors should not be caught | ||
344 | 274 | + other_exc = fakelibvirt.make_libvirtError( | ||
345 | 275 | + libvirt.libvirtError, | ||
346 | 276 | + 'other exc', | ||
347 | 277 | + error_code=libvirt.VIR_ERR_NO_DOMAIN) | ||
348 | 278 | + | ||
349 | 279 | + with mock.patch.object(conn._conn, 'baselineCPU', | ||
350 | 280 | + side_effect=other_exc): | ||
351 | 281 | + self.assertRaises(libvirt.libvirtError, conn.get_host_capabilities) | ||
352 | 282 | + | ||
353 | 283 | def test_lxc_get_host_capabilities_failed(self): | ||
354 | 284 | conn = libvirt_driver.LibvirtDriver(fake.FakeVirtAPI(), True) | ||
355 | 285 | |||
356 | 286 | diff -Naurp nova-2014.1.1.orig/nova/virt/libvirt/driver.py nova-2014.1.1/nova/virt/libvirt/driver.py | ||
357 | 287 | --- nova-2014.1.1.orig/nova/virt/libvirt/driver.py 2014-06-05 17:33:22.000000000 -0400 | ||
358 | 288 | +++ nova-2014.1.1/nova/virt/libvirt/driver.py 2014-06-09 11:59:55.232072000 -0400 | ||
359 | 289 | @@ -76,6 +76,7 @@ from nova.objects import service as serv | ||
360 | 290 | from nova.openstack.common import excutils | ||
361 | 291 | from nova.openstack.common import fileutils | ||
362 | 292 | from nova.openstack.common.gettextutils import _ | ||
363 | 293 | +from nova.openstack.common.gettextutils import _LW | ||
364 | 294 | from nova.openstack.common import importutils | ||
365 | 295 | from nova.openstack.common import jsonutils | ||
366 | 296 | from nova.openstack.common import log as logging | ||
367 | 297 | @@ -2859,9 +2860,14 @@ class LibvirtDriver(driver.ComputeDriver | ||
368 | 298 | # this -1 checking should be removed later. | ||
369 | 299 | if features and features != -1: | ||
370 | 300 | self._caps.host.cpu.parse_str(features) | ||
371 | 301 | - except libvirt.VIR_ERR_NO_SUPPORT: | ||
372 | 302 | - # Note(yjiang5): ignore if libvirt has no support | ||
373 | 303 | - pass | ||
374 | 304 | + except libvirt.libvirtError as ex: | ||
375 | 305 | + error_code = ex.get_error_code() | ||
376 | 306 | + if error_code == libvirt.VIR_ERR_NO_SUPPORT: | ||
377 | 307 | + LOG.warn(_LW("URI %(uri)s does not support full set" | ||
378 | 308 | + " of host capabilities: " "%(error)s"), | ||
379 | 309 | + {'uri': self.uri(), 'error': ex}) | ||
380 | 310 | + else: | ||
381 | 311 | + raise | ||
382 | 312 | return self._caps | ||
383 | 313 | |||
384 | 314 | def get_host_uuid(self): | ||
385 | 0 | 315 | ||
386 | === modified file 'debian/patches/series' | |||
387 | --- debian/patches/series 2014-04-01 17:19:14 +0000 | |||
388 | +++ debian/patches/series 2014-06-18 12:31:35 +0000 | |||
389 | @@ -3,3 +3,4 @@ | |||
390 | 3 | skip_ipv6_test.patch | 3 | skip_ipv6_test.patch |
391 | 4 | arm-console-patch.patch | 4 | arm-console-patch.patch |
392 | 5 | update-run-tests.patch | 5 | update-run-tests.patch |
393 | 6 | fix-lxc-libvirt-starting.patch |