[openstack-nova/f17] Updated to latest stable essex

Pádraig Brady pbrady at fedoraproject.org
Fri Jun 15 19:51:01 UTC 2012


commit 66320f7f52424e016fd311c413ac6af20e9f0740
Author: Pádraig Brady <P at draigBrady.com>
Date:   Fri Jun 15 20:40:21 2012 +0100

    Updated to latest stable essex
    
    Includes stability and performance fixes

 ...034-Quantum-Network-Manager-not-clearing-.patch |   83 ++++++++++
 ...ti_Scheduler-to-process-host-capabilities.patch |    0
 ...xenapi-driver-intermittently-fail-to-deta.patch |  128 +++++++++++++++
 ...irt-get_console_output-tests-pty-and-file.patch |    0
 ...memory-correctly-on-Xen.-Fixes-bug-997014.patch |    0
 ...rotocol-case-handling-for-security-groups.patch |    0
 ...1006664-describe-non-existent-ec2-keypair.patch |   44 +++++
 ...e-a-utf8-version-of-the-dns_domains-table.patch |    2 +-
 ...-Only-invoke-.lower-on-non-None-protocols.patch |    2 +-
 ...nts-resume_state_on_host_boot-for-libvirt.patch |  118 ++++++++++++++
 0038-Add-caching-to-openstack.common.cfg.patch     |  166 ++++++++++++++++++++
 ...nsmasq-accept-rules-are-preset-at-startup.patch |   32 ++++
 0041-Add-missing-ack-to-impl_qpid.patch            |   69 ++++++++
 0042-Updates-the-cache.patch                       |   68 ++++++++
 ... 0043-Don-t-query-nova-network-on-startup.patch |   22 ++--
 ...tomic-manipulation-of-libvirt-disk-images.patch |   12 +-
 ...e-don-t-access-the-net-when-building-docs.patch |    2 +-
 ...0046-fix-useexisting-deprecation-warnings.patch |    2 +-
 ...-configurable-libvirt-injection-partition.patch |    6 +-
 0048-repeat-fusermount-to-avoid-business.patch     |   23 +++
 openstack-nova.spec                                |   43 ++++--
 21 files changed, 787 insertions(+), 35 deletions(-)
---
diff --git a/0028-Fix-bug-988034-Quantum-Network-Manager-not-clearing-.patch b/0028-Fix-bug-988034-Quantum-Network-Manager-not-clearing-.patch
new file mode 100644
index 0000000..3bcab70
--- /dev/null
+++ b/0028-Fix-bug-988034-Quantum-Network-Manager-not-clearing-.patch
@@ -0,0 +1,83 @@
+From 3426030d3524e4e38c5843be0b9515805b67b04f Mon Sep 17 00:00:00 2001
+From: Somik Behera <somikbehera at gmail.com>
+Date: Mon, 30 Apr 2012 17:43:14 -0700
+Subject: [PATCH] Fix bug 988034 - Quantum Network Manager - not clearing ips
+
+Added a line in nova_ipam_lib.QuantumNovaIPAMLib init
+method to ensure we clean up IPs and explanation of whats
+going on.
+
+Also, nuked release_fixed_ip as that is not
+needed in QuantumManager anymore.
+
+Change-Id: I3971b4d4c464ce68ba9370c9f5d8ca7840e0a72a
+---
+ Authors                               |    1 +
+ nova/network/quantum/manager.py       |    8 --------
+ nova/network/quantum/nova_ipam_lib.py |   15 +++++++++++++++
+ 3 files changed, 16 insertions(+), 8 deletions(-)
+
+diff --git a/Authors b/Authors
+index b9ad28b..d6d12fa 100644
+--- a/Authors
++++ b/Authors
+@@ -172,6 +172,7 @@ Salvatore Orlando <salvatore.orlando at eu.citrix.com>
+ Sandy Walsh <sandy.walsh at rackspace.com>
+ Sateesh Chodapuneedi <sateesh.chodapuneedi at citrix.com>
+ Scott Moser <smoser at ubuntu.com>
++Somik Behera <somikbehera at gmail.com>
+ Soren Hansen <soren.hansen at rackspace.com>
+ Stanislaw Pitucha <stanislaw.pitucha at hp.com>
+ Stephanie Reese <reese.sm at gmail.com>
+diff --git a/nova/network/quantum/manager.py b/nova/network/quantum/manager.py
+index 498b5f0..1fd949a 100644
+--- a/nova/network/quantum/manager.py
++++ b/nova/network/quantum/manager.py
+@@ -668,14 +668,6 @@ class QuantumManager(manager.FloatingIP, manager.FlatManager):
+             if not (is_tenant_net or is_provider_net):
+                 raise exception.NetworkNotFound(network_id=net_id)
+ 
+-    # NOTE(bgh): deallocate_for_instance will take care of this..  The reason
+-    # we're providing this is so that NetworkManager::release_fixed_ip() isn't
+-    # called.  It does some database operations that we don't want to happen
+-    # and since the majority of the stuff that it does is already taken care
+-    # of in our deallocate_for_instance call we don't need to do anything.
+-    def release_fixed_ip(self, context, address):
+-        pass
+-
+     def get_dhcp_hosts_text(self, context, subnet_id, project_id=None):
+         ips = self.ipam.get_allocated_ips(context, subnet_id, project_id)
+         hosts_text = ""
+diff --git a/nova/network/quantum/nova_ipam_lib.py b/nova/network/quantum/nova_ipam_lib.py
+index b594913..7b138b8 100644
+--- a/nova/network/quantum/nova_ipam_lib.py
++++ b/nova/network/quantum/nova_ipam_lib.py
+@@ -47,6 +47,10 @@ class QuantumNovaIPAMLib(object):
+         """
+         self.net_manager = net_manager
+ 
++        # NOTE(s0mik) : If DHCP is not in use, we need to timeout IPs
++        # periodically.  See comment in deallocate_ips_by_vif for more
++        self.net_manager.timeout_fixed_ips = not self.net_manager.DHCP
++
+     def create_subnet(self, context, label, tenant_id,
+                       quantum_net_id, priority, cidr=None,
+                       gateway=None, gateway_v6=None, cidr_v6=None,
+@@ -213,6 +217,17 @@ class QuantumNovaIPAMLib(object):
+         admin_context = context.elevated()
+         fixed_ips = db.fixed_ips_by_virtual_interface(admin_context,
+                                                          vif_ref['id'])
++        # NOTE(s0mik): Sets fixed-ip to deallocated, but leaves the entry
++        # associated with the instance-id.  This prevents us from handing it
++        # out again immediately, as allocating it to a new instance before
++        # a DHCP lease has timed-out is bad.  Instead, the fixed-ip will
++        # be disassociated with the instance-id by a call to one of two
++        # methods inherited from FlatManager:
++        # - if DHCP is in use, a lease expiring in dnsmasq triggers
++        #   a call to release_fixed_ip in the network manager.
++        # - otherwise, _disassociate_stale_fixed_ips is called periodically
++        #   to disassociate all fixed ips that are unallocated
++        #   but still associated with an instance-id.
+         for fixed_ip in fixed_ips:
+             db.fixed_ip_update(admin_context, fixed_ip['address'],
+                                {'allocated': False,
diff --git a/0028-Fix-Multi_Scheduler-to-process-host-capabilities.patch b/0029-Fix-Multi_Scheduler-to-process-host-capabilities.patch
similarity index 100%
rename from 0028-Fix-Multi_Scheduler-to-process-host-capabilities.patch
rename to 0029-Fix-Multi_Scheduler-to-process-host-capabilities.patch
diff --git a/0030-bug-999953-xenapi-driver-intermittently-fail-to-deta.patch b/0030-bug-999953-xenapi-driver-intermittently-fail-to-deta.patch
new file mode 100644
index 0000000..5e5f5a9
--- /dev/null
+++ b/0030-bug-999953-xenapi-driver-intermittently-fail-to-deta.patch
@@ -0,0 +1,128 @@
+From 1a838e2e99a75a7fb245ae9f46c57fc0fc507fd4 Mon Sep 17 00:00:00 2001
+From: Armando Migliaccio <amigliaccio at internap.com>
+Date: Thu, 17 May 2012 18:34:58 +0100
+Subject: [PATCH] bug #999953 xenapi driver intermittently fail to detach vbd
+
+ensure that unplug_vbd raises XenAPI.Failure as required by
+vbd_unplug_with_retry(session, vbd_ref).
+
+Change-Id: If689da4ebc5d9042f26c765afb02ae611967a66b
+---
+ .mailmap                     |    1 +
+ nova/virt/xenapi/vm_utils.py |   71 ++++++++++++++++++++----------------------
+ 2 files changed, 35 insertions(+), 37 deletions(-)
+
+diff --git a/.mailmap b/.mailmap
+index 7fd6cb6..1537739 100644
+diff --git a/nova/virt/xenapi/vm_utils.py b/nova/virt/xenapi/vm_utils.py
+index 4d01510..012b6fb 100644
+--- a/nova/virt/xenapi/vm_utils.py
++++ b/nova/virt/xenapi/vm_utils.py
+@@ -56,10 +56,10 @@ xenapi_vm_utils_opts = [
+                help='Default OS type'),
+     cfg.IntOpt('block_device_creation_timeout',
+                default=10,
+-               help='time to wait for a block device to be created'),
++               help='Time to wait for a block device to be created'),
+     cfg.IntOpt('max_kernel_ramdisk_size',
+                default=16 * 1024 * 1024,
+-               help='maximum size in bytes of kernel or ramdisk images'),
++               help='Maximum size in bytes of kernel or ramdisk images'),
+     cfg.StrOpt('sr_matching_filter',
+                default='other-config:i18n-key=local-storage',
+                help='Filter for finding the SR to be used to install guest '
+@@ -74,7 +74,10 @@ xenapi_vm_utils_opts = [
+                 help='Whether to use sparse_copy for copying data on a '
+                      'resize down (False will use standard dd). This speeds '
+                      'up resizes down considerably since large runs of zeros '
+-                     'won\'t have to be rsynced')
++                     'won\'t have to be rsynced'),
++    cfg.IntOpt('xenapi_num_vbd_unplug_retries',
++               default=10,
++               help='Maximum number of retries to unplug VBD'),
+     ]
+ 
+ FLAGS = flags.FLAGS
+@@ -247,13 +250,33 @@ class VMHelper(xenapi.HelperBase):
+     @classmethod
+     def unplug_vbd(cls, session, vbd_ref):
+         """Unplug VBD from VM"""
+-        try:
+-            vbd_ref = session.call_xenapi('VBD.unplug', vbd_ref)
+-        except cls.XenAPI.Failure, exc:
+-            LOG.exception(exc)
+-            if exc.details[0] != 'DEVICE_ALREADY_DETACHED':
+-                raise volume_utils.StorageError(
+-                        _('Unable to unplug VBD %s') % vbd_ref)
++        # Call VBD.unplug on the given VBD, with a retry if we get
++        # DEVICE_DETACH_REJECTED.  For reasons which we don't understand,
++        # we're seeing the device still in use, even when all processes
++        # using the device should be dead.
++        max_attempts = FLAGS.xenapi_num_vbd_unplug_retries + 1
++        for num_attempt in xrange(1, max_attempts + 1):
++            try:
++                session.call_xenapi('VBD.unplug', vbd_ref)
++                return
++            except cls.XenAPI.Failure, exc:
++                err = len(exc.details) > 0 and exc.details[0]
++                if err == 'DEVICE_ALREADY_DETACHED':
++                    LOG.info(_('VBD %s already detached'), vbd_ref)
++                    return
++                elif err == 'DEVICE_DETACH_REJECTED':
++                    LOG.info(_('VBD %(vbd_ref)s detach rejected, attempt'
++                               ' %(num_attempt)d/%(max_attempts)d'), locals())
++                else:
++                    LOG.exception(exc)
++                    raise volume_utils.StorageError(
++                            _('Unable to unplug VBD %s') % vbd_ref)
++
++            greenthread.sleep(1)
++
++        raise volume_utils.StorageError(
++                _('Reached maximum number of retries trying to unplug VBD %s')
++                % vbd_ref)
+ 
+     @classmethod
+     def destroy_vbd(cls, session, vbd_ref):
+@@ -1477,7 +1500,7 @@ def vdi_attached_here(session, vdi_ref, read_only=False):
+             yield dev
+         finally:
+             LOG.debug(_('Destroying VBD for VDI %s ... '), vdi_ref)
+-            vbd_unplug_with_retry(session, vbd_ref)
++            VMHelper.unplug_vbd(session, vbd_ref)
+     finally:
+         try:
+             VMHelper.destroy_vbd(session, vbd_ref)
+@@ -1487,32 +1510,6 @@ def vdi_attached_here(session, vdi_ref, read_only=False):
+         LOG.debug(_('Destroying VBD for VDI %s done.'), vdi_ref)
+ 
+ 
+-def vbd_unplug_with_retry(session, vbd_ref):
+-    """Call VBD.unplug on the given VBD, with a retry if we get
+-    DEVICE_DETACH_REJECTED.  For reasons which I don't understand, we're
+-    seeing the device still in use, even when all processes using the device
+-    should be dead."""
+-    while True:
+-        try:
+-            VMHelper.unplug_vbd(session, vbd_ref)
+-            LOG.debug(_('VBD.unplug successful first time.'))
+-            return
+-        except VMHelper.XenAPI.Failure, e:
+-            if (len(e.details) > 0 and
+-                e.details[0] == 'DEVICE_DETACH_REJECTED'):
+-                LOG.debug(_('VBD.unplug rejected: retrying...'))
+-                greenthread.sleep(1)
+-                LOG.debug(_('Not sleeping anymore!'))
+-            elif (len(e.details) > 0 and
+-                  e.details[0] == 'DEVICE_ALREADY_DETACHED'):
+-                LOG.debug(_('VBD.unplug successful eventually.'))
+-                return
+-            else:
+-                LOG.error(_('Ignoring XenAPI.Failure in VBD.unplug: %s'),
+-                              e)
+-                return
+-
+-
+ def get_this_vm_uuid():
+     with file('/sys/hypervisor/uuid') as f:
+         return f.readline().strip()
diff --git a/0029-Add-libvirt-get_console_output-tests-pty-and-file.patch b/0031-Add-libvirt-get_console_output-tests-pty-and-file.patch
similarity index 100%
rename from 0029-Add-libvirt-get_console_output-tests-pty-and-file.patch
rename to 0031-Add-libvirt-get_console_output-tests-pty-and-file.patch
diff --git a/0030-Report-memory-correctly-on-Xen.-Fixes-bug-997014.patch b/0032-Report-memory-correctly-on-Xen.-Fixes-bug-997014.patch
similarity index 100%
rename from 0030-Report-memory-correctly-on-Xen.-Fixes-bug-997014.patch
rename to 0032-Report-memory-correctly-on-Xen.-Fixes-bug-997014.patch
diff --git a/0031-Fix-up-protocol-case-handling-for-security-groups.patch b/0033-Fix-up-protocol-case-handling-for-security-groups.patch
similarity index 100%
rename from 0031-Fix-up-protocol-case-handling-for-security-groups.patch
rename to 0033-Fix-up-protocol-case-handling-for-security-groups.patch
diff --git a/0034-Fix-bug-1006664-describe-non-existent-ec2-keypair.patch b/0034-Fix-bug-1006664-describe-non-existent-ec2-keypair.patch
new file mode 100644
index 0000000..264b995
--- /dev/null
+++ b/0034-Fix-bug-1006664-describe-non-existent-ec2-keypair.patch
@@ -0,0 +1,44 @@
+From cc8fd971fcfc61f4d691990d2eaf578b37413af9 Mon Sep 17 00:00:00 2001
+From: Joe Gordon <jogo at cloudscaling.com>
+Date: Wed, 30 May 2012 18:33:24 -0700
+Subject: [PATCH] Fix bug 1006664: describe non existent ec2 keypair
+
+Change-Id: I92bfd6b51aa31abb06e21893174101da31baffd8
+(cherry picked from commit 29baa0ec661c2578ad0aabd138a6b84e5c7a0b40)
+---
+ nova/api/ec2/cloud.py            |    5 +++++
+ nova/tests/api/ec2/test_cloud.py |    5 +++++
+ 2 files changed, 10 insertions(+), 0 deletions(-)
+
+diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py
+index ac445c2..91182e8 100644
+--- a/nova/api/ec2/cloud.py
++++ b/nova/api/ec2/cloud.py
+@@ -357,6 +357,11 @@ class CloudController(object):
+         if not key_name is None:
+             key_pairs = [x for x in key_pairs if x['name'] in key_name]
+ 
++        #If looking for non existent key pair
++        if key_name != None and key_pairs == []:
++            msg = _('Could not find key pair(s): %s') % ','.join(key_name)
++            raise exception.EC2APIError(msg)
++
+         result = []
+         for key_pair in key_pairs:
+             # filter out the vpn keys
+diff --git a/nova/tests/api/ec2/test_cloud.py b/nova/tests/api/ec2/test_cloud.py
+index 427509c..4ed3c04 100644
+--- a/nova/tests/api/ec2/test_cloud.py
++++ b/nova/tests/api/ec2/test_cloud.py
+@@ -1482,6 +1482,11 @@ class CloudTestCase(test.TestCase):
+         self.assertTrue(filter(lambda k: k['keyName'] == 'test1', keys))
+         self.assertTrue(filter(lambda k: k['keyName'] == 'test2', keys))
+ 
++    def test_describe_bad_key_pairs(self):
++        self.assertRaises(exception.EC2APIError,
++            self.cloud.describe_key_pairs, self.context,
++            key_name=['DoesNotExist'])
++
+     def test_import_key_pair(self):
+         pubkey_path = os.path.join(os.path.dirname(__file__), 'public_key')
+         f = open(pubkey_path + '/dummy.pub', 'r')
diff --git a/0037-Create-a-utf8-version-of-the-dns_domains-table.patch b/0035-Create-a-utf8-version-of-the-dns_domains-table.patch
similarity index 98%
rename from 0037-Create-a-utf8-version-of-the-dns_domains-table.patch
rename to 0035-Create-a-utf8-version-of-the-dns_domains-table.patch
index 18614cb..ae971e1 100644
--- a/0037-Create-a-utf8-version-of-the-dns_domains-table.patch
+++ b/0035-Create-a-utf8-version-of-the-dns_domains-table.patch
@@ -1,4 +1,4 @@
-From abc01f2430b592388fe3bb1818f6dd13d8d02b0e Mon Sep 17 00:00:00 2001
+From f0a9f475c5d82493f90debd1082b913511ebacf0 Mon Sep 17 00:00:00 2001
 From: Dan Prince <dprince at redhat.com>
 Date: Fri, 8 Jun 2012 16:59:27 -0400
 Subject: [PATCH] Create a utf8 version of the dns_domains table.
diff --git a/0036-Only-invoke-.lower-on-non-None-protocols.patch b/0036-Only-invoke-.lower-on-non-None-protocols.patch
index 83a92c4..db3a642 100644
--- a/0036-Only-invoke-.lower-on-non-None-protocols.patch
+++ b/0036-Only-invoke-.lower-on-non-None-protocols.patch
@@ -1,4 +1,4 @@
-From b6b82ea423f9aaa2c2791f258122f6b98d66e5e8 Mon Sep 17 00:00:00 2001
+From 3ee026e4252cd4140b50675e857695b195ab5065 Mon Sep 17 00:00:00 2001
 From: Soren Hansen <sorhanse at cisco.com>
 Date: Mon, 11 Jun 2012 09:23:33 +0200
 Subject: [PATCH] Only invoke .lower() on non-None protocols
diff --git a/0037-Implements-resume_state_on_host_boot-for-libvirt.patch b/0037-Implements-resume_state_on_host_boot-for-libvirt.patch
new file mode 100644
index 0000000..f7716cf
--- /dev/null
+++ b/0037-Implements-resume_state_on_host_boot-for-libvirt.patch
@@ -0,0 +1,118 @@
+From 27133eed735c6d5c8015b1bc40d89b55df3a984b Mon Sep 17 00:00:00 2001
+From: Dan Prince <dprince at redhat.com>
+Date: Fri, 1 Jun 2012 10:34:11 -0400
+Subject: [PATCH] Implements resume_state_on_host_boot for libvirt.
+
+Adds a new virt driver function to help resume guest states
+on host boot. This fixes a couple issue with using a reboot
+(like we did previously):
+
+ * Using reboot would clear some task states (VERIFY_RESIZE for example)
+ * Provides a mechanism for hypervisor specific guest restarts.
+   Reboot would not have worked for XenServer for example...
+ * Updates libvirt to use a hard reboot (instead of soft)
+
+Fixes LP Bug #985162.
+
+Change-Id: Iaf5aad75ec9b91f44710a18ddaf3a93378573a62
+(cherry picked from commit 6548c509f1780a7168f26de6f2045ec7d5768520)
+---
+ nova/compute/manager.py         |   10 ++++++++--
+ nova/tests/test_virt_drivers.py |    6 ++++++
+ nova/virt/driver.py             |    4 ++++
+ nova/virt/fake.py               |    3 +++
+ nova/virt/libvirt/connection.py |    7 +++++++
+ 5 files changed, 28 insertions(+), 2 deletions(-)
+
+diff --git a/nova/compute/manager.py b/nova/compute/manager.py
+index 053e80e..ed41874 100644
+--- a/nova/compute/manager.py
++++ b/nova/compute/manager.py
+@@ -246,15 +246,21 @@ class ComputeManager(manager.SchedulerDependentManager):
+             LOG.debug(_('Current state is %(drv_state)s, state in DB is '
+                         '%(db_state)s.'), locals(), instance=instance)
+ 
++            net_info = self._get_instance_nw_info(context, instance)
+             if ((expect_running and FLAGS.resume_guests_state_on_host_boot) or
+                 FLAGS.start_guests_on_host_boot):
+                 LOG.info(_('Rebooting instance after nova-compute restart.'),
+                          locals(), instance=instance)
+-                self.reboot_instance(context, instance['uuid'])
++                try:
++                    self.driver.resume_state_on_host_boot(context, instance,
++                                self._legacy_nw_info(net_info))
++                except NotImplementedError:
++                    LOG.warning(_('Hypervisor driver does not support '
++                                  'resume guests'), instance=instance)
++
+             elif drv_state == power_state.RUNNING:
+                 # Hyper-V and VMWareAPI drivers will raise an exception
+                 try:
+-                    net_info = self._get_instance_nw_info(context, instance)
+                     self.driver.ensure_filtering_rules_for_instance(instance,
+                                                 self._legacy_nw_info(net_info))
+                 except NotImplementedError:
+diff --git a/nova/tests/test_virt_drivers.py b/nova/tests/test_virt_drivers.py
+index 5929265..d1cf7c6 100644
+--- a/nova/tests/test_virt_drivers.py
++++ b/nova/tests/test_virt_drivers.py
+@@ -143,6 +143,12 @@ class _VirtDriverTestCase(test.TestCase):
+                                      'd41d8cd98f00b204e9800998ecf8427e')
+ 
+     @catch_notimplementederror
++    def test_resume_state_on_host_boot(self):
++        instance_ref, network_info = self._get_running_instance()
++        self.connection.resume_state_on_host_boot(self.ctxt, instance_ref,
++                                                  network_info)
++
++    @catch_notimplementederror
+     def test_rescue(self):
+         instance_ref, network_info = self._get_running_instance()
+         self.connection.rescue(self.ctxt, instance_ref, network_info, None)
+diff --git a/nova/virt/driver.py b/nova/virt/driver.py
+index 9658273..5a3862e 100644
+--- a/nova/virt/driver.py
++++ b/nova/virt/driver.py
+@@ -335,6 +335,10 @@ class ComputeDriver(object):
+         # TODO(Vek): Need to pass context in for access to auth_token
+         raise NotImplementedError()
+ 
++    def resume_state_on_host_boot(self, context, instance, network_info):
++        """resume guest state when a host is booted"""
++        raise NotImplementedError()
++
+     def rescue(self, context, instance, network_info, image_meta):
+         """Rescue the specified instance"""
+         raise NotImplementedError()
+diff --git a/nova/virt/fake.py b/nova/virt/fake.py
+index 6be69bd..60620ec 100644
+--- a/nova/virt/fake.py
++++ b/nova/virt/fake.py
+@@ -131,6 +131,9 @@ class FakeConnection(driver.ComputeDriver):
+     def agent_update(self, instance, url, md5hash):
+         pass
+ 
++    def resume_state_on_host_boot(self, context, instance, network_info):
++        pass
++
+     def rescue(self, context, instance, network_info, image_meta):
+         pass
+ 
+diff --git a/nova/virt/libvirt/connection.py b/nova/virt/libvirt/connection.py
+index 37a6c2c..e0943ba 100644
+--- a/nova/virt/libvirt/connection.py
++++ b/nova/virt/libvirt/connection.py
+@@ -825,6 +825,13 @@ class LibvirtConnection(driver.ComputeDriver):
+         dom.create()
+ 
+     @exception.wrap_exception()
++    def resume_state_on_host_boot(self, context, instance, network_info):
++        """resume guest state when a host is booted"""
++        # NOTE(dprince): use hard reboot to ensure network and firewall
++        # rules are configured
++        self._hard_reboot(instance, network_info)
++
++    @exception.wrap_exception()
+     def rescue(self, context, instance, network_info, image_meta):
+         """Loads a VM using rescue images.
+ 
diff --git a/0038-Add-caching-to-openstack.common.cfg.patch b/0038-Add-caching-to-openstack.common.cfg.patch
new file mode 100644
index 0000000..e3a8b6e
--- /dev/null
+++ b/0038-Add-caching-to-openstack.common.cfg.patch
@@ -0,0 +1,166 @@
+From 787015798b4372deaed6a7e4948b608727dcaed0 Mon Sep 17 00:00:00 2001
+From: Yuriy Taraday <yorik.sar at gmail.com>
+Date: Wed, 13 Jun 2012 23:40:46 +0100
+Subject: [PATCH] Add caching to openstack.common.cfg
+
+Speedup of 'nova list' benchmark by up to 40%, eliminates 3 lines in
+top-10 cProfile methods.
+
+(includes subsequent refactoring by Mark McLoughlin)
+
+(cherry picked from commits 0d33dc3, 288939b and acf14ff)
+
+Change-Id: I2d4636f94d88b4a7e38d1565fdd4d1b8a89e560e
+---
+ nova/openstack/common/cfg.py |   43 ++++++++++++++++++++++++++++++++++++-----
+ 1 files changed, 37 insertions(+), 6 deletions(-)
+
+diff --git a/nova/openstack/common/cfg.py b/nova/openstack/common/cfg.py
+index 7adf3b4..fd1cb83 100644
+--- a/nova/openstack/common/cfg.py
++++ b/nova/openstack/common/cfg.py
+@@ -221,12 +221,13 @@ log files:
+ 
+ import collections
+ import copy
++import functools
+ import optparse
+ import os
+ import string
+ import sys
+ 
+-import iniparser
++from nova.openstack.common import iniparser
+ 
+ 
+ class Error(Exception):
+@@ -821,6 +822,8 @@ class ConfigOpts(collections.Mapping):
+                                               usage=self.usage)
+         self._cparser = None
+ 
++        self.__cache = {}
++
+         self.register_cli_opt(
+             MultiStrOpt('config-file',
+                         default=self.default_config_files,
+@@ -830,6 +833,15 @@ class ConfigOpts(collections.Mapping):
+                              'files taking precedence. The default files used '
+                              'are: %s' % (self.default_config_files, )))
+ 
++    def __clear_cache(f):
++        @functools.wraps(f)
++        def __inner(self, *args, **kwargs):
++            if kwargs.pop('clear_cache', True):
++                self.__cache.clear()
++            return f(self, *args, **kwargs)
++
++        return __inner
++
+     def __call__(self, args=None):
+         """Parse command line arguments and config files.
+ 
+@@ -864,7 +876,7 @@ class ConfigOpts(collections.Mapping):
+         :returns: the option value (after string subsititution) or a GroupAttr
+         :raises: NoSuchOptError,ConfigFileValueError,TemplateSubstitutionError
+         """
+-        return self._substitute(self._get(name))
++        return self._get(name)
+ 
+     def __getitem__(self, key):
+         """Look up an option value and perform string substitution."""
+@@ -883,12 +895,14 @@ class ConfigOpts(collections.Mapping):
+         """Return the number of options and option groups."""
+         return len(self._opts) + len(self._groups)
+ 
++    @__clear_cache
+     def reset(self):
+         """Reset the state of the object to before it was called."""
+         self._args = None
+         self._cli_values = None
+         self._cparser = None
+ 
++    @__clear_cache
+     def register_opt(self, opt, group=None):
+         """Register an option schema.
+ 
+@@ -911,11 +925,13 @@ class ConfigOpts(collections.Mapping):
+ 
+         return True
+ 
++    @__clear_cache
+     def register_opts(self, opts, group=None):
+         """Register multiple option schemas at once."""
+         for opt in opts:
+-            self.register_opt(opt, group)
++            self.register_opt(opt, group, clear_cache=False)
+ 
++    @__clear_cache
+     def register_cli_opt(self, opt, group=None):
+         """Register a CLI option schema.
+ 
+@@ -931,7 +947,7 @@ class ConfigOpts(collections.Mapping):
+         if self._args is not None:
+             raise ArgsAlreadyParsedError("cannot register CLI option")
+ 
+-        if not self.register_opt(opt, group):
++        if not self.register_opt(opt, group, clear_cache=False):
+             return False
+ 
+         if group is not None:
+@@ -941,10 +957,11 @@ class ConfigOpts(collections.Mapping):
+ 
+         return True
+ 
++    @__clear_cache
+     def register_cli_opts(self, opts, group=None):
+         """Register multiple CLI option schemas at once."""
+         for opt in opts:
+-            self.register_cli_opt(opt, group)
++            self.register_cli_opt(opt, group, clear_cache=False)
+ 
+     def register_group(self, group):
+         """Register an option group.
+@@ -959,6 +976,7 @@ class ConfigOpts(collections.Mapping):
+ 
+         self._groups[group.name] = copy.copy(group)
+ 
++    @__clear_cache
+     def set_override(self, name, override, group=None):
+         """Override an opt value.
+ 
+@@ -973,6 +991,7 @@ class ConfigOpts(collections.Mapping):
+         opt_info = self._get_opt_info(name, group)
+         opt_info['override'] = override
+ 
++    @__clear_cache
+     def set_default(self, name, default, group=None):
+         """Override an opt's default value.
+ 
+@@ -1056,6 +1075,18 @@ class ConfigOpts(collections.Mapping):
+         self._oparser.print_help(file)
+ 
+     def _get(self, name, group=None):
++        if isinstance(group, OptGroup):
++            key = (group.name, name)
++        else:
++            key = (group, name)
++        try:
++            return self.__cache[key]
++        except KeyError:
++            value = self._substitute(self._do_get(name, group))
++            self.__cache[key] = value
++            return value
++
++    def _do_get(self, name, group=None):
+         """Look up an option value.
+ 
+         :param name: the opt name (or 'dest', more precisely)
+@@ -1196,7 +1227,7 @@ class ConfigOpts(collections.Mapping):
+ 
+         def __getattr__(self, name):
+             """Look up an option value and perform template substitution."""
+-            return self.conf._substitute(self.conf._get(name, self.group))
++            return self.conf._get(name, self.group)
+ 
+         def __getitem__(self, key):
+             """Look up an option value and perform string substitution."""
diff --git a/0040-Ensure-dnsmasq-accept-rules-are-preset-at-startup.patch b/0040-Ensure-dnsmasq-accept-rules-are-preset-at-startup.patch
new file mode 100644
index 0000000..668f27f
--- /dev/null
+++ b/0040-Ensure-dnsmasq-accept-rules-are-preset-at-startup.patch
@@ -0,0 +1,32 @@
+From bc621bca08d51076bd81f15e29e8b89ea946503a Mon Sep 17 00:00:00 2001
+From: Russell Bryant <rbryant at redhat.com>
+Date: Thu, 14 Jun 2012 12:34:08 -0400
+Subject: [PATCH] Ensure dnsmasq accept rules are preset at startup.
+
+Fix bug 1000853.
+
+This bug reported that after restarting nova-network, the dnsmasq ACCEPT
+iptables rules were no longer present, causing instances to lose their
+IP addresses.  This patch updates the restart_dhcp() function in the
+linux_net driver to ensure these rules are present even if dnsmasq was
+already running.  Before this was only done when first starting dnsmasq.
+
+(cherry picked from commit aa1e71d1b313f80f5581b1422e3f3e5719569e50)
+
+Change-Id: Icda3364d3a61018b912cea7a4c96b2cbcc1fbdd7
+---
+ nova/network/linux_net.py |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/nova/network/linux_net.py b/nova/network/linux_net.py
+index a1054bb..1869857 100755
+--- a/nova/network/linux_net.py
++++ b/nova/network/linux_net.py
+@@ -689,6 +689,7 @@ def restart_dhcp(context, dev, network_ref):
+         if conffile.split("/")[-1] in out:
+             try:
+                 _execute('kill', '-HUP', pid, run_as_root=True)
++                _add_dnsmasq_accept_rules(dev)
+                 return
+             except Exception as exc:  # pylint: disable=W0703
+                 LOG.error(_('Hupping dnsmasq threw %s'), exc)
diff --git a/0041-Add-missing-ack-to-impl_qpid.patch b/0041-Add-missing-ack-to-impl_qpid.patch
new file mode 100644
index 0000000..9807004
--- /dev/null
+++ b/0041-Add-missing-ack-to-impl_qpid.patch
@@ -0,0 +1,69 @@
+From 1dc9f1972c8e74f98ffdfb75d75f9ddaae960e95 Mon Sep 17 00:00:00 2001
+From: Russell Bryant <rbryant at redhat.com>
+Date: Tue, 12 Jun 2012 17:07:18 -0400
+Subject: [PATCH] Add missing ack to impl_qpid.
+
+Fix bug 1012374.
+
+Johannes Erdfelt pointed out that impl_qpid wasn't acking messages that
+it received.  This turned out to be a nasty oversight, resulting in
+unbounded message queue growth inside of the python-qpid library.  This
+fixes it.
+
+Change-Id: I0370293807f0282e1dbdd59246f70be031e888a9
+(cherry picked from commit d15f3034dfab05ef0ec02b4e353b3dfa1512db35)
+---
+ nova/rpc/impl_qpid.py       |    7 ++++++-
+ nova/tests/rpc/test_qpid.py |    4 ++++
+ 2 files changed, 10 insertions(+), 1 deletions(-)
+
+diff --git a/nova/rpc/impl_qpid.py b/nova/rpc/impl_qpid.py
+index 8b10b75..289f21b 100644
+--- a/nova/rpc/impl_qpid.py
++++ b/nova/rpc/impl_qpid.py
+@@ -138,7 +138,12 @@ class ConsumerBase(object):
+     def consume(self):
+         """Fetch the message and pass it to the callback object"""
+         message = self.receiver.fetch()
+-        self.callback(message.content)
++        try:
++            self.callback(message.content)
++        except Exception:
++            LOG.exception(_("Failed to process message... skipping it."))
++        finally:
++            self.session.acknowledge(message)
+ 
+     def get_receiver(self):
+         return self.receiver
+diff --git a/nova/tests/rpc/test_qpid.py b/nova/tests/rpc/test_qpid.py
+index 616abb1..fc6bb1d 100644
+--- a/nova/tests/rpc/test_qpid.py
++++ b/nova/tests/rpc/test_qpid.py
+@@ -265,6 +265,7 @@ class RpcQpidTestCase(test.TestCase):
+                                                         self.mock_receiver)
+         self.mock_receiver.fetch().AndReturn(qpid.messaging.Message(
+                         {"result": "foo", "failure": False, "ending": False}))
++        self.mock_session.acknowledge(mox.IgnoreArg())
+         if multi:
+             self.mock_session.next_receiver(timeout=mox.IsA(int)).AndReturn(
+                                                         self.mock_receiver)
+@@ -272,16 +273,19 @@ class RpcQpidTestCase(test.TestCase):
+                             qpid.messaging.Message(
+                                 {"result": "bar", "failure": False,
+                                  "ending": False}))
++            self.mock_session.acknowledge(mox.IgnoreArg())
+             self.mock_session.next_receiver(timeout=mox.IsA(int)).AndReturn(
+                                                         self.mock_receiver)
+             self.mock_receiver.fetch().AndReturn(
+                             qpid.messaging.Message(
+                                 {"result": "baz", "failure": False,
+                                  "ending": False}))
++            self.mock_session.acknowledge(mox.IgnoreArg())
+         self.mock_session.next_receiver(timeout=mox.IsA(int)).AndReturn(
+                                                         self.mock_receiver)
+         self.mock_receiver.fetch().AndReturn(qpid.messaging.Message(
+                         {"failure": False, "ending": True}))
++        self.mock_session.acknowledge(mox.IgnoreArg())
+         self.mock_session.close()
+         self.mock_connection.session().AndReturn(self.mock_session)
+ 
diff --git a/0042-Updates-the-cache.patch b/0042-Updates-the-cache.patch
new file mode 100644
index 0000000..a7f64c4
--- /dev/null
+++ b/0042-Updates-the-cache.patch
@@ -0,0 +1,68 @@
+From caae0e9ca3abaad1d17d995f66195ea62fe2e59a Mon Sep 17 00:00:00 2001
+From: deevi rani <deevi_rani at persistent.co.in>
+Date: Thu, 3 May 2012 06:42:47 -0400
+Subject: [PATCH] Updates the cache
+
+fixes bug 939122
+
+Following are the changes done:
+1. in compute/api.py to display the
+   floating ip in nova list command upon
+   its association with an instance.
+2. in network/api.py to solve the similar
+   issue upon the floating ip disassocaition
+Updated version of: https://review.openstack.org/#/c/7059
+
+Change-Id: Ief1a3f544c3d14bd61cc0814612df3ee521ddec2
+(cherry picked from commit 7097e01a15ecd5c28b6b771e5043f18da243607e)
+---
+ Authors             |    1 +
+ nova/compute/api.py |    2 ++
+ nova/network/api.py |    8 ++++++++
+ 3 files changed, 11 insertions(+), 0 deletions(-)
+
+diff --git a/Authors b/Authors
+index d6d12fa..2a7a82a 100644
+--- a/Authors
++++ b/Authors
+@@ -204,3 +204,4 @@ Zed Shaw <zedshaw at zedshaw.com>
+ Zhixue Wu <Zhixue.Wu at citrix.com>
+ Zhongyue Luo <lzyeval at gmail.com>
+ Ziad Sawalha <github at highbridgellc.com>
++Deevi Rani <deevi_rani at persistent.co.in>
+diff --git a/nova/compute/api.py b/nova/compute/api.py
+index 92adea1..48f3d47 100644
+--- a/nova/compute/api.py
++++ b/nova/compute/api.py
+@@ -1639,6 +1639,8 @@ class API(BaseAPI):
+ 
+         self.network_api.associate_floating_ip(context,
+                 floating_address=address, fixed_address=ips[0]['address'])
++        self.network_api.invalidate_instance_cache(context.elevated(),
++                                                   instance)
+ 
+     @wrap_check_policy
+     def get_instance_metadata(self, context, instance):
+diff --git a/nova/network/api.py b/nova/network/api.py
+index 805fdbc..96a7a2f 100644
+--- a/nova/network/api.py
++++ b/nova/network/api.py
+@@ -148,10 +148,18 @@ class API(base.Base):
+     def disassociate_floating_ip(self, context, address,
+                                  affect_auto_assigned=False):
+         """Disassociates a floating ip from fixed ip it is associated with."""
++        floating_ip = self.db.floating_ip_get_by_address(context, address)
++        fixed_ip = self.db.fixed_ip_get(context, floating_ip['fixed_ip_id'])
++        instance = self.db.instance_get(context, fixed_ip['instance_id'])
+         rpc.cast(context,
+                  FLAGS.network_topic,
+                  {'method': 'disassociate_floating_ip',
+                   'args': {'address': address}})
++        self.invalidate_instance_cache(context, instance)
++
++    def invalidate_instance_cache(self, context, instance):
++        # NOTE(vish): get_instance_nw_info will recreate the cache for us
++        self.get_instance_nw_info(context, instance)
+ 
+     def allocate_for_instance(self, context, instance, **kwargs):
+         """Allocates all network structures for an instance.
diff --git a/0038-Don-t-query-nova-network-on-startup.patch b/0043-Don-t-query-nova-network-on-startup.patch
similarity index 90%
rename from 0038-Don-t-query-nova-network-on-startup.patch
rename to 0043-Don-t-query-nova-network-on-startup.patch
index 67dd54c..bd7890a 100644
--- a/0038-Don-t-query-nova-network-on-startup.patch
+++ b/0043-Don-t-query-nova-network-on-startup.patch
@@ -1,4 +1,4 @@
-From 1cee536c3e040aa2b1b1b3a1e5e9f1b2001c9b84 Mon Sep 17 00:00:00 2001
+From d89c2f309221afb8b25cb0afe5291d432f033076 Mon Sep 17 00:00:00 2001
 From: Russell Bryant <rbryant at redhat.com>
 Date: Mon, 11 Jun 2012 14:07:19 +0100
 Subject: [PATCH] Don't query nova-network on startup.
@@ -88,18 +88,18 @@ index dcdc87d..fcdde9e 100644
              return rv
          vif = nw_info[0]
 diff --git a/nova/compute/manager.py b/nova/compute/manager.py
-index 053e80e..7cf462e 100644
+index ed41874..784727f 100644
 --- a/nova/compute/manager.py
 +++ b/nova/compute/manager.py
-@@ -254,7 +254,7 @@ class ComputeManager(manager.SchedulerDependentManager):
-             elif drv_state == power_state.RUNNING:
-                 # Hyper-V and VMWareAPI drivers will raise an exception
-                 try:
--                    net_info = self._get_instance_nw_info(context, instance)
-+                    net_info = compute_utils.get_nw_info_for_instance(instance)
-                     self.driver.ensure_filtering_rules_for_instance(instance,
-                                                 self._legacy_nw_info(net_info))
-                 except NotImplementedError:
+@@ -246,7 +246,7 @@ class ComputeManager(manager.SchedulerDependentManager):
+             LOG.debug(_('Current state is %(drv_state)s, state in DB is '
+                         '%(db_state)s.'), locals(), instance=instance)
+ 
+-            net_info = self._get_instance_nw_info(context, instance)
++            net_info = compute_utils.get_nw_info_for_instance(instance)
+             if ((expect_running and FLAGS.resume_guests_state_on_host_boot) or
+                 FLAGS.start_guests_on_host_boot):
+                 LOG.info(_('Rebooting instance after nova-compute restart.'),
 diff --git a/nova/compute/utils.py b/nova/compute/utils.py
 index 1e5eb8b..6104c10 100644
 --- a/nova/compute/utils.py
diff --git a/0032-ensure-atomic-manipulation-of-libvirt-disk-images.patch b/0044-ensure-atomic-manipulation-of-libvirt-disk-images.patch
similarity index 95%
rename from 0032-ensure-atomic-manipulation-of-libvirt-disk-images.patch
rename to 0044-ensure-atomic-manipulation-of-libvirt-disk-images.patch
index b2ed502..458f92e 100644
--- a/0032-ensure-atomic-manipulation-of-libvirt-disk-images.patch
+++ b/0044-ensure-atomic-manipulation-of-libvirt-disk-images.patch
@@ -1,4 +1,4 @@
-From 78bb6c54c53cee35a0e31ef72b7c39b730cdbebb Mon Sep 17 00:00:00 2001
+From 3eb44544ac4ef9dca660dd87c2ff3c7e0ec3cd92 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?P=C3=A1draig=20Brady?= <pbrady at redhat.com>
 Date: Fri, 16 Mar 2012 03:43:49 +0000
 Subject: [PATCH] ensure atomic manipulation of libvirt disk images
@@ -169,10 +169,10 @@ index 1e0ae0a..626f3ff 100644
  
      return metadata
 diff --git a/nova/virt/libvirt/connection.py b/nova/virt/libvirt/connection.py
-index 37a6c2c..e536eeb 100644
+index e0943ba..b940a17 100644
 --- a/nova/virt/libvirt/connection.py
 +++ b/nova/virt/libvirt/connection.py
-@@ -1105,7 +1105,8 @@ class LibvirtConnection(driver.ComputeDriver):
+@@ -1112,7 +1112,8 @@ class LibvirtConnection(driver.ComputeDriver):
              @utils.synchronized(fname)
              def call_if_not_exists(base, fn, *args, **kwargs):
                  if not os.path.exists(base):
@@ -182,7 +182,7 @@ index 37a6c2c..e536eeb 100644
  
              if cow or not generating:
                  call_if_not_exists(base, fn, *args, **kwargs)
-@@ -1121,8 +1122,9 @@ class LibvirtConnection(driver.ComputeDriver):
+@@ -1128,8 +1129,9 @@ class LibvirtConnection(driver.ComputeDriver):
                          size_gb = size / (1024 * 1024 * 1024)
                          cow_base += "_%d" % size_gb
                          if not os.path.exists(cow_base):
@@ -194,7 +194,7 @@ index 37a6c2c..e536eeb 100644
                      libvirt_utils.create_cow_image(cow_base, target)
                  elif not generating:
                      libvirt_utils.copy_image(base, target)
-@@ -1132,7 +1134,8 @@ class LibvirtConnection(driver.ComputeDriver):
+@@ -1139,7 +1141,8 @@ class LibvirtConnection(driver.ComputeDriver):
                      if size:
                          disk.extend(target, size)
  
@@ -204,7 +204,7 @@ index 37a6c2c..e536eeb 100644
  
      @staticmethod
      def _create_local(target, local_size, unit='G',
-@@ -1305,8 +1308,9 @@ class LibvirtConnection(driver.ComputeDriver):
+@@ -1312,8 +1315,9 @@ class LibvirtConnection(driver.ComputeDriver):
                                project_id=instance['project_id'],)
          elif config_drive:
              label = 'config'
diff --git a/0033-Ensure-we-don-t-access-the-net-when-building-docs.patch b/0045-Ensure-we-don-t-access-the-net-when-building-docs.patch
similarity index 94%
rename from 0033-Ensure-we-don-t-access-the-net-when-building-docs.patch
rename to 0045-Ensure-we-don-t-access-the-net-when-building-docs.patch
index 9a2522a..eaebc09 100644
--- a/0033-Ensure-we-don-t-access-the-net-when-building-docs.patch
+++ b/0045-Ensure-we-don-t-access-the-net-when-building-docs.patch
@@ -1,4 +1,4 @@
-From 064c01976f8e9b99ee1a6e99b6ede753440294b1 Mon Sep 17 00:00:00 2001
+From 8718ecb847289bc865bdbd96bff52fd716add67d 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
diff --git a/0034-fix-useexisting-deprecation-warnings.patch b/0046-fix-useexisting-deprecation-warnings.patch
similarity index 97%
rename from 0034-fix-useexisting-deprecation-warnings.patch
rename to 0046-fix-useexisting-deprecation-warnings.patch
index 6cb0176..04b5c43 100644
--- a/0034-fix-useexisting-deprecation-warnings.patch
+++ b/0046-fix-useexisting-deprecation-warnings.patch
@@ -1,4 +1,4 @@
-From 5340c0e8836fed360eb22941f9b022e3e15f2da8 Mon Sep 17 00:00:00 2001
+From 432c4a95a820bb04f5a31f4ce852b6265a86616e Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?P=C3=A1draig=20Brady?= <pbrady at redhat.com>
 Date: Thu, 8 Mar 2012 16:32:30 +0000
 Subject: [PATCH] fix useexisting deprecation warnings
diff --git a/0035-support-a-configurable-libvirt-injection-partition.patch b/0047-support-a-configurable-libvirt-injection-partition.patch
similarity index 95%
rename from 0035-support-a-configurable-libvirt-injection-partition.patch
rename to 0047-support-a-configurable-libvirt-injection-partition.patch
index 6cb5812..a668aaf 100644
--- a/0035-support-a-configurable-libvirt-injection-partition.patch
+++ b/0047-support-a-configurable-libvirt-injection-partition.patch
@@ -1,4 +1,4 @@
-From dc24715c17202a5827d1191220bd500b9b2fedd9 Mon Sep 17 00:00:00 2001
+From 55cc54dad672c31e6898605f5d1a132031b306a8 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?P=C3=A1draig=20Brady?= <pbrady at redhat.com>
 Date: Wed, 18 Apr 2012 23:27:31 +0100
 Subject: [PATCH] support a configurable libvirt injection partition
@@ -47,7 +47,7 @@ index 4fb5dda..11959b2 100644
              else:
                  self.mapped_device = map_path
 diff --git a/nova/virt/libvirt/connection.py b/nova/virt/libvirt/connection.py
-index e536eeb..169041c 100644
+index b940a17..20d96b5 100644
 --- a/nova/virt/libvirt/connection.py
 +++ b/nova/virt/libvirt/connection.py
 @@ -108,6 +108,11 @@ libvirt_opts = [
@@ -62,7 +62,7 @@ index e536eeb..169041c 100644
      cfg.BoolOpt('use_usb_tablet',
                  default=True,
                  help='Sync virtual and real mouse cursors in Windows VMs'),
-@@ -1285,12 +1290,11 @@ class LibvirtConnection(driver.ComputeDriver):
+@@ -1292,12 +1297,11 @@ class LibvirtConnection(driver.ComputeDriver):
                                cow=FLAGS.use_cow_images,
                                swap_mb=swap_mb)
  
diff --git a/0048-repeat-fusermount-to-avoid-business.patch b/0048-repeat-fusermount-to-avoid-business.patch
new file mode 100644
index 0000000..13dcc66
--- /dev/null
+++ b/0048-repeat-fusermount-to-avoid-business.patch
@@ -0,0 +1,23 @@
+From a8c200c35505a32c05f0614cb6a0b44bdf8e2aba Mon Sep 17 00:00:00 2001
+From: Alessio Ababilov <aababilov at griddynamics.com>
+Date: Fri, 15 Jun 2012 18:33:26 +0300
+Subject: [PATCH] repeat fusermount to avoid business
+
+Fix bug #1013689
+
+Change-Id: I8ae786e105c08e1b5011a1b2a1dac048a710a1cb
+---
+ nova/virt/disk/guestfs.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/nova/virt/disk/guestfs.py b/nova/virt/disk/guestfs.py
+index 20e3eda..1e56e2a 100644
+--- a/nova/virt/disk/guestfs.py
++++ b/nova/virt/disk/guestfs.py
+@@ -90,5 +90,5 @@ class Mount(mount.Mount):
+             return
+         # root users don't need a specific unmnt_dev()
+         # but ordinary users do
+-        utils.execute('fusermount', '-u', self.mount_dir, run_as_root=True)
++        utils.execute('fusermount', '-u', self.mount_dir, run_as_root=True, attempts=4)
+         self.mounted = False
diff --git a/openstack-nova.spec b/openstack-nova.spec
index 2cc4b21..98ac35b 100644
--- a/openstack-nova.spec
+++ b/openstack-nova.spec
@@ -2,7 +2,7 @@
 
 Name:             openstack-nova
 Version:          2012.1
-Release:          9%{?dist}
+Release:          10%{?dist}
 Summary:          OpenStack Compute (nova)
 
 Group:            Applications/System
@@ -59,17 +59,26 @@ Patch0024: 0024-Generate-a-Changelog-for-Nova.patch
 Patch0025: 0025-Fix-type-of-snapshot_id-column-to-match-db.patch
 Patch0026: 0026-handle-updated-qemu-img-info-output.patch
 Patch0027: 0027-Nail-pep8-dependencies-to-1.0.1.patch
-Patch0028: 0028-Fix-Multi_Scheduler-to-process-host-capabilities.patch
-Patch0029: 0029-Add-libvirt-get_console_output-tests-pty-and-file.patch
-Patch0030: 0030-Report-memory-correctly-on-Xen.-Fixes-bug-997014.patch
-Patch0031: 0031-Fix-up-protocol-case-handling-for-security-groups.patch
-Patch0032: 0032-ensure-atomic-manipulation-of-libvirt-disk-images.patch
-Patch0033: 0033-Ensure-we-don-t-access-the-net-when-building-docs.patch
-Patch0034: 0034-fix-useexisting-deprecation-warnings.patch
-Patch0035: 0035-support-a-configurable-libvirt-injection-partition.patch
+Patch0028: 0028-Fix-bug-988034-Quantum-Network-Manager-not-clearing-.patch
+Patch0029: 0029-Fix-Multi_Scheduler-to-process-host-capabilities.patch
+Patch0030: 0030-bug-999953-xenapi-driver-intermittently-fail-to-deta.patch
+Patch0031: 0031-Add-libvirt-get_console_output-tests-pty-and-file.patch
+Patch0032: 0032-Report-memory-correctly-on-Xen.-Fixes-bug-997014.patch
+Patch0033: 0033-Fix-up-protocol-case-handling-for-security-groups.patch
+Patch0034: 0034-Fix-bug-1006664-describe-non-existent-ec2-keypair.patch
+Patch0035: 0035-Create-a-utf8-version-of-the-dns_domains-table.patch
 Patch0036: 0036-Only-invoke-.lower-on-non-None-protocols.patch
-Patch0037: 0037-Create-a-utf8-version-of-the-dns_domains-table.patch
-Patch0038: 0038-Don-t-query-nova-network-on-startup.patch
+Patch0037: 0037-Implements-resume_state_on_host_boot-for-libvirt.patch
+Patch0038: 0038-Add-caching-to-openstack.common.cfg.patch
+Patch0040: 0040-Ensure-dnsmasq-accept-rules-are-preset-at-startup.patch
+Patch0041: 0041-Add-missing-ack-to-impl_qpid.patch
+Patch0042: 0042-Updates-the-cache.patch
+Patch0043: 0043-Don-t-query-nova-network-on-startup.patch
+Patch0044: 0044-ensure-atomic-manipulation-of-libvirt-disk-images.patch
+Patch0045: 0045-Ensure-we-don-t-access-the-net-when-building-docs.patch
+Patch0046: 0046-fix-useexisting-deprecation-warnings.patch
+Patch0047: 0047-support-a-configurable-libvirt-injection-partition.patch
+Patch0048: 0048-repeat-fusermount-to-avoid-business.patch
 
 BuildArch:        noarch
 BuildRequires:    intltool
@@ -225,6 +234,15 @@ This package contains documentation files for nova.
 %patch0036 -p1
 %patch0037 -p1
 %patch0038 -p1
+%patch0040 -p1
+%patch0041 -p1
+%patch0042 -p1
+%patch0043 -p1
+%patch0044 -p1
+%patch0045 -p1
+%patch0046 -p1
+%patch0047 -p1
+%patch0048 -p1
 
 find . \( -name .gitignore -o -name .placeholder \) -delete
 
@@ -422,6 +440,9 @@ fi
 %endif
 
 %changelog
+* Mon Jun 11 2012 Pádraig Brady <P at draigBrady.com> - 2012.1-10
+- update performance and stability fixes from essex stable
+
 * Mon Jun 11 2012 Pádraig Brady <P at draigBrady.com> - 2012.1-9
 - fix an exception caused by the fix for CVE-2012-2654
 - fix the encoding of the dns_domains table (requires a db sync)


More information about the scm-commits mailing list