diff -Nru nova-2014.1/debian/changelog nova-2014.1/debian/changelog --- nova-2014.1/debian/changelog 2014-04-17 10:18:15.000000000 +0000 +++ nova-2014.1/debian/changelog 2014-06-25 04:27:31.000000000 +0000 @@ -1,3 +1,27 @@ +nova (1:2014.1-0ubuntu1.2hf1332201v20140620.0hf1334032v20140625.0) trusty; urgency=medium + + [ Hui Xiang ] + * New upstream release + - LP: #1219658 + + -- Hui Xiang Wed, 25 Jun 2014 11:51:32 +0800 + +nova (1:2014.1-0ubuntu1.2hflp1332201v20140620.0) trusty; urgency=medium + + [ Hui Xiang ] + * New upstream release candidate + - LP: #1303536 + + -- Hui Xiang Sat, 21 Jun 2014 00:21:28 +0800 + +nova (1:2014.1-0ubuntu1.2) trusty-security; urgency=medium + + * SECURITY UPDATE: specify /etc/nova/rootwrap.conf for use with + nova-rootwrap + - CVE-2013-1068 (LP: #1185019) + + -- Jamie Strandboge Mon, 09 Jun 2014 09:32:44 -0500 + nova (1:2014.1-0ubuntu1) trusty; urgency=medium [ Chuck Short ] diff -Nru nova-2014.1/debian/nova_sudoers nova-2014.1/debian/nova_sudoers --- nova-2014.1/debian/nova_sudoers 2014-04-17 10:18:15.000000000 +0000 +++ nova-2014.1/debian/nova_sudoers 2014-06-25 01:48:39.000000000 +0000 @@ -1,3 +1,3 @@ Defaults:nova !requiretty -nova ALL = (root) NOPASSWD: /usr/bin/nova-rootwrap +nova ALL = (root) NOPASSWD: /usr/bin/nova-rootwrap /etc/nova/rootwrap.conf * diff -Nru nova-2014.1/debian/patches/fix-cpu-feature-wdt-lp1303536.patch nova-2014.1/debian/patches/fix-cpu-feature-wdt-lp1303536.patch --- nova-2014.1/debian/patches/fix-cpu-feature-wdt-lp1303536.patch 1970-01-01 00:00:00.000000000 +0000 +++ nova-2014.1/debian/patches/fix-cpu-feature-wdt-lp1303536.patch 2014-06-25 01:49:03.000000000 +0000 @@ -0,0 +1,130 @@ +Index: nova-2014.1/nova/tests/virt/libvirt/test_libvirt.py +=================================================================== +--- nova-2014.1.orig/nova/tests/virt/libvirt/test_libvirt.py 2014-04-17 09:47:52.000000000 +0000 ++++ nova-2014.1/nova/tests/virt/libvirt/test_libvirt.py 2014-06-20 02:02:10.349820299 +0000 +@@ -2172,8 +2172,8 @@ + cpu.model = "Opteron_G4" + cpu.vendor = "AMD" + +- cpu.features.append(vconfig.LibvirtConfigGuestCPUFeature("tm2")) +- cpu.features.append(vconfig.LibvirtConfigGuestCPUFeature("ht")) ++ cpu.add_feature(vconfig.LibvirtConfigGuestCPUFeature("tm2")) ++ cpu.add_feature(vconfig.LibvirtConfigGuestCPUFeature("ht")) + + caps = vconfig.LibvirtConfigCaps() + caps.host = vconfig.LibvirtConfigCapsHost() +@@ -2201,8 +2201,8 @@ + self.assertEqual(conf.cpu.model, "Opteron_G4") + self.assertEqual(conf.cpu.vendor, "AMD") + self.assertEqual(len(conf.cpu.features), 2) +- self.assertEqual(conf.cpu.features[0].name, "tm2") +- self.assertEqual(conf.cpu.features[1].name, "ht") ++ self.assertEqual(conf.cpu.features.pop().name, "tm2") ++ self.assertEqual(conf.cpu.features.pop().name, "ht") + + def test_get_guest_cpu_config_custom_old(self): + def get_lib_version_stub(): +Index: nova-2014.1/nova/tests/virt/libvirt/test_libvirt_config.py +=================================================================== +--- nova-2014.1.orig/nova/tests/virt/libvirt/test_libvirt_config.py 2014-04-17 09:47:43.000000000 +0000 ++++ nova-2014.1/nova/tests/virt/libvirt/test_libvirt_config.py 2014-06-20 01:37:30.929820299 +0000 +@@ -235,8 +235,30 @@ + x86_64 + Penryn + Intel ++ + ++ ++ """) ++ ++ def test_only_uniq_cpu_featues(self): ++ obj = config.LibvirtConfigCPU() ++ obj.model = "Penryn" ++ obj.vendor = "Intel" ++ obj.arch = "x86_64" ++ ++ obj.add_feature(config.LibvirtConfigCPUFeature("mtrr")) ++ obj.add_feature(config.LibvirtConfigCPUFeature("apic")) ++ obj.add_feature(config.LibvirtConfigCPUFeature("apic")) ++ obj.add_feature(config.LibvirtConfigCPUFeature("mtrr")) ++ ++ xml = obj.to_xml() ++ self.assertXmlEqual(xml, """ ++ ++ x86_64 ++ Penryn ++ Intel + ++ + + """) + +@@ -285,8 +307,8 @@ + x86_64 + Penryn + Intel +- + ++ + + """) + +Index: nova-2014.1/nova/virt/libvirt/config.py +=================================================================== +--- nova-2014.1.orig/nova/virt/libvirt/config.py 2014-04-17 09:47:43.000000000 +0000 ++++ nova-2014.1/nova/virt/libvirt/config.py 2014-06-20 01:22:07.801820299 +0000 +@@ -250,6 +250,15 @@ + + return ft + ++ def __eq__(self, obj): ++ return obj.name == self.name ++ ++ def __ne__(self, obj): ++ return obj.name != self.name ++ ++ def __hash__(self): ++ return hash(self.name) ++ + + class LibvirtConfigCPU(LibvirtConfigObject): + +@@ -265,7 +274,7 @@ + self.cores = None + self.threads = None + +- self.features = [] ++ self.features = set() + + def parse_dom(self, xmldoc): + super(LibvirtConfigCPU, self).parse_dom(xmldoc) +@@ -305,13 +314,14 @@ + top.set("threads", str(self.threads)) + cpu.append(top) + +- for f in self.features: ++ # sorting the features to allow more predictable tests ++ for f in sorted(self.features, key=lambda x: x.name): + cpu.append(f.format_dom()) + + return cpu + + def add_feature(self, feat): +- self.features.append(feat) ++ self.features.add(feat) + + + class LibvirtConfigGuestCPUFeature(LibvirtConfigCPUFeature): +Index: nova-2014.1/nova/virt/libvirt/driver.py +=================================================================== +--- nova-2014.1.orig/nova/virt/libvirt/driver.py 2014-06-20 01:09:42.000000000 +0000 ++++ nova-2014.1/nova/virt/libvirt/driver.py 2014-06-20 01:13:52.137820299 +0000 +@@ -2876,7 +2876,7 @@ + for hostfeat in hostcpu.features: + guestfeat = vconfig.LibvirtConfigGuestCPUFeature(hostfeat.name) + guestfeat.policy = "require" +- guestcpu.features.append(guestfeat) ++ guestcpu.add_feature(guestfeat) + + return guestcpu + diff -Nru nova-2014.1/debian/patches/fix-rbd-backend-image-size-lp1219658.patch nova-2014.1/debian/patches/fix-rbd-backend-image-size-lp1219658.patch --- nova-2014.1/debian/patches/fix-rbd-backend-image-size-lp1219658.patch 1970-01-01 00:00:00.000000000 +0000 +++ nova-2014.1/debian/patches/fix-rbd-backend-image-size-lp1219658.patch 2014-06-25 01:49:04.000000000 +0000 @@ -0,0 +1,72 @@ +Index: nova-2014.1/nova/tests/virt/libvirt/test_imagebackend.py +=================================================================== +--- nova-2014.1.orig/nova/tests/virt/libvirt/test_imagebackend.py 2014-04-17 09:47:52.000000000 +0000 ++++ nova-2014.1/nova/tests/virt/libvirt/test_imagebackend.py 2014-06-25 01:33:10.801820299 +0000 +@@ -13,11 +13,13 @@ + # License for the specific language governing permissions and limitations + # under the License. + ++import contextlib + import os + import shutil + import tempfile + + import fixtures ++import mock + from oslo.config import cfg + + import inspect +@@ -879,6 +881,37 @@ + + self.assertEqual(image.path, rbd_path) + ++ def test_resize(self): ++ class fake_rbd(object): ++ class Error(object): ++ pass ++ ++ class Image(object): ++ def __init__(self, ioctx, name, snapshot): ++ pass ++ ++ def resize(self, size): ++ pass ++ ++ def close(self): ++ pass ++ ++ def fake_resize(size): ++ self.assertEqual(self.SIZE, size) ++ ++ image = self.image_class(self.INSTANCE, self.NAME) ++ with contextlib.nested( ++ mock.patch.object(image, "_connect_to_rados", ++ lambda p: (None, None)), ++ mock.patch.object(image, "_disconnect_from_rados", ++ lambda io, ctx: True)): ++ image.rbd = fake_rbd() ++ vol = imagebackend.RBDVolumeProxy(image, image.rbd_name) ++ ++ with contextlib.nested( ++ mock.patch.object(vol, "resize", fake_resize)): ++ image._resize(image.rbd_name, self.SIZE) ++ + + class BackendTestCase(test.NoDBTestCase): + INSTANCE = {'name': 'fake-instance', +Index: nova-2014.1/nova/virt/libvirt/imagebackend.py +=================================================================== +--- nova-2014.1.orig/nova/virt/libvirt/imagebackend.py 2014-04-17 09:47:52.000000000 +0000 ++++ nova-2014.1/nova/virt/libvirt/imagebackend.py 2014-06-25 01:30:59.073820299 +0000 +@@ -655,10 +655,8 @@ + return False + + def _resize(self, volume_name, size): +- size = int(size) * units.Ki +- + with RBDVolumeProxy(self, volume_name) as vol: +- vol.resize(size) ++ vol.resize(int(size)) + + def create_image(self, prepare_template, base, size, *args, **kwargs): + if self.rbd is None: diff -Nru nova-2014.1/debian/patches/series nova-2014.1/debian/patches/series --- nova-2014.1/debian/patches/series 2014-04-17 10:18:15.000000000 +0000 +++ nova-2014.1/debian/patches/series 2014-06-25 01:49:02.000000000 +0000 @@ -3,3 +3,5 @@ skip_ipv6_test.patch arm-console-patch.patch update-run-tests.patch +fix-cpu-feature-wdt-lp1303536.patch +fix-rbd-backend-image-size-lp1219658.patch