~ubuntu-branches/ubuntu/precise/nova/precise

« back to all changes in this revision

Viewing changes to debian/patches/libvirt-use-console-pipe.patch

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Adam Gandleman, Chuck Short
  • Date: 2012-03-02 11:04:04 UTC
  • mfrom: (1.1.47)
  • Revision ID: package-import@ubuntu.com-20120302110404-fr230yakr8hov3dj
Tags: 2012.1~e4-0ubuntu1
[ Adam Gandleman ]
* debian/patches/libvirt-use-console-pipe.patch: Refreshed. 
* debain/nova-volume.upstart.in: Ensure lock directory is created
  (LP: #940780)
* debain/control: Fix nova-compute-$flavor Depends
* debian/control: Add python-iso8601 to python-nova Depends

[ Chuck Short ]
* debian/rules: Fix FTBFS.
* Merge Ubuntu/Debian packaging:
  - Thanks to Julien Danjou, Ghe Rivero, and Thomas Goirand
  - debian/copyright: Update copyright file.
  - debian/nova-api.init, debian/nova-compute.init,
    debian/nova-network.init, debian/nova-objectstore,
    debian/nova-scheduler, debian/nova-volume.init:
    Synchronize init scripts.
  - nova-common.install, debian/rules: Install policy.json
  - debian/rules, debian/nova-xcp-network.install,
    debian/nova-xcp-plugins.install, nova-xcp-plugins.postrm,
    debian/nova-xcp-plugins.doc, debian/nova-xcp-plugins.postinst,
    debian/README.xcp_and_openstack, debian/control,
    debian/ubuntu_xen-openvswitch-nova.rules,
    debian/patches/path-to-the-xenhost.conf-fixup.patch:
    Add Xen XCP support.
  - debian/control,
    debian/nova-compute-{kvm,lxc,qemu,xen,uml}.postinst: Make
    nova-compute a virtual package.
  - Dropped ubuntu_ubuntu_control_vars: We dont use it
* New upstream release.
* Dropped python-babel, it will be handled by langpacks.
* debian/patches/ec2-fixes.patch: Backport turnk fix for ec2
  permissions.
* debian/patches/path-to-the-xenhost.conf-fixup.patch: Refreshed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
diff -Naur nova.orig/Authors nova/Authors
2
 
--- nova.orig/Authors   2012-02-22 20:57:07.968044568 -0500
3
 
+++ nova/Authors        2012-02-22 20:58:15.360044601 -0500
4
 
@@ -144,6 +144,7 @@
5
 
 Rick Clark <rick@openstack.org>
 
1
Index: nova/Authors
 
2
===================================================================
 
3
--- nova.orig/Authors   2012-02-29 13:34:24.914358872 -0800
 
4
+++ nova/Authors        2012-02-29 13:37:15.602351362 -0800
 
5
@@ -150,6 +150,7 @@
6
6
 Rick Harris <rconradharris@gmail.com>
7
7
 Rob Kost <kost@isi.edu>
 
8
 Robert Esker <esker@netapp.com>
8
9
+Robie Basak <robie.basak@canonical.com>
9
10
 Russell Bryant <rbryant@redhat.com>
 
11
 Russell Sim <russell.sim@gmail.com>
10
12
 Ryan Lane <rlane@wikimedia.org>
11
 
 Ryan Lucio <rlucio@internap.com>
12
 
diff -Naur nova.orig/nova/tests/test_libvirt.py nova/nova/tests/test_libvirt.py
13
 
--- nova.orig/nova/tests/test_libvirt.py        2012-02-22 20:57:08.056044568 -0500
14
 
+++ nova/nova/tests/test_libvirt.py     2012-02-22 20:58:15.360044601 -0500
 
13
Index: nova/nova/tests/test_libvirt.py
 
14
===================================================================
 
15
--- nova.orig/nova/tests/test_libvirt.py        2012-02-29 13:34:25.094358864 -0800
 
16
+++ nova/nova/tests/test_libvirt.py     2012-02-29 13:36:49.298352518 -0800
15
17
@@ -872,7 +872,7 @@
16
18
             (lambda t: _ipv4_like(t.findall(parameter)[1].get('value'),
17
19
                                   '192.168.*.1'), True),
21
23
             (lambda t: t.find('./memory').text, '2097152')]
22
24
         if rescue:
23
25
             common_checks += [
24
 
@@ -2312,3 +2312,53 @@
 
26
@@ -2308,3 +2308,53 @@
25
27
 
26
28
         ref = self.libvirtconnection.finish_revert_migration(ins_ref, None)
27
29
         self.assertTrue(isinstance(ref, eventlet.event.Event))
75
77
+        os.unlink(self.ringbuffer_path)
76
78
+        os.unlink(self.fifo_path)
77
79
+        os.rmdir(self.directory_path)
78
 
diff -Naur nova.orig/nova/tests/test_utils.py nova/nova/tests/test_utils.py
79
 
--- nova.orig/nova/tests/test_utils.py  2012-02-22 20:57:08.060044569 -0500
80
 
+++ nova/nova/tests/test_utils.py       2012-02-22 20:58:15.364044601 -0500
81
 
@@ -17,12 +17,14 @@
 
80
Index: nova/nova/tests/test_utils.py
 
81
===================================================================
 
82
--- nova.orig/nova/tests/test_utils.py  2012-02-29 13:34:25.102358863 -0800
 
83
+++ nova/nova/tests/test_utils.py       2012-02-29 13:36:49.298352518 -0800
 
84
@@ -17,6 +17,7 @@
82
85
 import __builtin__
83
86
 import datetime
84
87
 import hashlib
85
88
+import itertools
86
89
 import os
87
 
 import StringIO
88
 
 import tempfile
 
90
 import os.path
 
91
 import socket
 
92
@@ -25,6 +26,7 @@
89
93
 
90
94
 import iso8601
91
95
 import mox
93
97
 
94
98
 import nova
95
99
 from nova import exception
96
 
@@ -811,3 +813,54 @@
 
100
@@ -818,6 +820,57 @@
97
101
         west = utils.parse_isotime(str)
98
102
         normed = utils.normalize_time(west)
99
103
         self._instaneous(normed, 2012, 2, 13, 23, 53, 07, 0)
101
105
+class RingBufferTestCase(test.TestCase):
102
106
+    """Unit test for utils.RingBuffer()."""
103
107
+    def setUp(self):
104
 
+        super(RingBufferTestCase, self).setUp()
 
108
+        super(ingBufferTestCase, self).setUp()
105
109
+        self.f = tempfile.NamedTemporaryFile()
106
110
+        self.r = utils.RingBuffer(self.f.name, max_size=4)
107
111
+
148
152
+            yield check_buffer, r, expected
149
153
+        r.close()
150
154
+        f.close()
151
 
diff -Naur nova.orig/nova/utils.py nova/nova/utils.py
152
 
--- nova.orig/nova/utils.py     2012-02-22 20:57:08.060044569 -0500
153
 
+++ nova/nova/utils.py  2012-02-22 20:58:15.364044601 -0500
154
 
@@ -32,6 +32,7 @@
155
 
 import re
 
155
 
 
156
 
 
157
 class TestLockCleanup(test.TestCase):
 
158
Index: nova/nova/utils.py
 
159
===================================================================
 
160
--- nova.orig/nova/utils.py     2012-02-29 13:34:25.106358862 -0800
 
161
+++ nova/nova/utils.py  2012-02-29 13:36:49.302352518 -0800
 
162
@@ -33,6 +33,7 @@
156
163
 import shlex
 
164
 import shutil
157
165
 import socket
158
166
+import stat
159
167
 import struct
160
168
 import sys
161
 
 import time
162
 
@@ -53,6 +54,7 @@
 
169
 import tempfile
 
170
@@ -56,6 +57,7 @@
163
171
 from nova.openstack.common import cfg
164
172
 
165
173
 
167
175
 LOG = logging.getLogger(__name__)
168
176
 ISO_TIME_FORMAT = "%Y-%m-%dT%H:%M:%S"
169
177
 PERFECT_TIME_FORMAT = "%Y-%m-%dT%H:%M:%S.%f"
170
 
@@ -1434,3 +1436,132 @@
 
178
@@ -1530,6 +1532,135 @@
171
179
         return out
172
180
     except exception.ProcessExecutionError:
173
181
         raise exception.FileNotFound(file_path=file_path)
300
308
+
301
309
+    def close(self):
302
310
+        self.f.close()
303
 
diff -Naur nova.orig/nova/virt/libvirt/connection.py nova/nova/virt/libvirt/connection.py
304
 
--- nova.orig/nova/virt/libvirt/connection.py   2012-02-22 20:57:08.064044569 -0500
305
 
+++ nova/nova/virt/libvirt/connection.py        2012-02-22 20:58:15.368044601 -0500
 
311
 
 
312
 
 
313
 @contextlib.contextmanager
 
314
Index: nova/nova/virt/libvirt/connection.py
 
315
===================================================================
 
316
--- nova.orig/nova/virt/libvirt/connection.py   2012-02-29 13:34:25.110358862 -0800
 
317
+++ nova/nova/virt/libvirt/connection.py        2012-02-29 13:36:49.302352518 -0800
306
318
@@ -39,15 +39,19 @@
307
319
 
308
320
 """
310
322
+import errno
311
323
 import hashlib
312
324
 import functools
 
325
 import glob
313
326
 import multiprocessing
314
327
 import os
315
328
+import select
316
329
 import shutil
317
330
+import stat
318
331
 import sys
319
 
 import tempfile
320
332
 import uuid
321
333
 
322
334
+import eventlet
437
449
         LOG.info(_('Deleting instance files %(target)s') % locals(),
438
450
                  instance=instance)
439
451
         if FLAGS.libvirt_type == 'lxc':
440
 
@@ -854,10 +928,10 @@
 
452
@@ -867,10 +941,10 @@
441
453
 
442
454
     @exception.wrap_exception()
443
455
     def get_console_output(self, instance):
451
463
 
452
464
         if FLAGS.libvirt_type == 'xen':
453
465
             # Xen is special
454
 
@@ -865,14 +939,12 @@
 
466
@@ -878,14 +952,12 @@
455
467
                                          'ttyconsole',
456
468
                                          instance['name'])
457
469
             data = self._flush_xen_console(virsh_output)
468
480
 
469
481
     @staticmethod
470
482
     def get_host_ip_addr():
471
 
@@ -997,8 +1069,25 @@
 
483
@@ -1011,8 +1083,25 @@
472
484
             container_dir = '%s/rootfs' % basepath(suffix='')
473
485
             libvirt_utils.ensure_tree(container_dir)
474
486
 
496
508
 
497
509
         if not disk_images:
498
510
             disk_images = {'image_id': instance['image_ref'],
499
 
diff -Naur nova.orig/nova/virt/libvirt.xml.template nova/nova/virt/libvirt.xml.template
500
 
--- nova.orig/nova/virt/libvirt.xml.template    2012-02-22 20:57:08.064044569 -0500
501
 
+++ nova/nova/virt/libvirt.xml.template 2012-02-22 20:58:15.364044601 -0500
502
 
@@ -152,8 +152,8 @@
 
511
Index: nova/nova/virt/libvirt.xml.template
 
512
===================================================================
 
513
--- nova.orig/nova/virt/libvirt.xml.template    2012-02-29 13:34:25.110358862 -0800
 
514
+++ nova/nova/virt/libvirt.xml.template 2012-02-29 13:36:49.302352518 -0800
 
515
@@ -160,8 +160,8 @@
503
516
 
504
517
 #end for
505
518
         <!-- The order is significant here.  File must be defined first -->