[openstack-nova] Update to Icehouse milestone 3
Vladan Popovic
vpopovic at fedoraproject.org
Tue Mar 11 09:23:11 UTC 2014
commit 3b7c3f650c5f0d0cb08e7116077d0a041282f095
Author: Vladan Popovic <vpopovic at redhat.com>
Date: Fri Mar 7 13:16:57 2014 +0100
Update to Icehouse milestone 3
.gitignore | 1 +
...e-don-t-access-the-net-when-building-docs.patch | 4 +-
0002-remove-runtime-dep-on-python-pbr.patch | 8 +-
...evert-Replace-oslo.sphinx-with-oslosphinx.patch | 53 +++++++++
0003-libvirt-Fix-root-disk-leak-in-live-mig.patch | 122 --------------------
...e-the-image-name-when-booting-from-volume.patch | 89 ++++++++++++++
openstack-nova.spec | 16 ++-
sources | 2 +-
8 files changed, 161 insertions(+), 134 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index ed17629..eac39a8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,3 +23,4 @@
/nova-2013.2.tar.gz
/nova-2014.1.b1.tar.gz
/nova-2014.1.b2.tar.gz
+/nova-2014.1.b3.tar.gz
diff --git a/0001-Ensure-we-don-t-access-the-net-when-building-docs.patch b/0001-Ensure-we-don-t-access-the-net-when-building-docs.patch
index bfdafc7..5311f13 100644
--- a/0001-Ensure-we-don-t-access-the-net-when-building-docs.patch
+++ b/0001-Ensure-we-don-t-access-the-net-when-building-docs.patch
@@ -1,4 +1,4 @@
-From 69140200f5ea80d24ff027712247b33f33a32f6a Mon Sep 17 00:00:00 2001
+From 667de3a297d8d8dae9a5d7fa527db514271fa715 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <pbrady at redhat.com>
Date: Fri, 6 Jan 2012 12:16:34 +0000
Subject: [PATCH] Ensure we don't access the net when building docs
@@ -11,7 +11,7 @@ Change-Id: I9d02fb4053a8106672aded1614a2850e21603eb2
1 file changed, 1 deletion(-)
diff --git a/doc/source/conf.py b/doc/source/conf.py
-index 95126b6..43e972e 100644
+index 0ae450f..4735fcb 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -28,7 +28,6 @@ sys.path.insert(0, os.path.abspath('./'))
diff --git a/0002-remove-runtime-dep-on-python-pbr.patch b/0002-remove-runtime-dep-on-python-pbr.patch
index 277cfb6..9e65908 100644
--- a/0002-remove-runtime-dep-on-python-pbr.patch
+++ b/0002-remove-runtime-dep-on-python-pbr.patch
@@ -1,4 +1,4 @@
-From 63b7da8dd0d457f7fdd9ac7c907ea65f4ea0d627 Mon Sep 17 00:00:00 2001
+From cd413310772f75f777e69b5bb113eb4f3f50302b Mon Sep 17 00:00:00 2001
From: Nikola Dipanov <ndipanov at redhat.com>
Date: Fri, 14 Jun 2013 11:29:50 +0200
Subject: [PATCH] remove runtime dep on python-pbr
@@ -9,10 +9,10 @@ Change-Id: I6f247f64c561d49c13e3c2f67401fe150b6d47b6
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/nova/version.py b/nova/version.py
-index 01b6b47..25ea4dc 100644
+index 4d6faa1..a1fbf7a 100644
--- a/nova/version.py
+++ b/nova/version.py
-@@ -14,8 +14,6 @@
+@@ -12,8 +12,6 @@
# License for the specific language governing permissions and limitations
# under the License.
@@ -21,7 +21,7 @@ index 01b6b47..25ea4dc 100644
from nova.openstack.common.gettextutils import _
NOVA_VENDOR = "OpenStack Foundation"
-@@ -23,7 +21,20 @@ NOVA_PRODUCT = "OpenStack Nova"
+@@ -21,7 +19,20 @@ NOVA_PRODUCT = "OpenStack Nova"
NOVA_PACKAGE = None # OS distro package version suffix
loaded = False
diff --git a/0003-Revert-Replace-oslo.sphinx-with-oslosphinx.patch b/0003-Revert-Replace-oslo.sphinx-with-oslosphinx.patch
new file mode 100644
index 0000000..1d2c4b4
--- /dev/null
+++ b/0003-Revert-Replace-oslo.sphinx-with-oslosphinx.patch
@@ -0,0 +1,53 @@
+From 3402a85dd5dd07785631ad39a039a88f52dc634c Mon Sep 17 00:00:00 2001
+From: Vladan Popovic <vpopovic at redhat.com>
+Date: Fri, 7 Mar 2014 15:00:16 +0100
+Subject: [PATCH] Revert "Replace oslo.sphinx with oslosphinx"
+
+This reverts commit c926216a9bd64d5cdd9731bd34e03613940d32e9.
+
+Conflicts:
+ test-requirements.txt
+---
+ doc/README.rst | 2 +-
+ doc/source/conf.py | 2 +-
+ test-requirements.txt | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/doc/README.rst b/doc/README.rst
+index dbaaa40..92db83b 100644
+--- a/doc/README.rst
++++ b/doc/README.rst
+@@ -12,7 +12,7 @@ environment, such as the virtualenv created by ``run_tests.sh`` or
+ ``tools/install_venv.py``. A leaner but sufficient environment can be
+ created by starting with one that is suitable for running Nova (such
+ as the one created by DevStack) and then using pip to install
+-oslosphinx.
++oslo.sphinx.
+
+ Building the docs
+ -----------------
+diff --git a/doc/source/conf.py b/doc/source/conf.py
+index 4735fcb..43e972e 100644
+--- a/doc/source/conf.py
++++ b/doc/source/conf.py
+@@ -33,7 +33,7 @@ extensions = ['sphinx.ext.autodoc',
+ 'sphinx.ext.pngmath',
+ 'sphinx.ext.ifconfig',
+ 'sphinx.ext.graphviz',
+- 'oslosphinx',
++ 'oslo.sphinx',
+ ]
+
+ todo_include_todos = True
+diff --git a/test-requirements.txt b/test-requirements.txt
+index 8a8079f..e7f644b 100644
+--- a/test-requirements.txt
++++ b/test-requirements.txt
+@@ -10,6 +10,6 @@ psycopg2
+ pylint==0.25.2
+ python-subunit>=0.0.18
+ sphinx>=1.1.2,<1.2
+-oslosphinx
++oslo.sphinx
+ testrepository>=0.0.18
+ testtools>=0.9.34
diff --git a/0004-Ignore-the-image-name-when-booting-from-volume.patch b/0004-Ignore-the-image-name-when-booting-from-volume.patch
new file mode 100644
index 0000000..e2afcea
--- /dev/null
+++ b/0004-Ignore-the-image-name-when-booting-from-volume.patch
@@ -0,0 +1,89 @@
+From 5b59de3b3bf12d702a4928a9e2635f32b9c37a85 Mon Sep 17 00:00:00 2001
+From: Xavier Queralt <xqueralt at redhat.com>
+Date: Mon, 3 Mar 2014 09:37:53 +0100
+Subject: [PATCH] Ignore the image name when booting from volume
+
+In 0185d2445 the _run_instance method was changed to acquire the image
+metadata from the request_spec instead of glance. This was needed to be
+able to get the image_metadata attached to a volume, when booting from
+it. That change didn't consider that the image name key is not inherited
+when creating a volume from an image and introduced a bug when creating
+the usage_info for volume booted instances.
+
+This change fixes this by only attaching the image name to the usage_info
+only when booting from an image and not when booting from a volume.
+
+Related-Bug: 1281973
+Change-Id: I8ec441e7815855a94a28c4566790d5144deff16f
+(cherry picked from commit 43aaf80942a0afb7471e803e57a3db851dab608b)
+---
+ nova/compute/manager.py | 3 ++-
+ nova/tests/compute/test_compute.py | 16 ++++++++++++----
+ 2 files changed, 14 insertions(+), 5 deletions(-)
+
+diff --git a/nova/compute/manager.py b/nova/compute/manager.py
+index 48c9d5d..3c5c6b8 100644
+--- a/nova/compute/manager.py
++++ b/nova/compute/manager.py
+@@ -968,10 +968,11 @@ class ComputeManager(manager.Manager):
+
+ if request_spec and request_spec.get('image'):
+ image_meta = request_spec['image']
+- extra_usage_info = {"image_name": image_meta['name']}
+ else:
+ image_meta = {}
+
++ extra_usage_info = {"image_name": image_meta.get('name', '')}
++
+ notify("start") # notify that build is starting
+
+ instance, network_info = self._build_instance(context,
+diff --git a/nova/tests/compute/test_compute.py b/nova/tests/compute/test_compute.py
+index 6c2ad59..fe734fc 100644
+--- a/nova/tests/compute/test_compute.py
++++ b/nova/tests/compute/test_compute.py
+@@ -3213,25 +3213,24 @@ class ComputeTestCase(BaseTestCase):
+ self.compute.terminate_instance(self.context,
+ self._objectify(instance), [], [])
+
+- def test_run_instance_usage_notification(self):
++ def test_run_instance_usage_notification(self, request_spec={}):
+ # Ensure run instance generates appropriate usage notification.
+ instance = jsonutils.to_primitive(self._create_fake_instance())
+ instance_uuid = instance['uuid']
+- request_spec = {'image': {'name': 'fake_name'}}
++ expected_image_name = request_spec.get('image', {}).get('name', '')
+ self.compute.run_instance(self.context, instance, request_spec,
+ {}, [], None, None, True, None, False)
+ self.assertEqual(len(fake_notifier.NOTIFICATIONS), 2)
+ inst_ref = db.instance_get_by_uuid(self.context, instance_uuid)
+ msg = fake_notifier.NOTIFICATIONS[0]
+ self.assertEqual(msg.event_type, 'compute.instance.create.start')
+- self.assertEqual(msg.payload['image_name'], 'fake_name')
+ # The last event is the one with the sugar in it.
+ msg = fake_notifier.NOTIFICATIONS[1]
+ self.assertEqual(msg.priority, 'INFO')
+ self.assertEqual(msg.event_type, 'compute.instance.create.end')
+ payload = msg.payload
+ self.assertEqual(payload['tenant_id'], self.project_id)
+- self.assertEqual(payload['image_name'], 'fake_name')
++ self.assertEqual(expected_image_name, payload['image_name'])
+ self.assertEqual(payload['user_id'], self.user_id)
+ self.assertEqual(payload['instance_id'], inst_ref['uuid'])
+ self.assertEqual(payload['instance_type'], 'm1.tiny')
+@@ -3251,6 +3250,15 @@ class ComputeTestCase(BaseTestCase):
+ self.compute.terminate_instance(self.context,
+ self._objectify(inst_ref), [], [])
+
++ def test_run_instance_image_usage_notification(self):
++ request_spec = {'image': {'name': 'fake_name', 'key': 'value'}}
++ self.test_run_instance_usage_notification(request_spec=request_spec)
++
++ def test_run_instance_usage_notification_volume_meta(self):
++ # Volume's image metadata won't contain the image name
++ request_spec = {'image': {'key': 'value'}}
++ self.test_run_instance_usage_notification(request_spec=request_spec)
++
+ def test_run_instance_end_notification_on_abort(self):
+ # Test that an end notif is sent if the build is aborted
+ instance = jsonutils.to_primitive(self._create_fake_instance())
diff --git a/openstack-nova.spec b/openstack-nova.spec
index 48f2f1f..455a8b5 100644
--- a/openstack-nova.spec
+++ b/openstack-nova.spec
@@ -2,13 +2,13 @@
Name: openstack-nova
Version: 2014.1
-Release: 0.11.b2%{?dist}
+Release: 0.12.b3%{?dist}
Summary: OpenStack Compute (nova)
Group: Applications/System
License: ASL 2.0
URL: http://openstack.org/projects/compute/
-Source0: https://launchpad.net/nova/icehouse/icehouse-2/+download/nova-%{version}.b2.tar.gz
+Source0: https://launchpad.net/nova/icehouse/icehouse-3/+download/nova-%{version}.b3.tar.gz
Source1: nova-dist.conf
Source6: nova.logrotate
@@ -35,11 +35,12 @@ Source24: nova-sudoers
Source30: openstack-nova-novncproxy.sysconfig
#
-# patches_base=2014.1.b2
+# patches_base=2014.1.b3
#
Patch0001: 0001-Ensure-we-don-t-access-the-net-when-building-docs.patch
Patch0002: 0002-remove-runtime-dep-on-python-pbr.patch
-Patch0003: 0003-libvirt-Fix-root-disk-leak-in-live-mig.patch
+Patch0003: 0003-Revert-Replace-oslo.sphinx-with-oslosphinx.patch
+Patch0004: 0004-Ignore-the-image-name-when-booting-from-volume.patch
BuildArch: noarch
BuildRequires: intltool
@@ -80,6 +81,7 @@ Group: Applications/System
Requires: python-nova = %{version}-%{release}
Requires: python-keystoneclient
Requires: python-oslo-rootwrap
+Requires: python-oslo-messaging
Requires(post): systemd-units
Requires(preun): systemd-units
@@ -392,11 +394,12 @@ This package contains documentation files for nova.
%endif
%prep
-%setup -q -n nova-%{version}.b2
+%setup -q -n nova-%{version}.b3
%patch0001 -p1
%patch0002 -p1
%patch0003 -p1
+%patch0004 -p1
find . \( -name .gitignore -o -name .placeholder \) -delete
@@ -868,6 +871,9 @@ fi
%endif
%changelog
+* Fri Mar 07 2014 Vladan Popovic <vpopovic at redhat.com> - 2014.1-0.12.b3
+- Update to Icehouse milestone 3
+
* Mon Feb 03 2014 Pádraig Brady <pbrady at redhat.com> - 2014.1-0.11.b2
- Avoid commented [DEFAULT] config issue in nova.conf
diff --git a/sources b/sources
index 9fc70ac..c504768 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-fe9de293724bede1613f57283c70e65b nova-2014.1.b2.tar.gz
+487c8d4634237b0e623e3bc0c0e85cad nova-2014.1.b3.tar.gz
More information about the scm-commits
mailing list