From 3b5ec214c506a47cbd8abf7bd6557246980ddea5 Mon Sep 17 00:00:00 2001 From: Vu Tran Date: Tue, 18 Mar 2014 21:01:01 -0400 Subject: nova-compute: enable to use ceph Enable nova-compute to: * use cinder volume stored in a ceph pool as a block device * store glance image into a ceph pool. Also port 2 patches from https://github.com/openstack/nova branch master into Havana branch. Signed-off-by: Vu Tran --- ...-rbd.libvirt_info-parent-class-compatible.patch | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 meta-openstack/recipes-devtools/python/python-nova/Make-rbd.libvirt_info-parent-class-compatible.patch (limited to 'meta-openstack/recipes-devtools/python/python-nova/Make-rbd.libvirt_info-parent-class-compatible.patch') diff --git a/meta-openstack/recipes-devtools/python/python-nova/Make-rbd.libvirt_info-parent-class-compatible.patch b/meta-openstack/recipes-devtools/python/python-nova/Make-rbd.libvirt_info-parent-class-compatible.patch new file mode 100644 index 0000000..542abf5 --- /dev/null +++ b/meta-openstack/recipes-devtools/python/python-nova/Make-rbd.libvirt_info-parent-class-compatible.patch @@ -0,0 +1,48 @@ +Make rbd.libvirt_info parent class compatible + +commit 7a34be0ec0cd0cb9555fe64ff6c486faae1ae91d from +https://github.com/openstack/nova + +Rbd.libvirt_info function definition misses hypervisor_version argument added in change: +https://review.openstack.org/32379 + +Closes-Bug: #1233188 +Change-Id: Ib68d743e783af0f6d82d2ba180869ee642e86050 + +diff --git a/nova/tests/virt/libvirt/test_imagebackend.py b/nova/tests/virt/libvirt/test_imagebackend.py +index 2455ec8..5bfa94d 100644 +--- a/nova/tests/virt/libvirt/test_imagebackend.py ++++ b/nova/tests/virt/libvirt/test_imagebackend.py +@@ -20,6 +20,8 @@ import os + import fixtures + from oslo.config import cfg + ++from inspect import getargspec ++ + from nova import exception + from nova.openstack.common import uuidutils + from nova import test +@@ -630,6 +632,10 @@ class RbdTestCase(_ImageTestCase, test.NoDBTestCase): + + self.assertEqual(fake_processutils.fake_execute_get_log(), []) + ++ def test_parent_compatible(self): ++ self.assertEqual(getargspec(imagebackend.Image.libvirt_info), ++ getargspec(self.image_class.libvirt_info)) ++ + + class BackendTestCase(test.NoDBTestCase): + INSTANCE = {'name': 'fake-instance', +diff --git a/nova/virt/libvirt/imagebackend.py b/nova/virt/libvirt/imagebackend.py +index e900789..51872cf 100644 +--- a/nova/virt/libvirt/imagebackend.py ++++ b/nova/virt/libvirt/imagebackend.py +@@ -482,7 +482,7 @@ class Rbd(Image): + return hosts, ports + + def libvirt_info(self, disk_bus, disk_dev, device_type, cache_mode, +- extra_specs): ++ extra_specs, hypervisor_version): + """Get `LibvirtConfigGuestDisk` filled for this image. + + :disk_dev: Disk bus device name -- cgit v1.2.3-54-g00ecf