[openstack-nova/f16] Update to Diablo final
Mark McLoughlin
markmc at fedoraproject.org
Thu Sep 22 14:32:42 UTC 2011
commit 224a8a897e8ed3d21017447557284302afa92a27
Author: Mark McLoughlin <markmc at redhat.com>
Date: Thu Sep 22 15:31:32 2011 +0100
Update to Diablo final
Also, drop some upstreamed patches and update the metadata-accept patch
to what's proposed for essex.
Finally, switch rpc impl from carrot to kombu.
.gitignore | 1 +
nova-add-filter-rules-for-dnsmasq-dhcp.patch | 51 -----
...nput-chain-rule-for-ec2-metadata-requests.patch | 38 ----
...uire-bridge_interface-for-flatdhcpmanager.patch | 28 ---
nova-fix-flavorid-migration-failure.patch | 51 -----
nova-fix-quotas-migration-failure.patch | 84 --------
nova-iscsi-choice.patch | 36 ++--
nova-metadata-accept.patch | 202 ++++++++++++++++++++
openstack-nova.spec | 24 +--
sources | 2 +-
10 files changed, 233 insertions(+), 284 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 9c1b658..d161afe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/nova-2011.3~d4.tar.gz
+/nova-2011.3.tar.gz
diff --git a/nova-iscsi-choice.patch b/nova-iscsi-choice.patch
index 81e6b38..2390fa9 100644
--- a/nova-iscsi-choice.patch
+++ b/nova-iscsi-choice.patch
@@ -3,8 +3,8 @@ Backported from:
https://code.launchpad.net/~markmc/nova/iscsi-tgtadm-choice/+merge/75906
diff -up nova-2011.3/nova/tests/test_iscsi.py.iscsi-choice nova-2011.3/nova/tests/test_iscsi.py
---- nova-2011.3/nova/tests/test_iscsi.py.iscsi-choice 2011-09-18 16:18:31.460605846 +0100
-+++ nova-2011.3/nova/tests/test_iscsi.py 2011-09-18 16:18:31.460605846 +0100
+--- nova-2011.3/nova/tests/test_iscsi.py.iscsi-choice 2011-09-22 14:34:41.670487277 +0100
++++ nova-2011.3/nova/tests/test_iscsi.py 2011-09-22 14:34:41.670487277 +0100
@@ -0,0 +1,116 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
@@ -123,8 +123,8 @@ diff -up nova-2011.3/nova/tests/test_iscsi.py.iscsi-choice nova-2011.3/nova/test
+ietadm --op delete --tid=%(tid)s
+"""
diff -up nova-2011.3/nova/tests/test_volume.py.iscsi-choice nova-2011.3/nova/tests/test_volume.py
---- nova-2011.3/nova/tests/test_volume.py.iscsi-choice 2011-09-18 16:18:09.762267246 +0100
-+++ nova-2011.3/nova/tests/test_volume.py 2011-09-18 16:18:31.462605870 +0100
+--- nova-2011.3/nova/tests/test_volume.py.iscsi-choice 2011-09-22 14:33:36.800718837 +0100
++++ nova-2011.3/nova/tests/test_volume.py 2011-09-22 14:34:41.670487277 +0100
@@ -270,8 +270,7 @@ class DriverTestCase(test.TestCase):
def _fake_execute(_command, *_args, **_kwargs):
"""Fake _execute."""
@@ -166,17 +166,17 @@ diff -up nova-2011.3/nova/tests/test_volume.py.iscsi-choice nova-2011.3/nova/tes
self.mox.ReplayAll()
self.assertRaises(exception.ProcessExecutionError,
diff -up nova-2011.3/nova/volume/driver.py.iscsi-choice nova-2011.3/nova/volume/driver.py
---- nova-2011.3/nova/volume/driver.py.iscsi-choice 2011-09-18 16:18:09.457262484 +0100
-+++ nova-2011.3/nova/volume/driver.py 2011-09-18 16:18:31.464605905 +0100
-@@ -27,6 +27,7 @@ from nova import exception
+--- nova-2011.3/nova/volume/driver.py.iscsi-choice 2011-09-22 14:33:36.711717783 +0100
++++ nova-2011.3/nova/volume/driver.py 2011-09-22 14:35:05.636771241 +0100
+@@ -28,6 +28,7 @@ from nova import exception
from nova import flags
from nova import log as logging
from nova import utils
+from nova.volume import iscsi
+ from nova.volume import volume_types
- LOG = logging.getLogger("nova.volume.driver")
-@@ -58,12 +59,13 @@ flags.DEFINE_string('rbd_pool', 'rbd',
+@@ -60,12 +61,13 @@ flags.DEFINE_string('rbd_pool', 'rbd',
class VolumeDriver(object):
"""Executes commands relating to Volumes."""
@@ -193,7 +193,7 @@ diff -up nova-2011.3/nova/volume/driver.py.iscsi-choice nova-2011.3/nova/volume/
def _try_execute(self, *command, **kwargs):
# NOTE(vish): Volume commands can partially fail due to timing, but
-@@ -314,7 +316,6 @@ class FakeAOEDriver(AOEDriver):
+@@ -328,7 +330,6 @@ class FakeAOEDriver(AOEDriver):
def __init__(self, *args, **kwargs):
super(FakeAOEDriver, self).__init__(execute=self.fake_execute,
@@ -201,7 +201,7 @@ diff -up nova-2011.3/nova/volume/driver.py.iscsi-choice nova-2011.3/nova/volume/
*args, **kwargs)
def check_for_setup_error(self):
-@@ -342,6 +343,14 @@ class ISCSIDriver(VolumeDriver):
+@@ -356,6 +357,14 @@ class ISCSIDriver(VolumeDriver):
`CHAP` is the only auth_method in use at the moment.
"""
@@ -216,7 +216,7 @@ diff -up nova-2011.3/nova/volume/driver.py.iscsi-choice nova-2011.3/nova/volume/
def ensure_export(self, context, volume):
"""Synchronously recreates an export for a logical volume."""
try:
-@@ -354,19 +363,10 @@ class ISCSIDriver(VolumeDriver):
+@@ -368,19 +377,10 @@ class ISCSIDriver(VolumeDriver):
iscsi_name = "%s%s" % (FLAGS.iscsi_target_prefix, volume['name'])
volume_path = "/dev/%s/%s" % (FLAGS.volume_group, volume['name'])
@@ -240,7 +240,7 @@ diff -up nova-2011.3/nova/volume/driver.py.iscsi-choice nova-2011.3/nova/volume/
def _ensure_iscsi_targets(self, context, host):
"""Ensure that target ids have been created in datastore."""
-@@ -386,13 +386,9 @@ class ISCSIDriver(VolumeDriver):
+@@ -400,13 +400,9 @@ class ISCSIDriver(VolumeDriver):
volume['host'])
iscsi_name = "%s%s" % (FLAGS.iscsi_target_prefix, volume['name'])
volume_path = "/dev/%s/%s" % (FLAGS.volume_group, volume['name'])
@@ -257,7 +257,7 @@ diff -up nova-2011.3/nova/volume/driver.py.iscsi-choice nova-2011.3/nova/volume/
def remove_export(self, context, volume):
"""Removes an export for a logical volume."""
-@@ -407,18 +403,14 @@ class ISCSIDriver(VolumeDriver):
+@@ -421,18 +417,14 @@ class ISCSIDriver(VolumeDriver):
try:
# ietadm show will exit with an error
# this export has already been removed
@@ -279,7 +279,7 @@ diff -up nova-2011.3/nova/volume/driver.py.iscsi-choice nova-2011.3/nova/volume/
def _do_iscsi_discovery(self, volume):
#TODO(justinsb): Deprecate discovery and use stored info
-@@ -569,8 +561,7 @@ class ISCSIDriver(VolumeDriver):
+@@ -583,8 +575,7 @@ class ISCSIDriver(VolumeDriver):
tid = self.db.volume_get_iscsi_target_num(context, volume_id)
try:
@@ -289,7 +289,7 @@ diff -up nova-2011.3/nova/volume/driver.py.iscsi-choice nova-2011.3/nova/volume/
except exception.ProcessExecutionError, e:
# Instances remount read-only in this case.
# /etc/init.d/iscsitarget restart and rebooting nova-volume
-@@ -584,7 +575,6 @@ class FakeISCSIDriver(ISCSIDriver):
+@@ -598,7 +589,6 @@ class FakeISCSIDriver(ISCSIDriver):
"""Logs calls instead of executing."""
def __init__(self, *args, **kwargs):
super(FakeISCSIDriver, self).__init__(execute=self.fake_execute,
@@ -298,8 +298,8 @@ diff -up nova-2011.3/nova/volume/driver.py.iscsi-choice nova-2011.3/nova/volume/
def check_for_setup_error(self):
diff -up nova-2011.3/nova/volume/iscsi.py.iscsi-choice nova-2011.3/nova/volume/iscsi.py
---- nova-2011.3/nova/volume/iscsi.py.iscsi-choice 2011-09-18 16:18:31.465605922 +0100
-+++ nova-2011.3/nova/volume/iscsi.py 2011-09-18 16:18:31.466605939 +0100
+--- nova-2011.3/nova/volume/iscsi.py.iscsi-choice 2011-09-22 14:34:41.672487301 +0100
++++ nova-2011.3/nova/volume/iscsi.py 2011-09-22 14:34:41.672487301 +0100
@@ -0,0 +1,156 @@
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
diff --git a/nova-metadata-accept.patch b/nova-metadata-accept.patch
new file mode 100644
index 0000000..ac8f11f
--- /dev/null
+++ b/nova-metadata-accept.patch
@@ -0,0 +1,202 @@
+------------------------------------------------------------
+revno: 1530
+committer: Mark McLoughlin <markmc at redhat.com>
+branch nick: metadata-accept-rule
+timestamp: Sat 2011-09-17 08:02:26 +0100
+message:
+ Fix pep8 issue
+------------------------------------------------------------
+revno: 1529
+committer: Mark McLoughlin <markmc at redhat.com>
+branch nick: metadata-accept-rule
+timestamp: Sat 2011-09-17 07:39:40 +0100
+message:
+ Allow EC2 manager host param be set to default FLAGS.host
+------------------------------------------------------------
+revno: 1528
+committer: Mark McLoughlin <markmc at redhat.com>
+branch nick: metadata-accept-rule
+timestamp: Thu 2011-09-08 14:29:49 +0100
+message:
+ Have nova-api add the INPUT rule for EC2 metadata
+
+ It makes no sense to have nova-network add an iptables rule for the EC2
+ metadata service, since they may not actually be on the same host.
+
+ Instead, nova-api should add it directly. In order to do that, we add a
+ manager class for API services and allow the EC2 manager use the network
+ driver to add the rule.
+------------------------------------------------------------
+revno: 1527
+committer: Mark McLoughlin <markmc at redhat.com>
+branch nick: metadata-accept-rule
+timestamp: Mon 2011-09-05 07:10:52 +0100
+message:
+ Add INPUT chain rule for EC2 metadata requests
+
+ On Fedora, the default policy for the INPUT chain in the filter table
+ is DROP. This means that EC2 metadata requests from guests get dropped.
+
+ Add this rule to let it through:
+
+ $> sudo iptables -t filter -A nova-network-INPUT \
+ -s 0.0.0.0/0 -d $ec2_dmz_host \
+ -m tcp -p tcp --dport $ec2_port -j ACCEPT
+
+ However, this only works if nova-network and nova-api are on the same
+ host.
+
+diff -up nova-2011.3/nova/api/manager.py.metadata-accept nova-2011.3/nova/api/manager.py
+--- nova-2011.3/nova/api/manager.py.metadata-accept 2011-09-22 14:31:26.214172661 +0100
++++ nova-2011.3/nova/api/manager.py 2011-09-22 14:31:26.214172661 +0100
+@@ -0,0 +1,42 @@
++# vim: tabstop=4 shiftwidth=4 softtabstop=4
++
++# Copyright 2010 United States Government as represented by the
++# Administrator of the National Aeronautics and Space Administration.
++# All Rights Reserved.
++#
++# Licensed under the Apache License, Version 2.0 (the "License"); you may
++# not use this file except in compliance with the License. You may obtain
++# a copy of the License at
++#
++# http://www.apache.org/licenses/LICENSE-2.0
++#
++# Unless required by applicable law or agreed to in writing, software
++# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
++# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
++# License for the specific language governing permissions and limitations
++# under the License.
++
++from nova import flags
++from nova import manager
++from nova import utils
++
++FLAGS = flags.FLAGS
++
++
++class EC2Manager(manager.Manager):
++ """EC2 API manager.
++
++ This class manages the EC2 API service initialization. Currently, it
++ just adds an iptables filter rule for the metadata service.
++ """
++ def __init__(self, *args, **kwargs):
++ super(EC2Manager, self).__init__(*args, **kwargs)
++ self.network_driver = utils.import_object(FLAGS.network_driver)
++
++ def init_host(self):
++ """Perform any initialization.
++
++ Currently, we only add an iptables filter rule for the metadta
++ service.
++ """
++ self.network_driver.metadata_accept()
+diff -up nova-2011.3/nova/flags.py.metadata-accept nova-2011.3/nova/flags.py
+--- nova-2011.3/nova/flags.py.metadata-accept 2011-09-22 13:02:23.000000000 +0100
++++ nova-2011.3/nova/flags.py 2011-09-22 14:31:26.214172661 +0100
+@@ -419,6 +419,9 @@ DEFINE_bool('resume_guests_state_on_host
+ DEFINE_string('root_helper', 'sudo',
+ 'Command prefix to use for running commands as root')
+
++DEFINE_string('network_driver', 'nova.network.linux_net',
++ 'Driver to use for network creation')
++
+ DEFINE_bool('use_ipv6', False, 'use ipv6')
+
+ DEFINE_bool('monkey_patch', False,
+diff -up nova-2011.3/nova/network/linux_net.py.metadata-accept nova-2011.3/nova/network/linux_net.py
+--- nova-2011.3/nova/network/linux_net.py.metadata-accept 2011-09-22 14:25:29.747957265 +0100
++++ nova-2011.3/nova/network/linux_net.py 2011-09-22 14:31:26.215172672 +0100
+@@ -388,6 +388,17 @@ def metadata_forward():
+ iptables_manager.apply()
+
+
++def metadata_accept():
++ """Create the filter accept rule for metadata."""
++ iptables_manager.ipv4['filter'].add_rule('INPUT',
++ '-s 0.0.0.0/0 -d %s '
++ '-p tcp -m tcp --dport %s '
++ '-j ACCEPT' % \
++ (FLAGS.ec2_dmz_host,
++ FLAGS.ec2_port))
++ iptables_manager.apply()
++
++
+ def init_host():
+ """Basic networking setup goes here."""
+ # NOTE(devcamcar): Cloud public SNAT entries and the default
+diff -up nova-2011.3/nova/network/manager.py.metadata-accept nova-2011.3/nova/network/manager.py
+--- nova-2011.3/nova/network/manager.py.metadata-accept 2011-09-22 13:02:23.000000000 +0100
++++ nova-2011.3/nova/network/manager.py 2011-09-22 14:31:26.216172684 +0100
+@@ -96,8 +96,6 @@ flags.DEFINE_string('fixed_range_v6', 'f
+ flags.DEFINE_string('gateway_v6', None, 'Default IPv6 gateway')
+ flags.DEFINE_integer('cnt_vpn_clients', 0,
+ 'Number of addresses reserved for vpn clients')
+-flags.DEFINE_string('network_driver', 'nova.network.linux_net',
+- 'Driver to use for network creation')
+ flags.DEFINE_bool('update_dhcp_on_disassociate', False,
+ 'Whether to update dhcp when fixed_ip is disassociated')
+ flags.DEFINE_integer('fixed_ip_disassociate_timeout', 600,
+diff -up nova-2011.3/nova/service.py.metadata-accept nova-2011.3/nova/service.py
+--- nova-2011.3/nova/service.py.metadata-accept 2011-09-22 13:02:23.000000000 +0100
++++ nova-2011.3/nova/service.py 2011-09-22 14:31:26.217172696 +0100
+@@ -45,9 +45,13 @@ flags.DEFINE_integer('report_interval',
+ flags.DEFINE_integer('periodic_interval', 60,
+ 'seconds between running periodic tasks',
+ lower_bound=1)
++flags.DEFINE_string('ec2_manager', 'nova.api.manager.EC2Manager',
++ 'EC2 API service manager')
+ flags.DEFINE_string('ec2_listen', "0.0.0.0",
+ 'IP address for EC2 API to listen')
+ flags.DEFINE_integer('ec2_listen_port', 8773, 'port for ec2 api to listen')
++flags.DEFINE_string('osapi_manager', None,
++ 'OpenStack API service manager')
+ flags.DEFINE_string('osapi_listen', "0.0.0.0",
+ 'IP address for OpenStack API to listen')
+ flags.DEFINE_integer('osapi_listen_port', 8774, 'port for os api to listen')
+@@ -290,6 +294,7 @@ class WSGIService(object):
+
+ """
+ self.name = name
++ self.manager = self._get_manager()
+ self.loader = loader or wsgi.Loader()
+ self.app = self.loader.load_app(name)
+ self.host = getattr(FLAGS, '%s_listen' % name, "0.0.0.0")
+@@ -299,6 +304,27 @@ class WSGIService(object):
+ host=self.host,
+ port=self.port)
+
++ def _get_manager(self):
++ """Initialize a Manager object appropriate for this service.
++
++ Use the service name to look up a Manager subclass from the
++ configuration and initialize an instance. If no class name
++ is configured, just return None.
++
++ :returns: a Manager instance, or None.
++
++ """
++ fl = '%s_manager' % self.name
++ if not fl in FLAGS:
++ return None
++
++ manager_class_name = FLAGS.get(fl, None)
++ if not manager_class_name:
++ return None
++
++ manager_class = utils.import_class(manager_class_name)
++ return manager_class()
++
+ def start(self):
+ """Start serving this service using loaded configuration.
+
+@@ -308,6 +334,8 @@ class WSGIService(object):
+ :returns: None
+
+ """
++ if self.manager:
++ self.manager.init_host()
+ self.server.start()
+ self.port = self.server.port
+
diff --git a/openstack-nova.spec b/openstack-nova.spec
index ce6f2c7..7171ac7 100644
--- a/openstack-nova.spec
+++ b/openstack-nova.spec
@@ -4,13 +4,13 @@
Name: openstack-nova
Version: 2011.3
-Release: 0.10.%{milestone}%{?dist}
+Release: 1%{?dist}
Summary: OpenStack Compute (nova)
Group: Applications/System
License: ASL 2.0
URL: http://openstack.org/projects/compute/
-Source0: http://launchpad.net/nova/diablo/diablo-4/+download/nova-%{version}~%{milestone}.tar.gz
+Source0: http://launchpad.net/nova/diablo/2011.3/+download/nova-%{version}.tar.gz
Source1: nova.conf
Source6: nova.logrotate
@@ -28,12 +28,8 @@ Source20: nova-sudoers
Source21: nova-polkit.pkla
Source22: nova-ifc-template
-Patch1: nova-fix-flavorid-migration-failure.patch
-Patch2: nova-fix-quotas-migration-failure.patch
-Patch3: nova-do-not-require-bridge_interface-for-flatdhcpmanager.patch
-Patch4: nova-add-filter-rules-for-dnsmasq-dhcp.patch
-Patch5: nova-add-input-chain-rule-for-ec2-metadata-requests.patch
-Patch6: nova-iscsi-choice.patch
+Patch1: nova-metadata-accept.patch
+Patch2: nova-iscsi-choice.patch
BuildArch: noarch
BuildRequires: intltool
@@ -86,7 +82,7 @@ Requires: libvirt-python
Requires: python-anyjson
Requires: python-IPy
Requires: python-boto
-Requires: python-carrot
+Requires: python-kombu
Requires: python-daemon
Requires: python-eventlet
Requires: python-greenlet
@@ -162,10 +158,6 @@ This package contains documentation files for nova.
%patch1 -p1
%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
-%patch6 -p1
find . \( -name .gitignore -o -name .placeholder \) -delete
@@ -353,6 +345,12 @@ fi
%endif
%changelog
+* Thu Sep 22 2011 Mark McLoughlin <markmc at redhat.com> - 2011.3-1
+- Update to Diablo final.
+- Drop some upstreamed patches.
+- Update the metadata-accept patch to what's proposed for essex.
+- Switch rpc impl from carrot to kombu.
+
* Mon Sep 19 2011 Mark McLoughlin <markmc at redhat.com> - 2011.3-0.10.d4
- Use tgtadm instead of ietadm (#737046)
diff --git a/sources b/sources
index 7d2aa28..41616db 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-2692151988dbb76d1d54f3d63152e0ba nova-2011.3~d4.tar.gz
+fb2abcf1f7b8e4b8bf2416976f23b776 nova-2011.3.tar.gz
More information about the scm-commits
mailing list