Merge lp:~gandelman-a/nova/iso8601 into lp:~openstack-ubuntu-packagers/nova/ubuntu
- iso8601
- Merge into ubuntu
Proposed by
Adam Gandelman
Status: | Needs review |
---|---|
Proposed branch: | lp:~gandelman-a/nova/iso8601 |
Merge into: | lp:~openstack-ubuntu-packagers/nova/ubuntu |
Diff against target: |
370 lines (+85/-52) 6 files modified
debian/changelog (+28/-2) debian/control (+3/-10) debian/nova.conf (+1/-1) debian/patches/libvirt-use-console-pipe.patch (+37/-35) debian/patches/series (+1/-1) debian/rules (+15/-3) |
To merge this branch: | bzr merge lp:~gandelman-a/nova/iso8601 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
OpenStack Ubuntu packagers | Pending | ||
Review via email: mp+93791@code.launchpad.net |
Commit message
Description of the change
New dependency: python-iso8601
To post a comment you must log in.
Unmerged revisions
- 313. By Adam Gandelman
-
debian/control: Add new dependency python-iso8601 to Build-Depends +
python-nova Depends
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 2012-02-13 17:01:11 +0000 | |||
3 | +++ debian/changelog 2012-02-20 10:08:22 +0000 | |||
4 | @@ -1,4 +1,21 @@ | |||
6 | 1 | nova (2012.1~e4~20120211.12605-0ubuntu1) UNRELEASED; urgency=low | 1 | nova (2012.1~e4~20120217.12709-0ubuntu2) UNRELEASED; urgency=low |
7 | 2 | |||
8 | 3 | [ Adam Gandelman ] | ||
9 | 4 | debian/control: Add new dependency python-iso8601 to Build-Depends + | ||
10 | 5 | python-nova Depends | ||
11 | 6 | |||
12 | 7 | [ Monty Taylor ] | ||
13 | 8 | * Move files from nova/locale to /usr/share/locale | ||
14 | 9 | |||
15 | 10 | [Chuck Short] | ||
16 | 11 | * debian/rules: Fix FTBFS. | ||
17 | 12 | |||
18 | 13 | [ Chuck Short ] | ||
19 | 14 | * Add depends on python-babel. | ||
20 | 15 | |||
21 | 16 | -- Chuck Short <zulcss@ubuntu.com> Sun, 19 Feb 2012 13:48:42 -0500 | ||
22 | 17 | |||
23 | 18 | nova (2012.1~e4~20120217.12709-0ubuntu1) precise; urgency=low | ||
24 | 2 | 19 | ||
25 | 3 | [ Dave Walker (Daviey) ] | 20 | [ Dave Walker (Daviey) ] |
26 | 4 | * New upstream snapshot | 21 | * New upstream snapshot |
27 | @@ -7,7 +24,16 @@ | |||
28 | 7 | * debian/patches/libvirt-use-console-pipe.patch: | 24 | * debian/patches/libvirt-use-console-pipe.patch: |
29 | 8 | - Rebased against latest trunk | 25 | - Rebased against latest trunk |
30 | 9 | 26 | ||
32 | 10 | -- Dave Walker (Daviey) <DaveWalker@ubuntu.com> Sat, 11 Feb 2012 02:03:25 +0000 | 27 | [ Chuck Short ] |
33 | 28 | * debian/nova.conf: Re-enable default iscsi_helper. | ||
34 | 29 | * debian/nova.conf: More fixups. | ||
35 | 30 | * debian/control: Dont depend and conflicts on nova-compute- | ||
36 | 31 | hypervisor. (LP: #923681) | ||
37 | 32 | * debian/patches/libvirt-us-console-pipe.patch: Refreshed. | ||
38 | 33 | * Temporarily disable console patch. (LP: #932787) | ||
39 | 34 | * New usptream version. | ||
40 | 35 | |||
41 | 36 | -- Chuck Short <zulcss@ubuntu.com> Fri, 17 Feb 2012 11:02:12 -0500 | ||
42 | 11 | 37 | ||
43 | 12 | nova (2012.1~e4~20120210.12574-0ubuntu1) precise; urgency=low | 38 | nova (2012.1~e4~20120210.12574-0ubuntu1) precise; urgency=low |
44 | 13 | 39 | ||
45 | 14 | 40 | ||
46 | === modified file 'debian/control' | |||
47 | --- debian/control 2012-02-13 17:01:11 +0000 | |||
48 | +++ debian/control 2012-02-20 10:08:22 +0000 | |||
49 | @@ -42,6 +42,8 @@ | |||
50 | 42 | python-xattr, | 42 | python-xattr, |
51 | 43 | python-feedparser, | 43 | python-feedparser, |
52 | 44 | python-crypto, | 44 | python-crypto, |
53 | 45 | python-babel, | ||
54 | 46 | python-iso8601, | ||
55 | 45 | pep8 | 47 | pep8 |
56 | 46 | Build-Conflicts: python-cjson | 48 | Build-Conflicts: python-cjson |
57 | 47 | Standards-Version: 3.9.2 | 49 | Standards-Version: 3.9.2 |
58 | @@ -84,6 +86,7 @@ | |||
59 | 84 | python-xattr, | 86 | python-xattr, |
60 | 85 | python-daemon, | 87 | python-daemon, |
61 | 86 | python-suds, | 88 | python-suds, |
62 | 89 | python-iso8601, | ||
63 | 87 | sudo, | 90 | sudo, |
64 | 88 | ${misc:Depends} | 91 | ${misc:Depends} |
65 | 89 | Suggests: python-suds (>= 0.4.0), | 92 | Suggests: python-suds (>= 0.4.0), |
66 | @@ -156,8 +159,6 @@ | |||
67 | 156 | Architecture: all | 159 | Architecture: all |
68 | 157 | Depends: nova-compute (= ${binary:Version}), python-libvirt, libvirt-bin, ${misc:Depends} | 160 | Depends: nova-compute (= ${binary:Version}), python-libvirt, libvirt-bin, ${misc:Depends} |
69 | 158 | Provides: nova-compute-hypervisor | 161 | Provides: nova-compute-hypervisor |
70 | 159 | Replaces: nova-compute-hypervisor | ||
71 | 160 | Conflicts: nova-compute-hypervisor | ||
72 | 161 | Description: OpenStack Compute - compute node (LXC) | 162 | Description: OpenStack Compute - compute node (LXC) |
73 | 162 | OpenStack is a reliable cloud infrastructure. Its mission is to produce | 163 | OpenStack is a reliable cloud infrastructure. Its mission is to produce |
74 | 163 | the ubiquitous cloud computing platform that will meet the needs of public | 164 | the ubiquitous cloud computing platform that will meet the needs of public |
75 | @@ -179,8 +180,6 @@ | |||
76 | 179 | Architecture: all | 180 | Architecture: all |
77 | 180 | Depends: nova-compute (= ${binary:Version}), python-libvirt, libvirt-bin, user-mode-linux, ${misc:Depends} | 181 | Depends: nova-compute (= ${binary:Version}), python-libvirt, libvirt-bin, user-mode-linux, ${misc:Depends} |
78 | 181 | Provides: nova-compute-hypervisor | 182 | Provides: nova-compute-hypervisor |
79 | 182 | Replaces: nova-compute-hypervisor | ||
80 | 183 | Conflicts: nova-compute-hypervisor | ||
81 | 184 | Description: OpenStack Compute - compute node (UserModeLinux) | 183 | Description: OpenStack Compute - compute node (UserModeLinux) |
82 | 185 | OpenStack is a reliable cloud infrastructure. Its mission is to produce | 184 | OpenStack is a reliable cloud infrastructure. Its mission is to produce |
83 | 186 | the ubiquitous cloud computing platform that will meet the needs of public | 185 | the ubiquitous cloud computing platform that will meet the needs of public |
84 | @@ -203,8 +202,6 @@ | |||
85 | 203 | Depends: nova-compute (= ${binary:Version}), python-libvirt, libvirt-bin, xen-hypervisor-4.1-amd64 | xen-hypervisor-4.1-i386, | 202 | Depends: nova-compute (= ${binary:Version}), python-libvirt, libvirt-bin, xen-hypervisor-4.1-amd64 | xen-hypervisor-4.1-i386, |
86 | 204 | ${misc:Depends} | 203 | ${misc:Depends} |
87 | 205 | Provides: nova-compute-hypervisor | 204 | Provides: nova-compute-hypervisor |
88 | 206 | Replaces: nova-compute-hypervisor | ||
89 | 207 | Conflicts: nova-compute-hypervisor | ||
90 | 208 | Description: OpenStack Compute - compute node (Xen) | 205 | Description: OpenStack Compute - compute node (Xen) |
91 | 209 | OpenStack is a reliable cloud infrastructure. Its mission is to produce | 206 | OpenStack is a reliable cloud infrastructure. Its mission is to produce |
92 | 210 | the ubiquitous cloud computing platform that will meet the needs of public | 207 | the ubiquitous cloud computing platform that will meet the needs of public |
93 | @@ -226,8 +223,6 @@ | |||
94 | 226 | Architecture: all | 223 | Architecture: all |
95 | 227 | Depends: nova-compute (= ${binary:Version}), python-libvirt, libvirt-bin, qemu, ${misc:Depends} | 224 | Depends: nova-compute (= ${binary:Version}), python-libvirt, libvirt-bin, qemu, ${misc:Depends} |
96 | 228 | Provides: nova-compute-hypervisor | 225 | Provides: nova-compute-hypervisor |
97 | 229 | Replaces: nova-compute-hypervisor | ||
98 | 230 | Conflicts: nova-compute-hypervisor | ||
99 | 231 | Description: OpenStack Compute - compute node (QEmu) | 226 | Description: OpenStack Compute - compute node (QEmu) |
100 | 232 | OpenStack is a reliable cloud infrastructure. Its mission is to produce | 227 | OpenStack is a reliable cloud infrastructure. Its mission is to produce |
101 | 233 | the ubiquitous cloud computing platform that will meet the needs of public | 228 | the ubiquitous cloud computing platform that will meet the needs of public |
102 | @@ -249,8 +244,6 @@ | |||
103 | 249 | Architecture: all | 244 | Architecture: all |
104 | 250 | Depends: nova-compute (= ${binary:Version}), python-libvirt, libvirt-bin, kvm, ${misc:Depends} | 245 | Depends: nova-compute (= ${binary:Version}), python-libvirt, libvirt-bin, kvm, ${misc:Depends} |
105 | 251 | Provides: nova-compute-hypervisor | 246 | Provides: nova-compute-hypervisor |
106 | 252 | Replaces: nova-compute-hypervisor | ||
107 | 253 | Conflicts: nova-compute-hypervisor | ||
108 | 254 | Description: OpenStack Compute - compute node (KVM) | 247 | Description: OpenStack Compute - compute node (KVM) |
109 | 255 | OpenStack is a reliable cloud infrastructure. Its mission is to produce | 248 | OpenStack is a reliable cloud infrastructure. Its mission is to produce |
110 | 256 | the ubiquitous cloud computing platform that will meet the needs of public | 249 | the ubiquitous cloud computing platform that will meet the needs of public |
111 | 257 | 250 | ||
112 | === modified file 'debian/nova.conf' | |||
113 | --- debian/nova.conf 2012-01-25 14:33:10 +0000 | |||
114 | +++ debian/nova.conf 2012-02-20 10:08:22 +0000 | |||
115 | @@ -3,8 +3,8 @@ | |||
116 | 3 | --logdir=/var/log/nova | 3 | --logdir=/var/log/nova |
117 | 4 | --state_path=/var/lib/nova | 4 | --state_path=/var/lib/nova |
118 | 5 | --lock_path=/var/lock/nova | 5 | --lock_path=/var/lock/nova |
119 | 6 | --use_deprecated_auth | ||
120 | 7 | --force_dhcp_release | 6 | --force_dhcp_release |
121 | 7 | --iscsi_helper=tgtadm | ||
122 | 8 | --libvirt_use_virtio_for_bridges | 8 | --libvirt_use_virtio_for_bridges |
123 | 9 | --connection_type=libvirt | 9 | --connection_type=libvirt |
124 | 10 | --root_helper=sudo nova-rootwrap | 10 | --root_helper=sudo nova-rootwrap |
125 | 11 | 11 | ||
126 | === modified file 'debian/patches/libvirt-use-console-pipe.patch' | |||
127 | --- debian/patches/libvirt-use-console-pipe.patch 2012-02-11 02:04:05 +0000 | |||
128 | +++ debian/patches/libvirt-use-console-pipe.patch 2012-02-20 10:08:22 +0000 | |||
129 | @@ -1,6 +1,7 @@ | |||
133 | 1 | --- a/Authors | 1 | diff -Naurp nova.orig/Authors nova/Authors |
134 | 2 | +++ b/Authors | 2 | --- nova.orig/Authors 2012-02-14 12:09:51.913338628 -0500 |
135 | 3 | @@ -136,6 +136,7 @@ | 3 | +++ nova/Authors 2012-02-14 12:10:09.901337405 -0500 |
136 | 4 | @@ -138,6 +138,7 @@ Renuka Apte <renuka.apte@citrix.com> | ||
137 | 4 | Ricardo Carrillo Cruz <emaildericky@gmail.com> | 5 | Ricardo Carrillo Cruz <emaildericky@gmail.com> |
138 | 5 | Rick Clark <rick@openstack.org> | 6 | Rick Clark <rick@openstack.org> |
139 | 6 | Rick Harris <rconradharris@gmail.com> | 7 | Rick Harris <rconradharris@gmail.com> |
140 | @@ -8,9 +9,10 @@ | |||
141 | 8 | Rob Kost <kost@isi.edu> | 9 | Rob Kost <kost@isi.edu> |
142 | 9 | Russell Bryant <rbryant@redhat.com> | 10 | Russell Bryant <rbryant@redhat.com> |
143 | 10 | Ryan Lane <rlane@wikimedia.org> | 11 | Ryan Lane <rlane@wikimedia.org> |
147 | 11 | --- a/nova/tests/test_libvirt.py | 12 | diff -Naurp nova.orig/nova/tests/test_libvirt.py nova/nova/tests/test_libvirt.py |
148 | 12 | +++ b/nova/tests/test_libvirt.py | 13 | --- nova.orig/nova/tests/test_libvirt.py 2012-02-14 12:09:51.997338631 -0500 |
149 | 13 | @@ -761,7 +761,7 @@ | 14 | +++ nova/nova/tests/test_libvirt.py 2012-02-14 12:10:09.905337571 -0500 |
150 | 15 | @@ -761,7 +761,7 @@ class LibvirtConnTestCase(test.TestCase) | ||
151 | 14 | (lambda t: _ipv4_like(t.findall(parameter)[1].get('value'), | 16 | (lambda t: _ipv4_like(t.findall(parameter)[1].get('value'), |
152 | 15 | '192.168.*.1'), True), | 17 | '192.168.*.1'), True), |
153 | 16 | (lambda t: t.find('./devices/serial/source').get( | 18 | (lambda t: t.find('./devices/serial/source').get( |
154 | @@ -19,7 +21,7 @@ | |||
155 | 19 | (lambda t: t.find('./memory').text, '2097152')] | 21 | (lambda t: t.find('./memory').text, '2097152')] |
156 | 20 | if rescue: | 22 | if rescue: |
157 | 21 | common_checks += [ | 23 | common_checks += [ |
159 | 22 | @@ -1774,6 +1774,56 @@ | 24 | @@ -1774,6 +1774,56 @@ class NWFilterTestCase(test.TestCase): |
160 | 23 | db.instance_destroy(admin_ctxt, instance_ref['id']) | 25 | db.instance_destroy(admin_ctxt, instance_ref['id']) |
161 | 24 | 26 | ||
162 | 25 | 27 | ||
163 | @@ -76,8 +78,9 @@ | |||
164 | 76 | class LibvirtUtilsTestCase(test.TestCase): | 78 | class LibvirtUtilsTestCase(test.TestCase): |
165 | 77 | def test_get_iscsi_initiator(self): | 79 | def test_get_iscsi_initiator(self): |
166 | 78 | self.mox.StubOutWithMock(utils, 'execute') | 80 | self.mox.StubOutWithMock(utils, 'execute') |
169 | 79 | --- a/nova/tests/test_utils.py | 81 | diff -Naurp nova.orig/nova/tests/test_utils.py nova/nova/tests/test_utils.py |
170 | 80 | +++ b/nova/tests/test_utils.py | 82 | --- nova.orig/nova/tests/test_utils.py 2012-02-14 12:09:51.997338631 -0500 |
171 | 83 | +++ nova/nova/tests/test_utils.py 2012-02-14 12:10:09.905337571 -0500 | ||
172 | 81 | @@ -17,11 +17,14 @@ | 84 | @@ -17,11 +17,14 @@ |
173 | 82 | import __builtin__ | 85 | import __builtin__ |
174 | 83 | import mox | 86 | import mox |
175 | @@ -93,7 +96,7 @@ | |||
176 | 93 | import nova | 96 | import nova |
177 | 94 | from nova import exception | 97 | from nova import exception |
178 | 95 | from nova import flags | 98 | from nova import flags |
180 | 96 | @@ -700,3 +703,56 @@ | 99 | @@ -700,3 +703,56 @@ class DeprecationTest(test.TestCase): |
181 | 97 | h1 = utils.hash_file(flo) | 100 | h1 = utils.hash_file(flo) |
182 | 98 | h2 = hashlib.sha1(data).hexdigest() | 101 | h2 = hashlib.sha1(data).hexdigest() |
183 | 99 | self.assertEquals(h1, h2) | 102 | self.assertEquals(h1, h2) |
184 | @@ -150,9 +153,10 @@ | |||
185 | 150 | + f.close() | 153 | + f.close() |
186 | 151 | + | 154 | + |
187 | 152 | + | 155 | + |
191 | 153 | --- a/nova/utils.py | 156 | diff -Naurp nova.orig/nova/utils.py nova/nova/utils.py |
192 | 154 | +++ b/nova/utils.py | 157 | --- nova.orig/nova/utils.py 2012-02-14 12:09:52.001338633 -0500 |
193 | 155 | @@ -27,11 +27,13 @@ | 158 | +++ nova/nova/utils.py 2012-02-14 12:10:09.905337571 -0500 |
194 | 159 | @@ -27,11 +27,13 @@ import inspect | ||
195 | 156 | import json | 160 | import json |
196 | 157 | import lockfile | 161 | import lockfile |
197 | 158 | import os | 162 | import os |
198 | @@ -166,7 +170,7 @@ | |||
199 | 166 | import struct | 170 | import struct |
200 | 167 | import sys | 171 | import sys |
201 | 168 | import time | 172 | import time |
203 | 169 | @@ -52,6 +54,7 @@ | 173 | @@ -52,6 +54,7 @@ from nova import log as logging |
204 | 170 | from nova.openstack.common import cfg | 174 | from nova.openstack.common import cfg |
205 | 171 | 175 | ||
206 | 172 | 176 | ||
207 | @@ -174,7 +178,7 @@ | |||
208 | 174 | LOG = logging.getLogger("nova.utils") | 178 | LOG = logging.getLogger("nova.utils") |
209 | 175 | ISO_TIME_FORMAT = "%Y-%m-%dT%H:%M:%SZ" | 179 | ISO_TIME_FORMAT = "%Y-%m-%dT%H:%M:%SZ" |
210 | 176 | PERFECT_TIME_FORMAT = "%Y-%m-%dT%H:%M:%S.%f" | 180 | PERFECT_TIME_FORMAT = "%Y-%m-%dT%H:%M:%S.%f" |
212 | 177 | @@ -1420,3 +1423,133 @@ | 181 | @@ -1420,3 +1423,133 @@ def read_file_as_root(file_path): |
213 | 178 | return out | 182 | return out |
214 | 179 | except exception.ProcessExecutionError: | 183 | except exception.ProcessExecutionError: |
215 | 180 | raise exception.FileNotFound(file_path=file_path) | 184 | raise exception.FileNotFound(file_path=file_path) |
216 | @@ -308,9 +312,10 @@ | |||
217 | 308 | + def close(self): | 312 | + def close(self): |
218 | 309 | + self.f.close() | 313 | + self.f.close() |
219 | 310 | + | 314 | + |
223 | 311 | --- a/nova/virt/libvirt/connection.py | 315 | diff -Naurp nova.orig/nova/virt/libvirt/connection.py nova/nova/virt/libvirt/connection.py |
224 | 312 | +++ b/nova/virt/libvirt/connection.py | 316 | --- nova.orig/nova/virt/libvirt/connection.py 2012-02-14 12:09:52.001338633 -0500 |
225 | 313 | @@ -39,15 +39,19 @@ | 317 | +++ nova/nova/virt/libvirt/connection.py 2012-02-14 12:11:04.853340374 -0500 |
226 | 318 | @@ -39,15 +39,19 @@ Supports KVM, LXC, QEMU, UML, and XEN. | ||
227 | 314 | 319 | ||
228 | 315 | """ | 320 | """ |
229 | 316 | 321 | ||
230 | @@ -330,7 +335,7 @@ | |||
231 | 330 | from eventlet import greenthread | 335 | from eventlet import greenthread |
232 | 331 | from xml.dom import minidom | 336 | from xml.dom import minidom |
233 | 332 | from xml.etree import ElementTree | 337 | from xml.etree import ElementTree |
235 | 333 | @@ -141,6 +145,9 @@ | 338 | @@ -138,6 +142,9 @@ libvirt_opts = [ |
236 | 334 | cfg.BoolOpt('libvirt_use_virtio_for_bridges', | 339 | cfg.BoolOpt('libvirt_use_virtio_for_bridges', |
237 | 335 | default=False, | 340 | default=False, |
238 | 336 | help='Use virtio for bridge interfaces'), | 341 | help='Use virtio for bridge interfaces'), |
239 | @@ -340,7 +345,7 @@ | |||
240 | 340 | cfg.StrOpt('libvirt_disk_prefix', | 345 | cfg.StrOpt('libvirt_disk_prefix', |
241 | 341 | default=None, | 346 | default=None, |
242 | 342 | help='Override the default disk prefix for the devices attached' | 347 | help='Override the default disk prefix for the devices attached' |
244 | 343 | @@ -179,6 +186,57 @@ | 348 | @@ -176,6 +183,57 @@ def _get_eph_disk(ephemeral): |
245 | 344 | return 'disk.eph' + str(ephemeral['num']) | 349 | return 'disk.eph' + str(ephemeral['num']) |
246 | 345 | 350 | ||
247 | 346 | 351 | ||
248 | @@ -398,7 +403,7 @@ | |||
249 | 398 | class LibvirtConnection(driver.ComputeDriver): | 403 | class LibvirtConnection(driver.ComputeDriver): |
250 | 399 | 404 | ||
251 | 400 | def __init__(self, read_only): | 405 | def __init__(self, read_only): |
253 | 401 | @@ -212,6 +270,8 @@ | 406 | @@ -209,6 +267,8 @@ class LibvirtConnection(driver.ComputeDr |
254 | 402 | 407 | ||
255 | 403 | self.image_cache_manager = imagecache.ImageCacheManager() | 408 | self.image_cache_manager = imagecache.ImageCacheManager() |
256 | 404 | 409 | ||
257 | @@ -407,7 +412,7 @@ | |||
258 | 407 | @property | 412 | @property |
259 | 408 | def host_state(self): | 413 | def host_state(self): |
260 | 409 | if not self._host_state: | 414 | if not self._host_state: |
262 | 410 | @@ -220,7 +280,11 @@ | 415 | @@ -217,7 +277,11 @@ class LibvirtConnection(driver.ComputeDr |
263 | 411 | 416 | ||
264 | 412 | def init_host(self, host): | 417 | def init_host(self, host): |
265 | 413 | # NOTE(nsokolov): moved instance restarting to ComputeManager | 418 | # NOTE(nsokolov): moved instance restarting to ComputeManager |
266 | @@ -420,7 +425,7 @@ | |||
267 | 420 | 425 | ||
268 | 421 | @property | 426 | @property |
269 | 422 | def libvirt_xml(self): | 427 | def libvirt_xml(self): |
271 | 423 | @@ -281,6 +345,15 @@ | 428 | @@ -278,6 +342,15 @@ class LibvirtConnection(driver.ComputeDr |
272 | 424 | else: | 429 | else: |
273 | 425 | return libvirt.openAuth(uri, auth, 0) | 430 | return libvirt.openAuth(uri, auth, 0) |
274 | 426 | 431 | ||
275 | @@ -436,15 +441,15 @@ | |||
276 | 436 | def instance_exists(self, instance_id): | 441 | def instance_exists(self, instance_id): |
277 | 437 | """Efficient override of base instance_exists method.""" | 442 | """Efficient override of base instance_exists method.""" |
278 | 438 | try: | 443 | try: |
280 | 439 | @@ -424,6 +497,7 @@ | 444 | @@ -419,6 +492,7 @@ class LibvirtConnection(driver.ComputeDr |
281 | 440 | def _cleanup(self, instance): | 445 | def _cleanup(self, instance): |
282 | 441 | target = os.path.join(FLAGS.instances_path, instance['name']) | 446 | target = os.path.join(FLAGS.instances_path, instance['name']) |
283 | 442 | instance_name = instance['name'] | 447 | instance_name = instance['name'] |
287 | 443 | + self._stop_console_logger(instance_name) | 448 | + self._stop_console_loger(instance_name) |
288 | 444 | LOG.info(_('instance %(instance_name)s: deleting instance files' | 449 | LOG.info(_('Deleting instance files %(target)s') % locals(), |
289 | 445 | ' %(target)s') % locals()) | 450 | instance=instance) |
290 | 446 | if FLAGS.libvirt_type == 'lxc': | 451 | if FLAGS.libvirt_type == 'lxc': |
292 | 447 | @@ -780,10 +854,10 @@ | 452 | @@ -776,10 +850,10 @@ class LibvirtConnection(driver.ComputeDr |
293 | 448 | 453 | ||
294 | 449 | @exception.wrap_exception() | 454 | @exception.wrap_exception() |
295 | 450 | def get_console_output(self, instance): | 455 | def get_console_output(self, instance): |
296 | @@ -458,7 +463,7 @@ | |||
297 | 458 | 463 | ||
298 | 459 | if FLAGS.libvirt_type == 'xen': | 464 | if FLAGS.libvirt_type == 'xen': |
299 | 460 | # Xen is special | 465 | # Xen is special |
301 | 461 | @@ -791,14 +865,14 @@ | 466 | @@ -787,12 +861,12 @@ class LibvirtConnection(driver.ComputeDr |
302 | 462 | 'ttyconsole', | 467 | 'ttyconsole', |
303 | 463 | instance['name']) | 468 | instance['name']) |
304 | 464 | data = self._flush_xen_console(virsh_output) | 469 | data = self._flush_xen_console(virsh_output) |
305 | @@ -466,17 +471,14 @@ | |||
306 | 466 | + fpath = self._append_to_file(data, console_fifo) | 471 | + fpath = self._append_to_file(data, console_fifo) |
307 | 467 | elif FLAGS.libvirt_type == 'lxc': | 472 | elif FLAGS.libvirt_type == 'lxc': |
308 | 468 | # LXC is also special | 473 | # LXC is also special |
310 | 469 | LOG.info(_("Unable to read LXC console")) | 474 | LOG.info(_("Unable to read LXC console"), instance=instance) |
311 | 470 | else: | 475 | else: |
312 | 471 | - fpath = console_log | 476 | - fpath = console_log |
313 | 472 | + fpath = console_fifo | 477 | + fpath = console_fifo |
314 | 473 | 478 | ||
317 | 474 | - return libvirt_utils.load_file(fpath) | 479 | return libvirt_utils.load_file(fpath) |
316 | 475 | + return self.console_loggers[instance['name']].peek() | ||
318 | 476 | 480 | ||
322 | 477 | @staticmethod | 481 | @@ -930,7 +1004,24 @@ class LibvirtConnection(driver.ComputeDr |
320 | 478 | def get_host_ip_addr(): | ||
321 | 479 | @@ -934,7 +1008,24 @@ | ||
323 | 480 | libvirt_utils.ensure_tree(container_dir) | 482 | libvirt_utils.ensure_tree(container_dir) |
324 | 481 | 483 | ||
325 | 482 | # NOTE(vish): No need add the suffix to console.log | 484 | # NOTE(vish): No need add the suffix to console.log |
326 | 483 | 485 | ||
327 | === modified file 'debian/patches/series' | |||
328 | --- debian/patches/series 2012-02-13 17:01:11 +0000 | |||
329 | +++ debian/patches/series 2012-02-20 10:08:22 +0000 | |||
330 | @@ -1,3 +1,3 @@ | |||
331 | 1 | nova-manage_flagfile_location.patch | 1 | nova-manage_flagfile_location.patch |
332 | 2 | kombu_tests_timeout.patch | 2 | kombu_tests_timeout.patch |
334 | 3 | libvirt-use-console-pipe.patch | 3 | #libvirt-use-console-pipe.patch |
335 | 4 | 4 | ||
336 | === modified file 'debian/rules' | |||
337 | --- debian/rules 2012-02-13 17:01:11 +0000 | |||
338 | +++ debian/rules 2012-02-20 10:08:22 +0000 | |||
339 | @@ -3,6 +3,12 @@ | |||
340 | 3 | # Verbose mode | 3 | # Verbose mode |
341 | 4 | #export DH_VERBOSE=1 | 4 | #export DH_VERBOSE=1 |
342 | 5 | 5 | ||
343 | 6 | include /usr/share/python/python.mk | ||
344 | 7 | |||
345 | 8 | PACKAGE_NAME=python-nova | ||
346 | 9 | debroot = debian/tmp | ||
347 | 10 | site_packages_dir=$(debroot)$(call py_libdir,$(shell pyversions -d)) | ||
348 | 11 | |||
349 | 6 | # Lucid does not have dh_python2, but we would like to be able to use this | 12 | # Lucid does not have dh_python2, but we would like to be able to use this |
350 | 7 | # rules file to build on lucid as well. Thus the branching logic. | 13 | # rules file to build on lucid as well. Thus the branching logic. |
351 | 8 | WITH_PYTHON2 = $(shell test -f /usr/bin/dh_python2 && echo "--with python2") | 14 | WITH_PYTHON2 = $(shell test -f /usr/bin/dh_python2 && echo "--with python2") |
352 | @@ -52,9 +58,15 @@ | |||
353 | 52 | --prefix=$(DEBIAN_NAME)-$(DEBIAN_VERSION)/ | 58 | --prefix=$(DEBIAN_NAME)-$(DEBIAN_VERSION)/ |
354 | 53 | 59 | ||
355 | 54 | 60 | ||
359 | 55 | override_dh_install: | 61 | override_dh_auto_install: |
360 | 56 | dh_install | 62 | # python-nova |
361 | 57 | chmod 440 $(CURDIR)/debian/nova-common/etc/sudoers.d/nova_sudoers | 63 | python setup.py install -f --install-layout=deb --root=$(debroot) |
362 | 64 | mkdir -p $(debroot)/usr/share | ||
363 | 65 | mv $(site_packages_dir)/nova/locale $(debroot)/usr/share | ||
364 | 66 | mkdir -p $(debroot)/usr/share/apport/package-hooks | ||
365 | 67 | |||
366 | 68 | # nova-common | ||
367 | 69 | install -D -m 440 $(CURDIR)/debian/nova_sudoers $(CURDIR)/debian/nova-common/etc/sudoers.d/nova_sudoers | ||
368 | 58 | install -D -m 0664 $(CURDIR)/debian/nova-volume.default $(CURDIR)/debian/nova-volume/etc/default/nova-volume | 70 | install -D -m 0664 $(CURDIR)/debian/nova-volume.default $(CURDIR)/debian/nova-volume/etc/default/nova-volume |
369 | 59 | for hypervisor in qemu kvm xen uml lxc; do \ | 71 | for hypervisor in qemu kvm xen uml lxc; do \ |
370 | 60 | install -D -m 0600 $(CURDIR)/debian/nova-compute-$${hypervisor}.conf $(CURDIR)/debian/nova-compute-$${hypervisor}/etc/nova/nova-compute.conf; \ | 72 | install -D -m 0600 $(CURDIR)/debian/nova-compute-$${hypervisor}.conf $(CURDIR)/debian/nova-compute-$${hypervisor}/etc/nova/nova-compute.conf; \ |