[openstack-nova] Rebase to latest upstream stable/diablo, pulling in ~50 patches

Mark McLoughlin markmc at fedoraproject.org
Fri Jan 6 13:46:42 UTC 2012


commit 9cf6fbd07e1a4de6fa39f40729d385729b1f90f8
Author: Mark McLoughlin <markmc at redhat.com>
Date:   Fri Jan 6 12:56:51 2012 +0000

    Rebase to latest upstream stable/diablo, pulling in ~50 patches

 0001-Add-tools-rfc.sh-from-master.patch            |    2 +-
 0002-Don-t-use-GitPython-for-authors-check.patch   |    2 +-
 ...Made-jenkins-email-pruning-more-resilient.patch |    2 +-
 0004-Removing-old-code-that-snuck-back-in.patch    |    2 +-
 ...outstanding-pep8-errors-for-a-clean-trunk.patch |    2 +-
 0006-Point-tools-rfc.sh-at-the-right-branch.patch  |    2 +-
 ...kes-sure-to-recreate-gateway-for-moved-ip.patch |    2 +-
 ...y-qualified-domain-name-in-local-hostname.patch |    2 +-
 ...e-grantee-group-loading-for-source-groups.patch |    2 +-
 ...ders-when-auth_token-is-None.-Fixes-bug-8.patch |    2 +-
 ...pool-complexities-from-nova.db.sqlalchemy.patch |    2 +-
 0012-Raise-InsufficientFreeMemory.patch            |    2 +-
 ...> 0013-Don-t-leak-exceptions-out-to-users.patch |    4 +-
 ...snapshots-work-for-amis.-Fixes-bug-873156.patch |    8 +-
 ...g-author.patch => 0015-Add-missing-author.patch |    2 +-
 ...=> 0016-Make-snapshots-private-by-default.patch |    2 +-
 ...ackups-can-no-longer-happen-simultaneousl.patch |    2 +-
 ...lp850602.patch => 0018-Fixed-bug-lp850602.patch |    2 +-
 0017-bug-861310.patch => 0019-bug-861310.patch     |    2 +-
 ...up.patch => 0020-Enforce-snapshot-cleanup.patch |    2 +-
 0019-bug-lp845714.patch => 0021-bug-lp845714.patch |    2 +-
 ...-version-specifier-to-kombu-in-pip-requir.patch |    2 +-
 ...nant-id-to-the-create-images-response-Loc.patch |    2 +-
 ...-bug-862633-OS-api-consoles-create-broken.patch |    2 +-
 ...atch => 0025-Deallocate-ip-if-build-fails.patch |    2 +-
 ...p-returning-correct-password-on-api-calls.patch |    2 +-
 ...0027-Handle-pidfile-exception-for-dnsmasq.patch |    2 +-
 ...8-Make-sure-unknown-extensions-return-404.patch |    2 +-
 ...ginal-exception-in-ClassNotFound-exceptio.patch |    2 +-
 ...default-FLAGS.logfile_mode-is-properly-co.patch |    2 +-
 ...t-errors-on-confirm-revertResize-failures.patch |    4 +-
 ...ds-ext4-and-reiserfs-to-_mount_filesystem.patch |    4 +-
 0033-Improve-access-check-on-images.patch          |    4 +-
 ...es-bug-834633-Auto-assigning-floating-IPs.patch |    4 +-
 0035-fixes-bug-883233.patch                        |    6 +-
 ...x-deletion-of-instances-without-fixed-ips.patch |  101 ++++++
 ...njection-for-OSAPI-rebuilds.-Fixes-881649.patch |   72 +++++
 0038-Add-.gitreview-config-file-for-gerrit.patch   |   48 +++
 ...ulk-create-fixed-ips.-The-true-issue-here.patch |   98 ++++++
 0040-Retry-failed-SQL-connections-LP-876663.patch  |   68 ++++
 ...-NoAuth-to-account-for-requests-ending-in.patch |   43 +++
 ...etworks-returned-from-get_instance_nw_inf.patch |   61 ++++
 ...ajax_console_proxy_port-needs-to-be-an-in.patch |   31 ++
 ...-861160-newly-created-network-has-no-uuid.patch |   61 ++++
 ...yError-when-passed-unknown-format-of-time.patch |   32 ++
 ...-Add-local-storage-of-context-for-logging.patch |  122 ++++++++
 ...4863-nova-logs-everything-to-syslog-twice.patch |   44 +++
 ...nova-ajax-console-proxy-crashes-on-shutdo.patch |   29 ++
 ...xception.KeypairNotFound-usage-correction.patch |   30 ++
 0050-fix-bug-816630.patch                          |   54 ++++
 0051-Log-the-exception-when-we-get-one.patch       |   29 ++
 0052-Change-floating-snat-to-float-snat.patch      |   46 +++
 0053-Fix-for-launchpad-bug-882568.patch            |   41 +++
 0054-Undefine-libvirt-saved-instances.patch        |   93 ++++++
 ...l-dropped-exception-when-a-new-exception-.patch |   96 ++++++
 ...Fix-exception-reraising-in-volume-manager.patch |   78 +++++
 ...e-run-instances-respect-availability-zone.patch |   78 +++++
 ...kes-rpc_allocate_fixed_ip-return-properly.patch |   74 +++++
 ...ption.wrap_exception-so-that-all-exceptio.patch |   66 ++++
 0060-Move-failed-instances-to-error-state.patch    |  186 +++++++++++
 0061-Fixes-LP878319.patch                          |  152 +++++++++
 0062-Fixes-bug-871877.patch                        |   76 +++++
 ...-exit-with-status-1-if-an-image-registrat.patch |   32 ++
 ...-notification-bug-when-creating-instances.patch |   56 ++++
 0065-fix-rebuild-sha1-not-string-error.patch       |   61 ++++
 0066-Verify-security-group-parameters.patch        |  307 +++++++++++++++++++
 ...Faults-raised-by-OpenStack-API-Resource-h.patch |   35 +++
 0068-Makes-sure-gateways-forward-properly.patch    |  111 +++++++
 0069-Fix-a-minor-memory-leak.patch                 |   31 ++
 0070-Fixes-bug-886263.patch                        |   30 ++
 0071-Fix-for-bug-894431.patch                      |   30 ++
 ...nova-actions-fails-with-HTTP-400-TypeErro.patch |  119 +++++++
 ...ic-of-throwing-exception-if-no-floating-i.patch |   80 +++++
 ...esponses-to-allow-None-response-correctly.patch |  322 ++++++++++++++++++++
 ...Sanitize-EC2-manifests-and-image-tarballs.patch |    4 +-
 0076-Rename-.nova-venv-to-.venv.patch              |  128 ++++++++
 0077-Fix-issue-in-test_s3_malicious_tarballs.patch |   29 ++
 0078-Fixes-bug-888649.patch                        |   91 ++++++
 0079-Fixes-bug-767947.patch                        |   85 +++++
 ...-Add-Support-to-delete-VMs-in-error-state.patch |   27 ++
 ...x-to-correctly-report-memory-on-Linux-3.X.patch |   38 +++
 ...avoid-error-and-trace-on-dom.vcpus-in-lxc.patch |   35 +++
 0083-Bug-751229-Floating-address-range-fixed.patch |   43 +++
 ...bin-nova-manage.py-VpnCommands.spawn-call.patch |   60 ++++
 0085-Pass-r-option-to-collie-cluster-status.patch  |   47 +++
 0086-Fixing-snapshot-failure-task_state.patch      |   73 +++++
 ...hain-rule-for-EC2-metadata-requests-lp-85.patch |    6 +-
 ...pi-add-the-INPUT-rule-for-EC2-metadata-lp.patch |   10 +-
 ...ser-to-choose-either-ietadm-or-tgtadm-lp-.patch |   14 +-
 ...e-VolumeDriver.sync_exec-method-lp-819997.patch |   18 +-
 ...tadm-tgtadm-calls-out-into-helper-classes.patch |   14 +-
 ...57-abstract-out-disk-image-access-methods.patch |   18 +-
 ...7-support-handling-images-with-libguestfs.patch |    4 +-
 ...e-don-t-access-the-net-when-building-docs.patch |    4 +-
 openstack-nova.spec                                |  161 ++++++++--
 95 files changed, 4001 insertions(+), 121 deletions(-)
---
diff --git a/0001-Add-tools-rfc.sh-from-master.patch b/0001-Add-tools-rfc.sh-from-master.patch
index 300088b..00b248f 100644
--- a/0001-Add-tools-rfc.sh-from-master.patch
+++ b/0001-Add-tools-rfc.sh-from-master.patch
@@ -1,7 +1,7 @@
 From 3a63bd53aa0e37c1ba5520b4031b2d1293592263 Mon Sep 17 00:00:00 2001
 From: Mark McLoughlin <markmc at redhat.com>
 Date: Wed, 12 Oct 2011 13:46:02 +0100
-Subject: [PATCH 01/44] Add tools/rfc.sh from master
+Subject: [PATCH 01/94] Add tools/rfc.sh from master
 
 We'll be managing the diablo branch using gerrit, so we'll need this
 script.
diff --git a/0002-Don-t-use-GitPython-for-authors-check.patch b/0002-Don-t-use-GitPython-for-authors-check.patch
index ba2b423..6c6eb33 100644
--- a/0002-Don-t-use-GitPython-for-authors-check.patch
+++ b/0002-Don-t-use-GitPython-for-authors-check.patch
@@ -1,7 +1,7 @@
 From ba68a78d440269ac21f16cb19b4fd3ba8949c945 Mon Sep 17 00:00:00 2001
 From: Mark McLoughlin <markmc at redhat.com>
 Date: Fri, 23 Sep 2011 15:57:55 +0100
-Subject: [PATCH 02/44] Don't use GitPython for authors check
+Subject: [PATCH 02/94] Don't use GitPython for authors check
 
 I hit this issue with an older GitPython version:
 
diff --git a/0003-Made-jenkins-email-pruning-more-resilient.patch b/0003-Made-jenkins-email-pruning-more-resilient.patch
index 7818a87..7485897 100644
--- a/0003-Made-jenkins-email-pruning-more-resilient.patch
+++ b/0003-Made-jenkins-email-pruning-more-resilient.patch
@@ -1,7 +1,7 @@
 From 6503923b235590e363d366375f3d2747e4d516b1 Mon Sep 17 00:00:00 2001
 From: Monty Taylor <mordred at inaugust.com>
 Date: Fri, 23 Sep 2011 17:37:29 -0400
-Subject: [PATCH 03/44] Made jenkins email pruning more resilient.
+Subject: [PATCH 03/94] Made jenkins email pruning more resilient.
 
 (cherry picked from commit c586e4ed23846420177802c164f594e021cceea8)
 
diff --git a/0004-Removing-old-code-that-snuck-back-in.patch b/0004-Removing-old-code-that-snuck-back-in.patch
index 3b4cc1a..64eea30 100644
--- a/0004-Removing-old-code-that-snuck-back-in.patch
+++ b/0004-Removing-old-code-that-snuck-back-in.patch
@@ -1,7 +1,7 @@
 From b0e855e504d2c7b5f7b50f436e43a27ec05e5a46 Mon Sep 17 00:00:00 2001
 From: Brian Waldon <brian.waldon at rackspace.com>
 Date: Fri, 23 Sep 2011 10:35:18 -0400
-Subject: [PATCH 04/44] Removing old code that snuck back in
+Subject: [PATCH 04/94] Removing old code that snuck back in
 
 (cherry picked from commit 7a95f73ad7b295ddd2313152973c6da2c78fac76)
 
diff --git a/0005-Fix-outstanding-pep8-errors-for-a-clean-trunk.patch b/0005-Fix-outstanding-pep8-errors-for-a-clean-trunk.patch
index 6ab2024..3c03e02 100644
--- a/0005-Fix-outstanding-pep8-errors-for-a-clean-trunk.patch
+++ b/0005-Fix-outstanding-pep8-errors-for-a-clean-trunk.patch
@@ -1,7 +1,7 @@
 From d6137fb2442ad1f0e675deeb33e5cc456574e7d6 Mon Sep 17 00:00:00 2001
 From: Monty Taylor <mordred at inaugust.com>
 Date: Thu, 22 Sep 2011 18:22:42 -0400
-Subject: [PATCH 05/44] Fix outstanding pep8 errors for a clean trunk.
+Subject: [PATCH 05/94] Fix outstanding pep8 errors for a clean trunk.
 
 Also, add an option to run_tests.sh to skip running pep8. We have a separate
 job in Jenkins which runs pep8, so there's no need to spin our wheels on it
diff --git a/0006-Point-tools-rfc.sh-at-the-right-branch.patch b/0006-Point-tools-rfc.sh-at-the-right-branch.patch
index 524535b..d6eb70e 100644
--- a/0006-Point-tools-rfc.sh-at-the-right-branch.patch
+++ b/0006-Point-tools-rfc.sh-at-the-right-branch.patch
@@ -1,7 +1,7 @@
 From 2e8b1175e43cce67832e2c564598e6cf2efff2de Mon Sep 17 00:00:00 2001
 From: Mark McLoughlin <markmc at redhat.com>
 Date: Tue, 18 Oct 2011 21:33:07 +0100
-Subject: [PATCH 06/44] Point tools/rfc.sh at the right branch
+Subject: [PATCH 06/94] Point tools/rfc.sh at the right branch
 
 Change-Id: I9c4ed40015ea658530206c3c0d0aad70605cd5fe
 ---
diff --git a/0007-Makes-sure-to-recreate-gateway-for-moved-ip.patch b/0007-Makes-sure-to-recreate-gateway-for-moved-ip.patch
index 826c224..70baee2 100644
--- a/0007-Makes-sure-to-recreate-gateway-for-moved-ip.patch
+++ b/0007-Makes-sure-to-recreate-gateway-for-moved-ip.patch
@@ -1,7 +1,7 @@
 From 1c8fedc82c4b388b0a3a876a54c7f14d3c2a8342 Mon Sep 17 00:00:00 2001
 From: Vishvananda Ishaya <vishvananda at gmail.com>
 Date: Mon, 26 Sep 2011 05:14:39 -0700
-Subject: [PATCH 07/44] Makes sure to recreate gateway for moved ip
+Subject: [PATCH 07/94] Makes sure to recreate gateway for moved ip
 
 If nova moves an ip when setting up dhcp, make sure to reset
 the default gateway.  Fixes bug 859587
diff --git a/0008-put-fully-qualified-domain-name-in-local-hostname.patch b/0008-put-fully-qualified-domain-name-in-local-hostname.patch
index 64d4d20..b20c422 100644
--- a/0008-put-fully-qualified-domain-name-in-local-hostname.patch
+++ b/0008-put-fully-qualified-domain-name-in-local-hostname.patch
@@ -1,7 +1,7 @@
 From 44a2a648e7c26e3721e5ee6e28a0104458bceba3 Mon Sep 17 00:00:00 2001
 From: Scott Moser <smoser at ubuntu.com>
 Date: Fri, 23 Sep 2011 16:44:44 -0400
-Subject: [PATCH 08/44] put fully qualified domain name in local-hostname
+Subject: [PATCH 08/94] put fully qualified domain name in local-hostname
 
 make metadata service return fully qualified domain name (fqdn) in
 the local-hostname field. (bug 854614)
diff --git a/0009-Fix-the-grantee-group-loading-for-source-groups.patch b/0009-Fix-the-grantee-group-loading-for-source-groups.patch
index 997ce76..1289930 100644
--- a/0009-Fix-the-grantee-group-loading-for-source-groups.patch
+++ b/0009-Fix-the-grantee-group-loading-for-source-groups.patch
@@ -1,7 +1,7 @@
 From 1f6b213d92e71de1eb669e9fb869d564066dadf5 Mon Sep 17 00:00:00 2001
 From: Vishvananda Ishaya <vishvananda at gmail.com>
 Date: Mon, 26 Sep 2011 08:34:14 -0700
-Subject: [PATCH 09/44] Fix the grantee group loading for source groups
+Subject: [PATCH 09/94] Fix the grantee group loading for source groups
 
 Fixes bug 859679.
 
diff --git a/0010-Call-endheaders-when-auth_token-is-None.-Fixes-bug-8.patch b/0010-Call-endheaders-when-auth_token-is-None.-Fixes-bug-8.patch
index 3f777f7..d64f1b0 100644
--- a/0010-Call-endheaders-when-auth_token-is-None.-Fixes-bug-8.patch
+++ b/0010-Call-endheaders-when-auth_token-is-None.-Fixes-bug-8.patch
@@ -1,7 +1,7 @@
 From 2754749c3767b7ddd90957b528828e235e25ccab Mon Sep 17 00:00:00 2001
 From: Dan Prince <dan.prince at rackspace.com>
 Date: Mon, 26 Sep 2011 13:39:14 -0400
-Subject: [PATCH 10/44] Call endheaders when auth_token is None. Fixes bug
+Subject: [PATCH 10/94] Call endheaders when auth_token is None. Fixes bug
  856721.
 
 (cherry picked from commit 14eb9c6ec9c82c9f56cde5279aebb1e5a8fac4f4)
diff --git a/0011-Removed-db_pool-complexities-from-nova.db.sqlalchemy.patch b/0011-Removed-db_pool-complexities-from-nova.db.sqlalchemy.patch
index 507c23f..dfca0b8 100644
--- a/0011-Removed-db_pool-complexities-from-nova.db.sqlalchemy.patch
+++ b/0011-Removed-db_pool-complexities-from-nova.db.sqlalchemy.patch
@@ -1,7 +1,7 @@
 From 1a5e3e0c4cc2a3bf55331d46f702b980af1fbf97 Mon Sep 17 00:00:00 2001
 From: Brian Lamar <brian.lamar at rackspace.com>
 Date: Mon, 26 Sep 2011 11:52:21 -0400
-Subject: [PATCH 11/44] Removed db_pool complexities from
+Subject: [PATCH 11/94] Removed db_pool complexities from
  nova.db.sqlalchemy.session. Fixes bug 838581.
 
 (cherry picked from commit f3dd56e916232e38e74d9e2f24ce9a738cac63cf)
diff --git a/0012-Raise-InsufficientFreeMemory.patch b/0012-Raise-InsufficientFreeMemory.patch
index fd3a6f3..4f9974b 100644
--- a/0012-Raise-InsufficientFreeMemory.patch
+++ b/0012-Raise-InsufficientFreeMemory.patch
@@ -1,7 +1,7 @@
 From 410a8df435fb424105872dc0a39f68eed902fbf2 Mon Sep 17 00:00:00 2001
 From: Aaron Lee <aaron.lee at rackspace.com>
 Date: Mon, 26 Sep 2011 18:22:03 -0500
-Subject: [PATCH 12/44] Raise InsufficientFreeMemory
+Subject: [PATCH 12/94] Raise InsufficientFreeMemory
 
 Kind of fixes bug 851374 & bug 858679
 
diff --git a/0029-Don-t-leak-exceptions-out-to-users.patch b/0013-Don-t-leak-exceptions-out-to-users.patch
similarity index 91%
rename from 0029-Don-t-leak-exceptions-out-to-users.patch
rename to 0013-Don-t-leak-exceptions-out-to-users.patch
index c0edafc..ba7c3de 100644
--- a/0029-Don-t-leak-exceptions-out-to-users.patch
+++ b/0013-Don-t-leak-exceptions-out-to-users.patch
@@ -1,7 +1,7 @@
-From d8874e9667b693488e979b56a3996cdf037cfc2f Mon Sep 17 00:00:00 2001
+From 03c9f40f1d7be54e62b129edf41a3c729049ce0c Mon Sep 17 00:00:00 2001
 From: Johannes Erdfelt <johannes.erdfelt at rackspace.com>
 Date: Tue, 18 Oct 2011 22:08:49 +0000
-Subject: [PATCH 29/44] Don't leak exceptions out to users
+Subject: [PATCH 13/94] Don't leak exceptions out to users
 
 Fixed bug 874472
 
diff --git a/0030-Makes-snapshots-work-for-amis.-Fixes-bug-873156.patch b/0014-Makes-snapshots-work-for-amis.-Fixes-bug-873156.patch
similarity index 97%
rename from 0030-Makes-snapshots-work-for-amis.-Fixes-bug-873156.patch
rename to 0014-Makes-snapshots-work-for-amis.-Fixes-bug-873156.patch
index 1c8fff6..67947d8 100644
--- a/0030-Makes-snapshots-work-for-amis.-Fixes-bug-873156.patch
+++ b/0014-Makes-snapshots-work-for-amis.-Fixes-bug-873156.patch
@@ -1,7 +1,7 @@
-From 56cb277ae540b915ef6c8b267eb1c511d62c3990 Mon Sep 17 00:00:00 2001
+From d46f6e095b43fc00099d87f73b098a137830b167 Mon Sep 17 00:00:00 2001
 From: Vishvananda Ishaya <vishvananda at gmail.com>
 Date: Fri, 14 Oct 2011 10:06:00 -0700
-Subject: [PATCH 30/44] Makes snapshots work for amis. Fixes bug 873156
+Subject: [PATCH 14/94] Makes snapshots work for amis. Fixes bug 873156
 
 (cherry picked from commit b931d51ce47203ee6a4433dc7577e0779ab94710)
 
@@ -87,7 +87,7 @@ index 9680d6f..9eeefe0 100644
              self.assertTrue(isinstance(image['updated_at'], datetime.datetime))
  
 diff --git a/nova/tests/test_libvirt.py b/nova/tests/test_libvirt.py
-index 0f01de8..0673af2 100644
+index 8d28590..51e584d 100644
 --- a/nova/tests/test_libvirt.py
 +++ b/nova/tests/test_libvirt.py
 @@ -340,6 +340,47 @@ class LibvirtConnTestCase(test.TestCase):
@@ -139,7 +139,7 @@ index 0f01de8..0673af2 100644
          if not self.lazy_load_library_exists():
              return
 diff --git a/nova/virt/libvirt/connection.py b/nova/virt/libvirt/connection.py
-index da00df0..67f4434 100644
+index 9290c5e..4b45515 100644
 --- a/nova/virt/libvirt/connection.py
 +++ b/nova/virt/libvirt/connection.py
 @@ -420,10 +420,17 @@ class LibvirtConnection(driver.ComputeDriver):
diff --git a/0013-Add-missing-author.patch b/0015-Add-missing-author.patch
similarity index 93%
rename from 0013-Add-missing-author.patch
rename to 0015-Add-missing-author.patch
index 1878332..bdf4308 100644
--- a/0013-Add-missing-author.patch
+++ b/0015-Add-missing-author.patch
@@ -1,7 +1,7 @@
 From 26434ef46761b6e1303f394c32031057b7fec4fd Mon Sep 17 00:00:00 2001
 From: Mark McLoughlin <markmc at redhat.com>
 Date: Tue, 25 Oct 2011 06:19:27 +0100
-Subject: [PATCH 13/44] Add missing author
+Subject: [PATCH 15/94] Add missing author
 
 Add Aaron Lee to Authors for the previous patch which somehow got
 past Jenkins.
diff --git a/0014-Make-snapshots-private-by-default.patch b/0016-Make-snapshots-private-by-default.patch
similarity index 95%
rename from 0014-Make-snapshots-private-by-default.patch
rename to 0016-Make-snapshots-private-by-default.patch
index abcd05e..251d599 100644
--- a/0014-Make-snapshots-private-by-default.patch
+++ b/0016-Make-snapshots-private-by-default.patch
@@ -1,7 +1,7 @@
 From 5d4b9111caa80258d1aff4b68d9524915d711838 Mon Sep 17 00:00:00 2001
 From: Johannes Erdfelt <johannes.erdfelt at rackspace.com>
 Date: Wed, 28 Sep 2011 02:53:58 +0000
-Subject: [PATCH 14/44] Make snapshots private by default
+Subject: [PATCH 16/94] Make snapshots private by default
 
 Fixes bug 850389
 
diff --git a/0015-Snapshots-backups-can-no-longer-happen-simultaneousl.patch b/0017-Snapshots-backups-can-no-longer-happen-simultaneousl.patch
similarity index 99%
rename from 0015-Snapshots-backups-can-no-longer-happen-simultaneousl.patch
rename to 0017-Snapshots-backups-can-no-longer-happen-simultaneousl.patch
index db1e3b3..87e95e6 100644
--- a/0015-Snapshots-backups-can-no-longer-happen-simultaneousl.patch
+++ b/0017-Snapshots-backups-can-no-longer-happen-simultaneousl.patch
@@ -1,7 +1,7 @@
 From 852b9307ac86b20cbe870aa5bbfaf121226f5440 Mon Sep 17 00:00:00 2001
 From: Brian Lamar <brian.lamar at rackspace.com>
 Date: Mon, 26 Sep 2011 23:41:28 -0400
-Subject: [PATCH 15/44] Snapshots/backups can no longer happen simultaneously.
+Subject: [PATCH 17/94] Snapshots/backups can no longer happen simultaneously.
  Tests included.
 
 Implemented exception.InstanceBusy when attempting to snapshot/backup an
diff --git a/0016-Fixed-bug-lp850602.patch b/0018-Fixed-bug-lp850602.patch
similarity index 98%
rename from 0016-Fixed-bug-lp850602.patch
rename to 0018-Fixed-bug-lp850602.patch
index b1d5d7f..85b3c4e 100644
--- a/0016-Fixed-bug-lp850602.patch
+++ b/0018-Fixed-bug-lp850602.patch
@@ -1,7 +1,7 @@
 From 744a0d8e7aa2c16fe55098c96cf9e46984838a4f Mon Sep 17 00:00:00 2001
 From: Kei Masumoto <masumotok at nttdata.co.jp>
 Date: Wed, 28 Sep 2011 15:05:54 -0400
-Subject: [PATCH 16/44] Fixed bug lp850602. Adding backing file copy operation
+Subject: [PATCH 18/94] Fixed bug lp850602. Adding backing file copy operation
  on kvm block migration.
 
 (cherry picked from commit b9aac1181581b9036c98f5aa493731fdc74be7e1)
diff --git a/0017-bug-861310.patch b/0019-bug-861310.patch
similarity index 97%
rename from 0017-bug-861310.patch
rename to 0019-bug-861310.patch
index 9bde52b..c44709c 100644
--- a/0017-bug-861310.patch
+++ b/0019-bug-861310.patch
@@ -1,7 +1,7 @@
 From 1def4abeeb6e03ad82906aaa6975c753d1649747 Mon Sep 17 00:00:00 2001
 From: Sateesh Chodapuneedi <sateesh.chodapuneedi at citrix.com>
 Date: Wed, 28 Sep 2011 18:07:22 +0530
-Subject: [PATCH 17/44] bug 861310
+Subject: [PATCH 19/94] bug 861310
 
 Check if host list is not empty before trying to weigh the hosts.
 
diff --git a/0018-Enforce-snapshot-cleanup.patch b/0020-Enforce-snapshot-cleanup.patch
similarity index 98%
rename from 0018-Enforce-snapshot-cleanup.patch
rename to 0020-Enforce-snapshot-cleanup.patch
index d8cbfad..aa139e3 100644
--- a/0018-Enforce-snapshot-cleanup.patch
+++ b/0020-Enforce-snapshot-cleanup.patch
@@ -1,7 +1,7 @@
 From 5ff8e1cfa1b0ea22d7113b6d9fa729c8f43f1a19 Mon Sep 17 00:00:00 2001
 From: David Subiros <david.perez5 at hp.com>
 Date: Wed, 28 Sep 2011 15:19:04 +0100
-Subject: [PATCH 18/44] Enforce snapshot cleanup.
+Subject: [PATCH 20/94] Enforce snapshot cleanup.
 
 Makes sure that the snapshot and the temporary directory is cleaned up,
 even if qemu-img fails. Fixes bug 861582.
diff --git a/0019-bug-lp845714.patch b/0021-bug-lp845714.patch
similarity index 98%
rename from 0019-bug-lp845714.patch
rename to 0021-bug-lp845714.patch
index 59084fc..1cbd362 100644
--- a/0019-bug-lp845714.patch
+++ b/0021-bug-lp845714.patch
@@ -1,7 +1,7 @@
 From 45b48835d8edb4c6caa597eb05c959b394434f92 Mon Sep 17 00:00:00 2001
 From: Aaron Lee <aaron.lee at rackspace.com>
 Date: Thu, 22 Sep 2011 17:07:27 -0500
-Subject: [PATCH 19/44] bug lp845714
+Subject: [PATCH 21/94] bug lp845714
 
 Kind of fixes it, this calls resize on the instance. The space will be
 available, but the partition won't be resized to use this space.
diff --git a/0020-Added-1.0.4-version-specifier-to-kombu-in-pip-requir.patch b/0022-Added-1.0.4-version-specifier-to-kombu-in-pip-requir.patch
similarity index 91%
rename from 0020-Added-1.0.4-version-specifier-to-kombu-in-pip-requir.patch
rename to 0022-Added-1.0.4-version-specifier-to-kombu-in-pip-requir.patch
index 57c0c2e..5181d4a 100644
--- a/0020-Added-1.0.4-version-specifier-to-kombu-in-pip-requir.patch
+++ b/0022-Added-1.0.4-version-specifier-to-kombu-in-pip-requir.patch
@@ -1,7 +1,7 @@
 From 74ce079c65b4283de58d46cf63943db2860a06fe Mon Sep 17 00:00:00 2001
 From: Brian Lamar <brian.lamar at rackspace.com>
 Date: Thu, 29 Sep 2011 15:55:42 -0400
-Subject: [PATCH 20/44] Added ==1.0.4 version specifier to kombu in
+Subject: [PATCH 22/94] Added ==1.0.4 version specifier to kombu in
  pip-requires to ensure tests pass in a clean venv.
 
 Fixes bug 862629.
diff --git a/0021-Adds-the-tenant-id-to-the-create-images-response-Loc.patch b/0023-Adds-the-tenant-id-to-the-create-images-response-Loc.patch
similarity index 97%
rename from 0021-Adds-the-tenant-id-to-the-create-images-response-Loc.patch
rename to 0023-Adds-the-tenant-id-to-the-create-images-response-Loc.patch
index 0b37217..eabb924 100644
--- a/0021-Adds-the-tenant-id-to-the-create-images-response-Loc.patch
+++ b/0023-Adds-the-tenant-id-to-the-create-images-response-Loc.patch
@@ -1,7 +1,7 @@
 From 6f96fa65aa73e7803c9ba82d7a4f3b49b310e1b7 Mon Sep 17 00:00:00 2001
 From: Alex Meade <alex.meade at rackspace.com>
 Date: Thu, 29 Sep 2011 15:58:43 -0400
-Subject: [PATCH 21/44] Adds the tenant id to the create images response
+Subject: [PATCH 23/94] Adds the tenant id to the create images response
  Location header Fixes bug 862672
 
 (cherry picked from commit f3fb16a7935e91f8c9034d1da84a2b17cbe186f8)
diff --git a/0022-Fixes-bug-862633-OS-api-consoles-create-broken.patch b/0024-Fixes-bug-862633-OS-api-consoles-create-broken.patch
similarity index 99%
rename from 0022-Fixes-bug-862633-OS-api-consoles-create-broken.patch
rename to 0024-Fixes-bug-862633-OS-api-consoles-create-broken.patch
index 262525e..4196e31 100644
--- a/0022-Fixes-bug-862633-OS-api-consoles-create-broken.patch
+++ b/0024-Fixes-bug-862633-OS-api-consoles-create-broken.patch
@@ -1,7 +1,7 @@
 From b797f1ddffe331d6663f6f53f8a823442c8c3650 Mon Sep 17 00:00:00 2001
 From: Chris Behrens <cbehrens at codestud.com>
 Date: Thu, 29 Sep 2011 20:54:19 +0000
-Subject: [PATCH 22/44] Fixes bug 862633 -- OS api consoles create() broken
+Subject: [PATCH 24/94] Fixes bug 862633 -- OS api consoles create() broken
 
 Fixed and added tests for OS API consoles.py which didn't exist.
 
diff --git a/0023-Deallocate-ip-if-build-fails.patch b/0025-Deallocate-ip-if-build-fails.patch
similarity index 99%
rename from 0023-Deallocate-ip-if-build-fails.patch
rename to 0025-Deallocate-ip-if-build-fails.patch
index ca41168..b563493 100644
--- a/0023-Deallocate-ip-if-build-fails.patch
+++ b/0025-Deallocate-ip-if-build-fails.patch
@@ -1,7 +1,7 @@
 From 87823bbc4940e585e9b2fa2d83d1a89d43c29275 Mon Sep 17 00:00:00 2001
 From: Rick Harris <rconradharris at gmail.com>
 Date: Tue, 27 Sep 2011 21:05:31 +0000
-Subject: [PATCH 23/44] Deallocate ip if build fails.
+Subject: [PATCH 25/94] Deallocate ip if build fails.
 
 Fixes LP837687
 
diff --git a/0024-Stop-returning-correct-password-on-api-calls.patch b/0026-Stop-returning-correct-password-on-api-calls.patch
similarity index 97%
rename from 0024-Stop-returning-correct-password-on-api-calls.patch
rename to 0026-Stop-returning-correct-password-on-api-calls.patch
index 8ac9b12..15574b8 100644
--- a/0024-Stop-returning-correct-password-on-api-calls.patch
+++ b/0026-Stop-returning-correct-password-on-api-calls.patch
@@ -1,7 +1,7 @@
 From b1ab6da1495784ff581000018a6047fd19cf82c4 Mon Sep 17 00:00:00 2001
 From: Ahmad Hassan <ahmad.hassan at hp.com>
 Date: Mon, 1 Aug 2011 17:16:49 +0100
-Subject: [PATCH 24/44] Stop returning correct password on api calls
+Subject: [PATCH 26/94] Stop returning correct password on api calls
 
 Captured invalid signature exception in authentication step, so that
 the problem is not returning exception to user, revealing the real
diff --git a/0025-Handle-pidfile-exception-for-dnsmasq.patch b/0027-Handle-pidfile-exception-for-dnsmasq.patch
similarity index 96%
rename from 0025-Handle-pidfile-exception-for-dnsmasq.patch
rename to 0027-Handle-pidfile-exception-for-dnsmasq.patch
index f1b0663..77f9c2c 100644
--- a/0025-Handle-pidfile-exception-for-dnsmasq.patch
+++ b/0027-Handle-pidfile-exception-for-dnsmasq.patch
@@ -1,7 +1,7 @@
 From ad4eef0a0b296652f8ce08d86a10dea8a40b005b Mon Sep 17 00:00:00 2001
 From: Yun Shen <Yun.Shen at hp.com>
 Date: Thu, 29 Sep 2011 12:09:37 +0100
-Subject: [PATCH 25/44] Handle pidfile exception for dnsmasq
+Subject: [PATCH 27/94] Handle pidfile exception for dnsmasq
 
 Capture the exception in dnsmasq_pid_for method. If the pidfile cannot be read
 for some reason, it should be treated as if it does not exist. This prevents
diff --git a/0026-Make-sure-unknown-extensions-return-404.patch b/0028-Make-sure-unknown-extensions-return-404.patch
similarity index 97%
rename from 0026-Make-sure-unknown-extensions-return-404.patch
rename to 0028-Make-sure-unknown-extensions-return-404.patch
index db596f7..f80a39e 100644
--- a/0026-Make-sure-unknown-extensions-return-404.patch
+++ b/0028-Make-sure-unknown-extensions-return-404.patch
@@ -1,7 +1,7 @@
 From 0ca35753f5f5a506162fde679ae7719d5d22f8e0 Mon Sep 17 00:00:00 2001
 From: Ahmad Hassan <ahmad.hassan at hp.com>
 Date: Wed, 5 Oct 2011 17:02:45 +0100
-Subject: [PATCH 26/44] Make sure unknown extensions return 404
+Subject: [PATCH 28/94] Make sure unknown extensions return 404
 
 At the moment, if an extension doens't exist and we call a show method
 with wrong id then the exception is not captured. There is a need to
diff --git a/0027-Include-original-exception-in-ClassNotFound-exceptio.patch b/0029-Include-original-exception-in-ClassNotFound-exceptio.patch
similarity index 98%
rename from 0027-Include-original-exception-in-ClassNotFound-exceptio.patch
rename to 0029-Include-original-exception-in-ClassNotFound-exceptio.patch
index c858e91..7413a1c 100644
--- a/0027-Include-original-exception-in-ClassNotFound-exceptio.patch
+++ b/0029-Include-original-exception-in-ClassNotFound-exceptio.patch
@@ -1,7 +1,7 @@
 From 21393e64b9524b89d373d2d303afce38919c96c2 Mon Sep 17 00:00:00 2001
 From: Julien Danjou <julien.danjou at enovance.com>
 Date: Thu, 6 Oct 2011 17:15:32 +0200
-Subject: [PATCH 27/44] Include original exception in ClassNotFound exception
+Subject: [PATCH 29/94] Include original exception in ClassNotFound exception
 
 By doing this, we allow the error messages to be more useful. When an import
 of a class fails because of a missing module dependency, it would have fail
diff --git a/0028-Ensure-non-default-FLAGS.logfile_mode-is-properly-co.patch b/0030-Ensure-non-default-FLAGS.logfile_mode-is-properly-co.patch
similarity index 96%
rename from 0028-Ensure-non-default-FLAGS.logfile_mode-is-properly-co.patch
rename to 0030-Ensure-non-default-FLAGS.logfile_mode-is-properly-co.patch
index 79a960e..86a408d 100644
--- a/0028-Ensure-non-default-FLAGS.logfile_mode-is-properly-co.patch
+++ b/0030-Ensure-non-default-FLAGS.logfile_mode-is-properly-co.patch
@@ -1,7 +1,7 @@
 From fdcfe762a52e30e09223f4128a5f4da530aefcf9 Mon Sep 17 00:00:00 2001
 From: Adam Gandelman <adamg at canonical.com>
 Date: Thu, 29 Sep 2011 21:06:06 -0700
-Subject: [PATCH 28/44] Ensure non-default FLAGS.logfile_mode is properly
+Subject: [PATCH 30/94] Ensure non-default FLAGS.logfile_mode is properly
  converted to an octet.
 
 Fixes bug 862969.
diff --git a/0031-Explicit-errors-on-confirm-revertResize-failures.patch b/0031-Explicit-errors-on-confirm-revertResize-failures.patch
index 2d475a6..937d469 100644
--- a/0031-Explicit-errors-on-confirm-revertResize-failures.patch
+++ b/0031-Explicit-errors-on-confirm-revertResize-failures.patch
@@ -1,7 +1,7 @@
-From 1658fa965658f45975b9257c2352d041611f47ea Mon Sep 17 00:00:00 2001
+From ec2bfe91b7bf7424eb34ad371ec25eec62cd3d24 Mon Sep 17 00:00:00 2001
 From: Brian Waldon <brian.waldon at rackspace.com>
 Date: Mon, 26 Sep 2011 13:57:34 -0400
-Subject: [PATCH 31/44] Explicit errors on confirm/revertResize failures
+Subject: [PATCH 31/94] Explicit errors on confirm/revertResize failures
 
 Fixing bug 856527
 
diff --git a/0032-Adds-ext4-and-reiserfs-to-_mount_filesystem.patch b/0032-Adds-ext4-and-reiserfs-to-_mount_filesystem.patch
index 11b8279..2d7324e 100644
--- a/0032-Adds-ext4-and-reiserfs-to-_mount_filesystem.patch
+++ b/0032-Adds-ext4-and-reiserfs-to-_mount_filesystem.patch
@@ -1,7 +1,7 @@
-From f1836b116bfa21b0b6ddc5164c6a65f19a2eb2c5 Mon Sep 17 00:00:00 2001
+From c206f73d03aa487868ba2acaa3581624160d1b67 Mon Sep 17 00:00:00 2001
 From: Josh Kearney <josh at jk0.org>
 Date: Thu, 20 Oct 2011 14:44:11 -0500
-Subject: [PATCH 32/44] Adds ext4 and reiserfs to _mount_filesystem().
+Subject: [PATCH 32/94] Adds ext4 and reiserfs to _mount_filesystem().
 
 Fixes bug 870495.
 
diff --git a/0033-Improve-access-check-on-images.patch b/0033-Improve-access-check-on-images.patch
index 868d191..8ef13c3 100644
--- a/0033-Improve-access-check-on-images.patch
+++ b/0033-Improve-access-check-on-images.patch
@@ -1,7 +1,7 @@
-From 978510d31d1b220181f81206204783ef19b84d8d Mon Sep 17 00:00:00 2001
+From c11659215a1cd3e551ce56f089b2682842954b04 Mon Sep 17 00:00:00 2001
 From: Loganathan Parthipan <parthipan at hp.com>
 Date: Thu, 29 Sep 2011 16:41:49 +0100
-Subject: [PATCH 33/44] Improve access check on images
+Subject: [PATCH 33/94] Improve access check on images
 
 Makes sure that users can delete only their own images, snapshots.
 Enable listing of all images, both private which are owned and the public
diff --git a/0034-Fixes-bug-834633-Auto-assigning-floating-IPs.patch b/0034-Fixes-bug-834633-Auto-assigning-floating-IPs.patch
index 3ba63ff..0ee7fcb 100644
--- a/0034-Fixes-bug-834633-Auto-assigning-floating-IPs.patch
+++ b/0034-Fixes-bug-834633-Auto-assigning-floating-IPs.patch
@@ -1,7 +1,7 @@
-From 847ffd8028dd9941a7982109593240847af8b999 Mon Sep 17 00:00:00 2001
+From 80d73a2df2c33212217c59783f62d74673776ebb Mon Sep 17 00:00:00 2001
 From: Kiall Mac Innes <kiall at managedit.ie>
 Date: Fri, 4 Nov 2011 19:43:50 +0000
-Subject: [PATCH 34/44] Fixes bug 834633 - Auto assigning floating IPs
+Subject: [PATCH 34/94] Fixes bug 834633 - Auto assigning floating IPs
 
 Details:
 
diff --git a/0035-fixes-bug-883233.patch b/0035-fixes-bug-883233.patch
index f85bd3b..c8b9840 100644
--- a/0035-fixes-bug-883233.patch
+++ b/0035-fixes-bug-883233.patch
@@ -1,7 +1,7 @@
-From ef55728d41813a67d33552620b7cc3b52ea5895d Mon Sep 17 00:00:00 2001
+From 476c3259b1bb7cfe647aed4ac4a523d6fadff475 Mon Sep 17 00:00:00 2001
 From: Joe Gordon <jogo at cloudscaling.com>
 Date: Wed, 2 Nov 2011 16:21:21 -0700
-Subject: [PATCH 35/44] fixes bug 883233.
+Subject: [PATCH 35/94] fixes bug 883233.
 
 fix typo in scheduler/driver.py assert_compute_node_has_enough_memory.
 
@@ -14,7 +14,7 @@ Change-Id: Idce87927a35b5986c970e6293428b3a5fddd00e4
  2 files changed, 3 insertions(+), 1 deletions(-)
 
 diff --git a/Authors b/Authors
-index cadfb26..cedd199 100644
+index 2298120..e6ee68c 100644
 --- a/Authors
 +++ b/Authors
 @@ -51,6 +51,7 @@ Jason Koelker <jason at koelker.net>
diff --git a/0036-Fix-deletion-of-instances-without-fixed-ips.patch b/0036-Fix-deletion-of-instances-without-fixed-ips.patch
new file mode 100644
index 0000000..d8bfd82
--- /dev/null
+++ b/0036-Fix-deletion-of-instances-without-fixed-ips.patch
@@ -0,0 +1,101 @@
+From 770aabb576fc9911177737b223dedd3d6de6183b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Asbj=C3=B8rn=20Sannes?= <asbjorn.sannes at interhost.no>
+Date: Wed, 19 Oct 2011 22:36:03 +0200
+Subject: [PATCH 36/94] Fix deletion of instances without fixed ips.
+
+Catch exception when there are no fixed ips for an instance when deallocating it.
+
+When trying to delete failed builds I got the following traces:
+
+(nova.rpc): TRACE: Traceback (most recent call last):
+(nova.rpc): TRACE:   File "/usr/lib64/python2.7/site-packages/nova/rpc/impl_kombu.py", line 620, in _process_data
+(nova.rpc): TRACE:     rval = node_func(context=ctxt, **node_args)
+(nova.rpc): TRACE:   File "/usr/lib64/python2.7/site-packages/nova/network/manager.py", line 252, in deallocate_for_instance
+(nova.rpc): TRACE:     fixed_ips = self.db.fixed_ip_get_by_instance(context, instance_id)
+(nova.rpc): TRACE:   File "/usr/lib64/python2.7/site-packages/nova/db/api.py", line 392, in fixed_ip_get_by_instance
+(nova.rpc): TRACE:     return IMPL.fixed_ip_get_by_instance(context, instance_id)
+(nova.rpc): TRACE:   File "/usr/lib64/python2.7/site-packages/nova/db/sqlalchemy/api.py", line 120, in wrapper
+(nova.rpc): TRACE:     return f(*args, **kwargs)
+(nova.rpc): TRACE:   File "/usr/lib64/python2.7/site-packages/nova/db/sqlalchemy/api.py", line 877, in fixed_ip_get_by_instance
+(nova.rpc): TRACE:     raise exception.FixedIpNotFoundForInstance(instance_id=instance_id)
+(nova.rpc): TRACE: FixedIpNotFoundForInstance: Instance 37 has zero fixed ips.
+
+Which this commit fixes.
+
+Added myself to Authors as requested.
+
+(cherry picked from commit 636c70c3c990d0405c7e05a428d78908dc8b4317)
+
+Change-Id: I87a1764c16328c6a4bfa5a0bfab1ea4800cbb355
+---
+ Authors                    |    1 +
+ nova/network/manager.py    |    5 ++++-
+ nova/tests/test_network.py |   27 +++++++++++++++++++++++++++
+ 3 files changed, 32 insertions(+), 1 deletions(-)
+
+diff --git a/Authors b/Authors
+index cedd199..03aedc2 100644
+--- a/Authors
++++ b/Authors
+@@ -12,6 +12,7 @@ Anthony Young <sleepsonthefloor at gmail.com>
+ Antony Messerli <ant at openstack.org>
+ Armando Migliaccio <Armando.Migliaccio at eu.citrix.com>
+ Arvind Somya <asomya at cisco.com>
++Asbjørn Sannes <asbjorn.sannes at interhost.no>
+ Bilal Akhtar <bilalakhtar at ubuntu.com>
+ Brad Hall <brad at nicira.com>
+ Brad McConnell <bmcconne at rackspace.com>
+diff --git a/nova/network/manager.py b/nova/network/manager.py
+index d8de396..ef3dbd6 100644
+--- a/nova/network/manager.py
++++ b/nova/network/manager.py
+@@ -250,7 +250,10 @@ class FloatingIP(object):
+         LOG.debug(_("floating IP deallocation for instance |%s|"), instance_id,
+                                                                context=context)
+ 
+-        fixed_ips = self.db.fixed_ip_get_by_instance(context, instance_id)
++        try:
++            fixed_ips = self.db.fixed_ip_get_by_instance(context, instance_id)
++        except exception.FixedIpNotFoundForInstance:
++            fixed_ips = []
+         # add to kwargs so we can pass to super to save a db lookup there
+         kwargs['fixed_ips'] = fixed_ips
+         for fixed_ip in fixed_ips:
+diff --git a/nova/tests/test_network.py b/nova/tests/test_network.py
+index 844aba2..40efd4f 100644
+--- a/nova/tests/test_network.py
++++ b/nova/tests/test_network.py
+@@ -718,3 +718,30 @@ class CommonNetworkTestCase(test.TestCase):
+         args = [None, 'foo', cidr, None, 10, 256, 'fd00::/48', None, None,
+                 None]
+         self.assertTrue(manager.create_networks(*args))
++
++
++class TestFloatingIPManager(network_manager.FloatingIP,
++        network_manager.NetworkManager):
++    """Dummy manager that implements FloatingIP"""
++
++
++class FloatingIPTestCase(test.TestCase):
++    """Tests nova.network.manager.FloatingIP"""
++    def setUp(self):
++        super(FloatingIPTestCase, self).setUp()
++        self.network = TestFloatingIPManager()
++        self.network.db = db
++        self.project_id = 'testproject'
++        self.context = context.RequestContext('testuser', self.project_id,
++            is_admin=False)
++
++    def test_double_deallocation(self):
++        instance_ref = db.api.instance_create(self.context,
++                {"project_id": self.project_id})
++        # Run it twice to make it fault if it does not handle
++        # instances without fixed networks
++        # If this fails in either, it does not handle having no addresses
++        self.network.deallocate_for_instance(self.context,
++                instance_id=instance_ref['id'])
++        self.network.deallocate_for_instance(self.context,
++                instance_id=instance_ref['id'])
+-- 
+1.7.6.5
+
diff --git a/0037-Fix-file-injection-for-OSAPI-rebuilds.-Fixes-881649.patch b/0037-Fix-file-injection-for-OSAPI-rebuilds.-Fixes-881649.patch
new file mode 100644
index 0000000..2e9afad
--- /dev/null
+++ b/0037-Fix-file-injection-for-OSAPI-rebuilds.-Fixes-881649.patch
@@ -0,0 +1,72 @@
+From 2a09eb2d26383ac815b0ce48a4747e60e8c4ac3d Mon Sep 17 00:00:00 2001
+From: Dan Prince <dan.prince at rackspace.com>
+Date: Tue, 25 Oct 2011 16:22:51 -0400
+Subject: [PATCH 37/94] Fix file injection for OSAPI rebuilds. Fixes 881649.
+
+(cherry picked from commit 3dd04ee508e626822a50858bb8dcc05c6cacfca1)
+
+Change-Id: Ibeefcafe81aa200da065a1c8069e610a28cd6c05
+---
+ nova/api/openstack/servers.py |   27 ++++++---------------------
+ 1 files changed, 6 insertions(+), 21 deletions(-)
+
+diff --git a/nova/api/openstack/servers.py b/nova/api/openstack/servers.py
+index e32a6ff..29ae375 100644
+--- a/nova/api/openstack/servers.py
++++ b/nova/api/openstack/servers.py
+@@ -713,24 +713,6 @@ class ControllerV11(Controller):
+             LOG.debug(msg)
+             raise exc.HTTPBadRequest(explanation=msg)
+ 
+-    def _decode_personalities(self, personalities):
+-        """Decode the Base64-encoded personalities."""
+-        for personality in personalities:
+-            try:
+-                path = personality["path"]
+-                contents = personality["contents"]
+-            except (KeyError, TypeError):
+-                msg = _("Unable to parse personality path/contents.")
+-                LOG.info(msg)
+-                raise exc.HTTPBadRequest(explanation=msg)
+-
+-            try:
+-                personality["contents"] = base64.b64decode(contents)
+-            except TypeError:
+-                msg = _("Personality content could not be Base64 decoded.")
+-                LOG.info(msg)
+-                raise exc.HTTPBadRequest(explanation=msg)
+-
+     def _update(self, context, req, id, inst_dict):
+         instance = self.compute_api.routing_get(context, id)
+         return self._build_view(req, instance, is_detail=True)
+@@ -758,13 +740,16 @@ class ControllerV11(Controller):
+             LOG.debug(msg)
+             raise exc.HTTPBadRequest(explanation=msg)
+ 
+-        personalities = info["rebuild"].get("personality", [])
++        personality = info["rebuild"].get("personality", [])
++        injected_files = []
++        if personality:
++            injected_files = self.helper._get_injected_files(personality)
++
+         metadata = info["rebuild"].get("metadata")
+         name = info["rebuild"].get("name")
+ 
+         if metadata:
+             self._validate_metadata(metadata)
+-        self._decode_personalities(personalities)
+ 
+         password = info["rebuild"].get("adminPass",
+                                        utils.generate_password(16))
+@@ -772,7 +757,7 @@ class ControllerV11(Controller):
+         try:
+             self.compute_api.rebuild(context, instance_id, image_href,
+                                      password, name=name, metadata=metadata,
+-                                     files_to_inject=personalities)
++                                     files_to_inject=injected_files)
+         except exception.RebuildRequiresActiveInstance:
+             msg = _("Instance %s must be active to rebuild.") % instance_id
+             raise exc.HTTPConflict(explanation=msg)
+-- 
+1.7.6.5
+
diff --git a/0038-Add-.gitreview-config-file-for-gerrit.patch b/0038-Add-.gitreview-config-file-for-gerrit.patch
new file mode 100644
index 0000000..fe726d5
--- /dev/null
+++ b/0038-Add-.gitreview-config-file-for-gerrit.patch
@@ -0,0 +1,48 @@
+From 2e85c05390a8d4f195659e993200a3b71011c832 Mon Sep 17 00:00:00 2001
+From: "James E. Blair" <james.blair at rackspace.com>
+Date: Thu, 20 Oct 2011 13:48:18 -0400
+Subject: [PATCH 38/94] Add .gitreview config file for gerrit.
+
+The CI team is developing a new tool, git-review:
+
+  https://github.com/openstack-ci/git-review
+
+which is intendend to replace rfc.sh.  This adds a .gitreview file
+so that it can automatically determine the canonical gerrit location
+for the repository when first run.  Later, rfc.sh will be updated to
+indicate it is deprecated, and then eventually removed.
+
+(cherry picked from commit adffdf2df98dadd884b1969ba45e9fdb0b4e9266)
+
+Change-Id: Ifc1d34143b1b90faa4324f7750bfc43f69a5f494
+---
+ .gitreview |    4 ++++
+ Authors    |    1 +
+ 2 files changed, 5 insertions(+), 0 deletions(-)
+ create mode 100644 .gitreview
+
+diff --git a/.gitreview b/.gitreview
+new file mode 100644
+index 0000000..3a2f61c
+--- /dev/null
++++ b/.gitreview
+@@ -0,0 +1,4 @@
++[gerrit]
++host=review.openstack.org
++port=29418
++project=openstack/nova.git
+diff --git a/Authors b/Authors
+index cedd199..79741a7 100644
+--- a/Authors
++++ b/Authors
+@@ -46,6 +46,7 @@ Hisaki Ohara <hisaki.ohara at intel.com>
+ Ilya Alekseyev <ilyaalekseyev at acm.org>
+ Isaku Yamahata <yamahata at valinux.co.jp>
+ Jake Dahn <jake at ansolabs.com>
++James E. Blair <james.blair at rackspace.com>
+ Jason Cannavale <jason.cannavale at rackspace.com>
+ Jason Koelker <jason at koelker.net>
+ Jay Pipes <jaypipes at gmail.com>
+-- 
+1.7.6.5
+
diff --git a/0039-Adding-bulk-create-fixed-ips.-The-true-issue-here.patch b/0039-Adding-bulk-create-fixed-ips.-The-true-issue-here.patch
new file mode 100644
index 0000000..3c30910
--- /dev/null
+++ b/0039-Adding-bulk-create-fixed-ips.-The-true-issue-here.patch
@@ -0,0 +1,98 @@
+From 8405b63ad8d8c5f2c7ddb4614519ca2473d741c4 Mon Sep 17 00:00:00 2001
+From: Aaron Lee <aaron.lee at rackspace.com>
+Date: Thu, 27 Oct 2011 17:37:34 -0500
+Subject: [PATCH 39/94] Adding bulk create fixed ips. The true issue here is
+ the creation of IPs in the DB that are not currently
+ used(we are building the entire block). This fix is
+ just a bandaid, but it does cut ~25 seconds off of
+ the quantum tests on my laptop.
+
+(pre)$ ./run_tests.sh -N nova.tests.test_quantum:QuantumNovaIPAMTestCase
+QuantumNovaIPAMTestCase
+    test_allocate_and_deallocate_instance_dynamic               OK  11.36
+    test_allocate_and_deallocate_instance_static                OK  11.27
+    test_create_and_delete_nets                                 OK  10.35
+    test_validate_bad_network                                   OK  0.10
+
+(post)$ ./run_tests.sh -N nova.tests.test_quantum:QuantumNovaIPAMTestCase
+QuantumNovaIPAMTestCase
+    test_allocate_and_deallocate_instance_dynamic               OK  2.94
+    test_allocate_and_deallocate_instance_static                OK  3.12
+    test_create_and_delete_nets                                 OK  1.86
+    test_validate_bad_network                                   OK  0.11
+
+(cherry picked from commit fcbb8780386b3ff48653da23a1ffb3f5aa0c8b13)
+
+Change-Id: I46b629f9ca6e019c7c4c6aa8e869c551e5c13fb8
+---
+ nova/db/api.py            |    5 +++++
+ nova/db/sqlalchemy/api.py |   10 ++++++++++
+ nova/network/manager.py   |    9 ++++++---
+ 3 files changed, 21 insertions(+), 3 deletions(-)
+
+diff --git a/nova/db/api.py b/nova/db/api.py
+index 05d81d8..c0e44d2 100644
+--- a/nova/db/api.py
++++ b/nova/db/api.py
+@@ -352,6 +352,11 @@ def fixed_ip_create(context, values):
+     return IMPL.fixed_ip_create(context, values)
+ 
+ 
++def fixed_ip_bulk_create(context, ips):
++    """Create a lot of fixed ips from the values dictionary."""
++    return IMPL.fixed_ip_bulk_create(context, ips)
++
++
+ def fixed_ip_disassociate(context, address):
+     """Disassociate a fixed ip from an instance by address."""
+     return IMPL.fixed_ip_disassociate(context, address)
+diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py
+index 6cc678a..665bdc1 100644
+--- a/nova/db/sqlalchemy/api.py
++++ b/nova/db/sqlalchemy/api.py
+@@ -750,6 +750,16 @@ def fixed_ip_create(_context, values):
+ 
+ 
+ @require_context
++def fixed_ip_bulk_create(_context, ips):
++    session = get_session()
++    with session.begin():
++        for ip in ips:
++            model = models.FixedIp()
++            model.update(ip)
++            session.add(model)
++
++
++ at require_context
+ def fixed_ip_disassociate(context, address):
+     session = get_session()
+     with session.begin():
+diff --git a/nova/network/manager.py b/nova/network/manager.py
+index d8de396..55066c3 100644
+--- a/nova/network/manager.py
++++ b/nova/network/manager.py
+@@ -835,15 +835,18 @@ class NetworkManager(manager.SchedulerDependentManager):
+         top_reserved = self._top_reserved_ips
+         project_net = netaddr.IPNetwork(network['cidr'])
+         num_ips = len(project_net)
++        ips = []
+         for index in range(num_ips):
+             address = str(project_net[index])
+             if index < bottom_reserved or num_ips - index < top_reserved:
+                 reserved = True
+             else:
+                 reserved = False
+-            self.db.fixed_ip_create(context, {'network_id': network_id,
+-                                              'address': address,
+-                                              'reserved': reserved})
++
++            ips.append({'network_id': network_id,
++                        'address': address,
++                        'reserved': reserved})
++        self.db.fixed_ip_bulk_create(context, ips)
+ 
+     def _allocate_fixed_ips(self, context, instance_id, host, networks,
+                             **kwargs):
+-- 
+1.7.6.5
+
diff --git a/0040-Retry-failed-SQL-connections-LP-876663.patch b/0040-Retry-failed-SQL-connections-LP-876663.patch
new file mode 100644
index 0000000..f32a6a2
--- /dev/null
+++ b/0040-Retry-failed-SQL-connections-LP-876663.patch
@@ -0,0 +1,68 @@
+From b0821f257e7fb512474a0da2b9d5c24d4cbf49ae Mon Sep 17 00:00:00 2001
+From: Soren Hansen <soren at linux2go.dk>
+Date: Thu, 27 Oct 2011 11:46:54 +0200
+Subject: [PATCH 40/94] Retry failed SQL connections (LP #876663)
+
+(cherry picked from commit 6ebc0ac3248b6ec7f1a221b4dae5f326406ab614)
+
+Change-Id: I972d8debb2e3230bccfcca68aee5b08021ba16c7
+---
+ nova/db/sqlalchemy/session.py |   30 ++++++++++++++++++++++++++----
+ 1 files changed, 26 insertions(+), 4 deletions(-)
+
+diff --git a/nova/db/sqlalchemy/session.py b/nova/db/sqlalchemy/session.py
+index 74ee5ed..e62aa99 100644
+--- a/nova/db/sqlalchemy/session.py
++++ b/nova/db/sqlalchemy/session.py
+@@ -18,14 +18,17 @@
+ 
+ """Session Handling for SQLAlchemy backend."""
+ 
++import sqlalchemy.exc
+ import sqlalchemy.orm
++import time
+ 
+ import nova.exception
+-import nova.flags
++import nova.flags as flags
++import nova.log as logging
+ 
+ 
+-FLAGS = nova.flags.FLAGS
+-
++FLAGS = flags.FLAGS
++LOG = logging.getLogger("nova.db.sqlalchemy.session")
+ 
+ _ENGINE = None
+ _MAKER = None
+@@ -57,7 +60,26 @@ def get_engine():
+     if "sqlite" in connection_dict.drivername:
+         engine_args["poolclass"] = sqlalchemy.pool.NullPool
+ 
+-    return sqlalchemy.create_engine(FLAGS.sql_connection, **engine_args)
++    engine = sqlalchemy.create_engine(FLAGS.sql_connection, **engine_args)
++    ensure_connection(engine)
++    return engine
++
++
++def ensure_connection(engine):
++    remaining_attempts = FLAGS.sql_max_retries
++    while True:
++        try:
++            engine.connect()
++            return
++        except sqlalchemy.exc.OperationalError:
++            if remaining_attempts == 0:
++                raise
++            LOG.warning(_('SQL connection failed (%(connstring)s). '
++                          '%(attempts)d attempts left.'),
++                           {'connstring': FLAGS.sql_connection,
++                            'attempts': remaining_attempts})
++            time.sleep(FLAGS.sql_retry_interval)
++            remaining_attempts -= 1
+ 
+ 
+ def get_maker(engine, autocommit=True, expire_on_commit=False):
+-- 
+1.7.6.5
+
diff --git a/0041-Updated-NoAuth-to-account-for-requests-ending-in.patch b/0041-Updated-NoAuth-to-account-for-requests-ending-in.patch
new file mode 100644
index 0000000..8eb04cd
--- /dev/null
+++ b/0041-Updated-NoAuth-to-account-for-requests-ending-in.patch
@@ -0,0 +1,43 @@
+From 2aa5bb969256b5a447b37704d9a2076f2c5bf48d Mon Sep 17 00:00:00 2001
+From: Alex Meade <alex.meade at rackspace.com>
+Date: Fri, 28 Oct 2011 12:32:47 -0400
+Subject: [PATCH 41/94] Updated NoAuth to account for requests ending in /
+
+Fixes bug 882742
+
+(cherry picked from commit 566f564a60fc5309441d6624fc70389ffc28773f)
+
+Change-Id: I19d527c5d16f73de2841e9d69872da6979f71886
+---
+ nova/api/openstack/auth.py |    6 ++----
+ 1 files changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/nova/api/openstack/auth.py b/nova/api/openstack/auth.py
+index 6754fea..d435f83 100644
+--- a/nova/api/openstack/auth.py
++++ b/nova/api/openstack/auth.py
+@@ -16,6 +16,7 @@
+ #    under the License.
+ 
+ import hashlib
++import os
+ import time
+ 
+ import webob.exc
+@@ -42,12 +43,9 @@ class NoAuthMiddleware(wsgi.Middleware):
+     @webob.dec.wsgify(RequestClass=wsgi.Request)
+     def __call__(self, req):
+         if 'X-Auth-Token' not in req.headers:
+-            os_url = req.url
+-            version = common.get_version_from_href(os_url)
+             user_id = req.headers.get('X-Auth-User', 'admin')
+             project_id = req.headers.get('X-Auth-Project-Id', 'admin')
+-            if version == '1.1':
+-                os_url += '/' + project_id
++            os_url = os.path.join(req.url, project_id)
+             res = webob.Response()
+             # NOTE(vish): This is expecting and returning Auth(1.1), whereas
+             #             keystone uses 2.0 auth.  We should probably allow
+-- 
+1.7.6.5
+
diff --git a/0042-Make-sure-networks-returned-from-get_instance_nw_inf.patch b/0042-Make-sure-networks-returned-from-get_instance_nw_inf.patch
new file mode 100644
index 0000000..49b22af
--- /dev/null
+++ b/0042-Make-sure-networks-returned-from-get_instance_nw_inf.patch
@@ -0,0 +1,61 @@
+From 029ee3023ec258e5900ec1918c5488bcaf6e677c Mon Sep 17 00:00:00 2001
+From: Brad Hall <brad at nicira.com>
+Date: Mon, 3 Oct 2011 12:07:50 -0700
+Subject: [PATCH 42/94] Make sure networks returned from get_instance_nw_info
+ have a label
+
+(cherry picked from commit 606827f92e74d8ff5ae13e3210abedd511fd4518)
+
+Change-Id: I3f1fd91cb05150bcbd5b32db1e8345b66d7fa348
+---
+ nova/network/quantum/manager.py            |    2 ++
+ nova/network/quantum/quantum_connection.py |    4 ++++
+ nova/tests/test_quantum.py                 |    3 +++
+ 3 files changed, 9 insertions(+), 0 deletions(-)
+
+diff --git a/nova/network/quantum/manager.py b/nova/network/quantum/manager.py
+index 23a9aba..4045784 100644
+--- a/nova/network/quantum/manager.py
++++ b/nova/network/quantum/manager.py
+@@ -241,7 +241,9 @@ class QuantumManager(manager.FlatManager):
+                 'injected': True,
+                 'multi_host': False}
+ 
++            q_tenant_id = project_id or FLAGS.quantum_default_tenant_id
+             info = {
++                'label': self.q_conn.get_network_name(q_tenant_id, net_id),
+                 'gateway': v4_subnet['gateway'],
+                 'dhcp_server': v4_subnet['gateway'],
+                 'broadcast': v4_subnet['broadcast'],
+diff --git a/nova/network/quantum/quantum_connection.py b/nova/network/quantum/quantum_connection.py
+index 2191765..ce07bc1 100644
+--- a/nova/network/quantum/quantum_connection.py
++++ b/nova/network/quantum/quantum_connection.py
+@@ -60,6 +60,10 @@ class QuantumClientConnection(object):
+         resdict = self.client.create_network(data, tenant=tenant_id)
+         return resdict["network"]["id"]
+ 
++    def get_network_name(self, tenant_id, network_id):
++        net = self.client.show_network_details(network_id, tenant=tenant_id)
++        return net["network"]["name"]
++
+     def delete_network(self, tenant_id, net_id):
+         """Deletes Quantum network with specified UUID."""
+         self.client.delete_network(net_id, tenant=tenant_id)
+diff --git a/nova/tests/test_quantum.py b/nova/tests/test_quantum.py
+index 0feec9b..e8f09f9 100644
+--- a/nova/tests/test_quantum.py
++++ b/nova/tests/test_quantum.py
+@@ -61,6 +61,9 @@ class FakeQuantumClientConnection(object):
+         except KeyError:
+             return False
+ 
++    def get_network_name(self, tenant_id, net_id):
++        return self.nets[net_id]['net-name']
++
+     def _confirm_not_attached(self, interface_id):
+         for n in self.nets.values():
+             for p in n['ports'].values():
+-- 
+1.7.6.5
+
diff --git a/0043-Bug-884527-ajax_console_proxy_port-needs-to-be-an-in.patch b/0043-Bug-884527-ajax_console_proxy_port-needs-to-be-an-in.patch
new file mode 100644
index 0000000..f36c354
--- /dev/null
+++ b/0043-Bug-884527-ajax_console_proxy_port-needs-to-be-an-in.patch
@@ -0,0 +1,31 @@
+From 6b5a94149cc471c277883f390c122969a2e743f5 Mon Sep 17 00:00:00 2001
+From: Ewan Mellor <ewan.mellor at citrix.com>
+Date: Mon, 31 Oct 2011 17:21:54 -0700
+Subject: [PATCH 43/94] Bug 884527: ajax_console_proxy_port needs to be an
+ integer
+
+Fix declaration of ajax_console_proxy_port flag.
+
+(cherry picked from commit 44d9647e7ff59c907bfe7e3eb3873159556809db)
+
+Change-Id: If949878a81339def2be5dba67ad1415180db4715
+---
+ nova/flags.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/nova/flags.py b/nova/flags.py
+index 55a56f2..11ac9f6 100644
+--- a/nova/flags.py
++++ b/nova/flags.py
+@@ -290,7 +290,7 @@ DEFINE_string('ajax_console_proxy_url',
+               'http://127.0.0.1:8000',
+               'location of ajax console proxy, \
+                in the form "http://127.0.0.1:8000"')
+-DEFINE_string('ajax_console_proxy_port',
++DEFINE_integer('ajax_console_proxy_port',
+                8000, 'port that ajax_console_proxy binds')
+ DEFINE_string('vsa_topic', 'vsa', 'the topic that nova-vsa service listens on')
+ DEFINE_bool('verbose', False, 'show debug output')
+-- 
+1.7.6.5
+
diff --git a/0044-Fix-lp-861160-newly-created-network-has-no-uuid.patch b/0044-Fix-lp-861160-newly-created-network-has-no-uuid.patch
new file mode 100644
index 0000000..3d1d5ed
--- /dev/null
+++ b/0044-Fix-lp-861160-newly-created-network-has-no-uuid.patch
@@ -0,0 +1,61 @@
+From e632d21a88665463873787edf1a56d76103ed071 Mon Sep 17 00:00:00 2001
+From: Unmesh Gurjar <unmesh.gurjar at vertex.co.in>
+Date: Wed, 19 Oct 2011 14:44:01 +0530
+Subject: [PATCH 44/94] Fix lp:861160 -- newly created network has no uuid
+
+Implemented code review changes.
+Fixed issue causing pep8 build failure.
+
+(cherry picked from commit bef4ae509256683fefe8785ce62ef2e423009653)
+
+Change-Id: If2cc0e23be8d4e1558a10fa86e6ba4cdec61b7d1
+---
+ Authors                   |    1 +
+ nova/db/sqlalchemy/api.py |    1 +
+ nova/tests/test_db_api.py |    9 +++++++++
+ 3 files changed, 11 insertions(+), 0 deletions(-)
+
+diff --git a/Authors b/Authors
+index cedd199..bff7d14 100644
+--- a/Authors
++++ b/Authors
+@@ -117,6 +117,7 @@ Todd Willey <todd at ansolabs.com>
+ Trey Morris <trey.morris at rackspace.com>
+ Troy Toman <troy.toman at rackspace.com>
+ Tushar Patil <tushar.vitthal.patil at gmail.com>
++Unmesh Gurjar <unmesh.gurjar at vertex.co.in>
+ Vasiliy Shlykov <vash at vasiliyshlykov.org>
+ Vishvananda Ishaya <vishvananda at gmail.com>
+ Vivek Y S <vivek.ys at gmail.com>
+diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py
+index 6cc678a..3fcba4c 100644
+--- a/nova/db/sqlalchemy/api.py
++++ b/nova/db/sqlalchemy/api.py
+@@ -1754,6 +1754,7 @@ def network_count_reserved_ips(context, network_id):
+ @require_admin_context
+ def network_create_safe(context, values):
+     network_ref = models.Network()
++    network_ref['uuid'] = str(utils.gen_uuid())
+     network_ref.update(values)
+     try:
+         network_ref.save()
+diff --git a/nova/tests/test_db_api.py b/nova/tests/test_db_api.py
+index 60d7abd..3e37d9a 100644
+--- a/nova/tests/test_db_api.py
++++ b/nova/tests/test_db_api.py
+@@ -95,3 +95,12 @@ class DbApiTestCase(test.TestCase):
+         self.assertEqual(result[0].id, inst2.id)
+         self.assertEqual(result[1].id, inst1.id)
+         self.assertTrue(result[1].deleted)
++
++    def test_network_create_safe(self):
++        ctxt = context.get_admin_context()
++        values = {'host': 'localhost', 'project_id': 'project1'}
++        network = db.network_create_safe(ctxt, values)
++        self.assertNotEqual(None, network.uuid)
++        self.assertEqual(36, len(network.uuid))
++        db_network = db.network_get(ctxt, network.id)
++        self.assertEqual(network.uuid, db_network.uuid)
+-- 
+1.7.6.5
+
diff --git a/0045-Fix-KeyError-when-passed-unknown-format-of-time.patch b/0045-Fix-KeyError-when-passed-unknown-format-of-time.patch
new file mode 100644
index 0000000..ce3f5ab
--- /dev/null
+++ b/0045-Fix-KeyError-when-passed-unknown-format-of-time.patch
@@ -0,0 +1,32 @@
+From bf439484c07944c5558fc833502164b9593a85bf Mon Sep 17 00:00:00 2001
+From: Johannes Erdfelt <johannes.erdfelt at rackspace.com>
+Date: Tue, 1 Nov 2011 15:31:30 +0000
+Subject: [PATCH 45/94] Fix KeyError when passed unknown format of time
+
+Fixes bug 883253
+
+ISO_FORMATS should be iso_formats
+
+(cherry picked from commit af5ee6855b17acca3ec182650a26c3d2d33bcad9)
+
+Change-Id: I3cd122176b72c84570d6b24315526540f8f860b9
+---
+ nova/image/glance.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/nova/image/glance.py b/nova/image/glance.py
+index 5b6ec87..cd97268 100644
+--- a/nova/image/glance.py
++++ b/nova/image/glance.py
+@@ -379,7 +379,7 @@ def _parse_glance_iso8601_timestamp(timestamp):
+             pass
+ 
+     raise ValueError(_('%(timestamp)s does not follow any of the '
+-                       'signatures: %(ISO_FORMATS)s') % locals())
++                       'signatures: %(iso_formats)s') % locals())
+ 
+ 
+ # TODO(yamahata): use block-device-mapping extension to glance
+-- 
+1.7.6.5
+
diff --git a/0046-Add-local-storage-of-context-for-logging.patch b/0046-Add-local-storage-of-context-for-logging.patch
new file mode 100644
index 0000000..e548424
--- /dev/null
+++ b/0046-Add-local-storage-of-context-for-logging.patch
@@ -0,0 +1,122 @@
+From 17268cab604b0712affc4c0b488769be03605571 Mon Sep 17 00:00:00 2001
+From: Vishvananda Ishaya <vishvananda at gmail.com>
+Date: Fri, 21 Oct 2011 11:18:11 -0700
+Subject: [PATCH 46/94] Add local storage of context for logging
+
+ * adds nova/local.py:store for storing greenthread local data
+ * saves a weak reference to the last context object created
+ * uses the last context object if it exists for logging
+ * Fixes bug 879582
+
+(cherry picked from commit 7cca5a8ff7f559da60c03405f69f78a42c763b61)
+
+Cc: stable-maintainers
+Change-Id: Ic373556ce197f2e8e7d23c807a65b12111db96eb
+---
+ nova/context.py |    3 +++
+ nova/local.py   |   37 +++++++++++++++++++++++++++++++++++++
+ nova/log.py     |    4 ++++
+ 3 files changed, 44 insertions(+), 0 deletions(-)
+ create mode 100644 nova/local.py
+
+diff --git a/nova/context.py b/nova/context.py
+index de5b791..36d15ba 100644
+--- a/nova/context.py
++++ b/nova/context.py
+@@ -1,5 +1,6 @@
+ # vim: tabstop=4 shiftwidth=4 softtabstop=4
+ 
++# Copyright 2011 OpenStack LLC.
+ # Copyright 2010 United States Government as represented by the
+ # Administrator of the National Aeronautics and Space Administration.
+ # All Rights Reserved.
+@@ -20,6 +21,7 @@
+ 
+ import uuid
+ 
++from nova import local
+ from nova import utils
+ 
+ 
+@@ -51,6 +53,7 @@ class RequestContext(object):
+         self.request_id = request_id
+         self.auth_token = auth_token
+         self.strategy = strategy
++        local.store.context = self
+ 
+     def to_dict(self):
+         return {'user_id': self.user_id,
+diff --git a/nova/local.py b/nova/local.py
+new file mode 100644
+index 0000000..19d9627
+--- /dev/null
++++ b/nova/local.py
+@@ -0,0 +1,37 @@
++# vim: tabstop=4 shiftwidth=4 softtabstop=4
++
++# Copyright 2011 OpenStack LLC.
++# 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.
++
++"""Greenthread local storage of variables using weak references"""
++
++import weakref
++
++from eventlet import corolocal
++
++
++class WeakLocal(corolocal.local):
++    def __getattribute__(self, attr):
++        rval = corolocal.local.__getattribute__(self, attr)
++        if rval:
++            rval = rval()
++        return rval
++
++    def __setattr__(self, attr, value):
++        value = weakref.ref(value)
++        return corolocal.local.__setattr__(self, attr, value)
++
++
++store = WeakLocal()
+diff --git a/nova/log.py b/nova/log.py
+index 1e04f75..86f1570 100644
+--- a/nova/log.py
++++ b/nova/log.py
+@@ -1,5 +1,6 @@
+ # vim: tabstop=4 shiftwidth=4 softtabstop=4
+ 
++# Copyright 2011 OpenStack LLC.
+ # Copyright 2010 United States Government as represented by the
+ # Administrator of the National Aeronautics and Space Administration.
+ # All Rights Reserved.
+@@ -38,6 +39,7 @@ import traceback
+ 
+ import nova
+ from nova import flags
++from nova import local
+ from nova import version
+ 
+ 
+@@ -152,6 +154,8 @@ class NovaLogger(logging.Logger):
+         """Extract context from any log call."""
+         if not extra:
+             extra = {}
++        if context is None:
++            context = getattr(local.store, 'context', None)
+         if context:
+             extra.update(_dictify_context(context))
+         extra.update({"nova_version": version.version_string_with_vcs()})
+-- 
+1.7.6.5
+
diff --git a/0047-Bug-884863-nova-logs-everything-to-syslog-twice.patch b/0047-Bug-884863-nova-logs-everything-to-syslog-twice.patch
new file mode 100644
index 0000000..c4bf697
--- /dev/null
+++ b/0047-Bug-884863-nova-logs-everything-to-syslog-twice.patch
@@ -0,0 +1,44 @@
+From a5e0dee1500a08d335621ebdc1506dad271b9130 Mon Sep 17 00:00:00 2001
+From: Ewan Mellor <ewan.mellor at citrix.com>
+Date: Tue, 1 Nov 2011 11:54:59 -0700
+Subject: [PATCH 47/94] Bug 884863: nova logs everything to syslog twice
+
+Fix double-registration of the syslog handler.
+NovaRootLogger.setup_from_flags is called twice from log.setup() -- once
+through NovaRootLogger.__init__ and once through reset().  setup_from_flags
+wasn't idempotent, so this resulted in the syslog handler being registered
+twice.
+
+Rather than fix the twisty-turny maze that is setup(), I've opted to make
+setup_from_flags idempotent in this regard, by always unregistering the
+syslog handler before doing anything else.
+
+(cherry picked from commit a807c57f5b61cb25a6f5c140a97ed744ab0a70dd)
+
+Change-Id: I59ad61751e1a19d2cbb73dc1deea9c708d4c5032
+---
+ nova/log.py |    5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/nova/log.py b/nova/log.py
+index 1e04f75..ec3fa67 100644
+--- a/nova/log.py
++++ b/nova/log.py
+@@ -245,11 +245,12 @@ class NovaRootLogger(NovaLogger):
+     def setup_from_flags(self):
+         """Setup logger from flags."""
+         global _filelog
++        if self.syslog:
++            self.removeHandler(self.syslog)
++            self.syslog = None
+         if FLAGS.use_syslog:
+             self.syslog = SysLogHandler(address='/dev/log')
+             self.addHandler(self.syslog)
+-        elif self.syslog:
+-            self.removeHandler(self.syslog)
+         logpath = _get_log_file_path()
+         if logpath:
+             self.removeHandler(self.streamlog)
+-- 
+1.7.6.5
+
diff --git a/0048-Bug-884534-nova-ajax-console-proxy-crashes-on-shutdo.patch b/0048-Bug-884534-nova-ajax-console-proxy-crashes-on-shutdo.patch
new file mode 100644
index 0000000..8813192
--- /dev/null
+++ b/0048-Bug-884534-nova-ajax-console-proxy-crashes-on-shutdo.patch
@@ -0,0 +1,29 @@
+From 9a00aea7fc49522ab8628383e8a3fde3f0aa83db Mon Sep 17 00:00:00 2001
+From: Ewan Mellor <ewan.mellor at citrix.com>
+Date: Mon, 31 Oct 2011 17:33:47 -0700
+Subject: [PATCH 48/94] Bug #884534: nova-ajax-console-proxy crashes on
+ shutdown
+
+Close the correct connection, when shutting down.  self is not defined in
+this context.
+
+(cherry picked from commit 826888de038d5ba58c133c5fa1471ec9bfe0f52d)
+
+Change-Id: I0dc84a1c7de468a381f5765ccba589acbc8173dd
+---
+ bin/nova-ajax-console-proxy |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/bin/nova-ajax-console-proxy b/bin/nova-ajax-console-proxy
+index 23fb42f..4770a8a 100755
+--- a/bin/nova-ajax-console-proxy
++++ b/bin/nova-ajax-console-proxy
+@@ -141,4 +141,4 @@ if __name__ == '__main__':
+     server = wsgi.Server("AJAX Console Proxy", acp, port=acp_port)
+     service.serve(server)
+     service.wait()
+-    self.conn.close()
++    acp.conn.close()
+-- 
+1.7.6.5
+
diff --git a/0049-exception.KeypairNotFound-usage-correction.patch b/0049-exception.KeypairNotFound-usage-correction.patch
new file mode 100644
index 0000000..a616846
--- /dev/null
+++ b/0049-exception.KeypairNotFound-usage-correction.patch
@@ -0,0 +1,30 @@
+From 81d956786f3d8c10569064fdc288637327098bd6 Mon Sep 17 00:00:00 2001
+From: Brian Waldon <brian.waldon at rackspace.com>
+Date: Thu, 3 Nov 2011 09:22:35 -0400
+Subject: [PATCH 49/94] exception.KeypairNotFound usage correction
+
+Fixes bug 885462
+
+(cherry picked from commit 028f9ba81a857d0285bf68d789eae0a65772e39f)
+
+Change-Id: I9f0df87a37395853e052b8300af777607ecbc5de
+---
+ nova/exception.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/nova/exception.py b/nova/exception.py
+index b88e8e5..b98219c 100644
+--- a/nova/exception.py
++++ b/nova/exception.py
+@@ -555,7 +555,7 @@ class NoFloatingIpsDefined(NotFound):
+ 
+ 
+ class KeypairNotFound(NotFound):
+-    message = _("Keypair %(keypair_name)s not found for user %(user_id)s")
++    message = _("Keypair %(name)s not found for user %(user_id)s")
+ 
+ 
+ class CertificateNotFound(NotFound):
+-- 
+1.7.6.5
+
diff --git a/0050-fix-bug-816630.patch b/0050-fix-bug-816630.patch
new file mode 100644
index 0000000..5408443
--- /dev/null
+++ b/0050-fix-bug-816630.patch
@@ -0,0 +1,54 @@
+From be3f35b9ead65419e548ca13d5d463deb9da3a9d Mon Sep 17 00:00:00 2001
+From: Joe Gordon <jogo at cloudscaling.com>
+Date: Tue, 1 Nov 2011 12:22:13 -0700
+Subject: [PATCH 50/94] fix bug 816630
+
+Off by one error fixed
+With test case
+
+(cherry picked from commit a6a7e936fe8fb55471dc1ecc41d8644398e45ef7)
+
+Change-Id: I5060c0a59949d69d6f859a01e7cf5fa8e0227d8a
+---
+ nova/network/manager.py    |    2 +-
+ nova/tests/test_network.py |   11 +++++++++++
+ 2 files changed, 12 insertions(+), 1 deletions(-)
+
+diff --git a/nova/network/manager.py b/nova/network/manager.py
+index d8de396..a154441 100644
+--- a/nova/network/manager.py
++++ b/nova/network/manager.py
+@@ -837,7 +837,7 @@ class NetworkManager(manager.SchedulerDependentManager):
+         num_ips = len(project_net)
+         for index in range(num_ips):
+             address = str(project_net[index])
+-            if index < bottom_reserved or num_ips - index < top_reserved:
++            if index < bottom_reserved or num_ips - index <= top_reserved:
+                 reserved = True
+             else:
+                 reserved = False
+diff --git a/nova/tests/test_network.py b/nova/tests/test_network.py
+index 844aba2..6ae8884 100644
+--- a/nova/tests/test_network.py
++++ b/nova/tests/test_network.py
+@@ -210,6 +210,17 @@ class FlatNetworkTestCase(test.TestCase):
+         self.mox.ReplayAll()
+         self.network.validate_networks(self.context, requested_networks)
+ 
++    def test_validate_reserved(self):
++        context_admin = context.RequestContext('testuser', 'testproject',
++                                              is_admin=True)
++        nets = self.network.create_networks(context_admin, 'fake',
++                                       '192.168.0.0/24', False, 1,
++                                       256, None, None, None, None )
++        self.assertEqual(1, len(nets))
++        network = nets[0]
++        self.assertEqual(3, db.network_count_reserved_ips(context_admin,
++                        network['id']))
++
+     def test_validate_networks_none_requested_networks(self):
+         self.network.validate_networks(self.context, None)
+ 
+-- 
+1.7.6.5
+
diff --git a/0051-Log-the-exception-when-we-get-one.patch b/0051-Log-the-exception-when-we-get-one.patch
new file mode 100644
index 0000000..da7c6a5
--- /dev/null
+++ b/0051-Log-the-exception-when-we-get-one.patch
@@ -0,0 +1,29 @@
+From e2b450c00fd7491b09109fdc13efe02ee5765fbc Mon Sep 17 00:00:00 2001
+From: Ewan Mellor <ewan.mellor at citrix.com>
+Date: Tue, 1 Nov 2011 11:33:44 -0700
+Subject: [PATCH 51/94] Log the exception when we get one.
+
+(cherry picked from commit 46152102a0f5900e1a2cc0800ec850aa7191a3d6)
+
+Change-Id: Iee478c8f300b608dd153e3400bd17866f52543c5
+---
+ bin/nova-ajax-console-proxy |    3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/bin/nova-ajax-console-proxy b/bin/nova-ajax-console-proxy
+index 23fb42f..5546e37 100755
+--- a/bin/nova-ajax-console-proxy
++++ b/bin/nova-ajax-console-proxy
+@@ -102,7 +102,8 @@ class AjaxConsoleProxy(object):
+                           % (req_url, str(env)))
+             start_response("401 NOT AUTHORIZED", [])
+             return "Not Authorized"
+-        except Exception:
++        except Exception, exc:
++            LOG.exception(exc)
+             start_response("500 ERROR", [])
+             return "Server Error"
+ 
+-- 
+1.7.6.5
+
diff --git a/0052-Change-floating-snat-to-float-snat.patch b/0052-Change-floating-snat-to-float-snat.patch
new file mode 100644
index 0000000..bc98329
--- /dev/null
+++ b/0052-Change-floating-snat-to-float-snat.patch
@@ -0,0 +1,46 @@
+From 938292fc63ab1fb36d4ac0ae1ad74ab5cff26410 Mon Sep 17 00:00:00 2001
+From: Brad Hall <brad at nicira.com>
+Date: Sun, 2 Oct 2011 07:13:53 -0700
+Subject: [PATCH 52/94] Change floating-snat to float-snat
+
+With iptables v1.4.10 I'm running into an issue with the chain length of the
+"nova-dhcpbridge-floating-snat" table (iptables it complaining that the name
+is too long; 28 chars max).  This shortens the name of that table.
+
+(cherry picked from commit 8700a97b701136e13c7ef959f13c89a3b7462fdb)
+
+Change-Id: I00b1003aaa0b3771c29d6459d07023a8caa47706
+---
+ nova/network/linux_net.py |    8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/nova/network/linux_net.py b/nova/network/linux_net.py
+index c0be962..a55ba2c 100755
+--- a/nova/network/linux_net.py
++++ b/nova/network/linux_net.py
+@@ -283,10 +283,10 @@ class IptablesManager(object):
+         self.ipv4['nat'].add_rule('nova-postrouting-bottom', '-j $snat',
+                                   wrap=False)
+ 
+-        # And then we add a floating-snat chain and jump to first thing in
++        # And then we add a float-snat chain and jump to first thing in
+         # the snat chain.
+-        self.ipv4['nat'].add_chain('floating-snat')
+-        self.ipv4['nat'].add_rule('snat', '-j $floating-snat')
++        self.ipv4['nat'].add_chain('float-snat')
++        self.ipv4['nat'].add_rule('snat', '-j $float-snat')
+ 
+     @utils.synchronized('iptables', external=True)
+     def apply(self):
+@@ -459,7 +459,7 @@ def remove_floating_forward(floating_ip, fixed_ip):
+ def floating_forward_rules(floating_ip, fixed_ip):
+     return [('PREROUTING', '-d %s -j DNAT --to %s' % (floating_ip, fixed_ip)),
+             ('OUTPUT', '-d %s -j DNAT --to %s' % (floating_ip, fixed_ip)),
+-            ('floating-snat',
++            ('float-snat',
+              '-s %s -j SNAT --to %s' % (fixed_ip, floating_ip))]
+ 
+ 
+-- 
+1.7.6.5
+
diff --git a/0053-Fix-for-launchpad-bug-882568.patch b/0053-Fix-for-launchpad-bug-882568.patch
new file mode 100644
index 0000000..9edf5d3
--- /dev/null
+++ b/0053-Fix-for-launchpad-bug-882568.patch
@@ -0,0 +1,41 @@
+From 95b56105b2fc66de2c1cbaad773955a65ed30fa0 Mon Sep 17 00:00:00 2001
+From: Brad Hall <brad at nicira.com>
+Date: Thu, 27 Oct 2011 17:45:23 -0700
+Subject: [PATCH 53/94] Fix for launchpad bug #882568
+
+Use tunctl to create the tap device if we are on a system where the ip command
+is too old (and doesn't have support for tuntap).
+
+(cherry picked from commit e4c74596bfaf1cee1a6f8cbb0d97aa067d9a4317)
+
+Change-Id: I9e22010e4c7dd2671267de6d0e7a7bc9ae76a854
+---
+ nova/virt/libvirt/vif.py |   11 ++++++++++-
+ 1 files changed, 10 insertions(+), 1 deletions(-)
+
+diff --git a/nova/virt/libvirt/vif.py b/nova/virt/libvirt/vif.py
+index 077c324..96cf2e7 100644
+--- a/nova/virt/libvirt/vif.py
++++ b/nova/virt/libvirt/vif.py
+@@ -107,8 +107,17 @@ class LibvirtOpenVswitchDriver(VIFDriver):
+         iface_id = mapping['vif_uuid']
+         dev = self.get_dev_name(iface_id)
+         if not linux_net._device_exists(dev):
+-            utils.execute('ip', 'tuntap', 'add', dev, 'mode', 'tap',
++            # Older version of the command 'ip' from the iproute2 package
++            # don't have support for the tuntap option (lp:882568).  If it
++            # turns out we're on an old version we work around this by using
++            # tunctl.
++            try:
++                # First, try with 'ip'
++                utils.execute('ip', 'tuntap', 'add', dev, 'mode', 'tap',
+                           run_as_root=True)
++            except exception.ProcessExecutionError:
++                # Second option: tunctl
++                utils.execute('tunctl', '-b', '-t', dev, run_as_root=True)
+             utils.execute('ip', 'link', 'set', dev, 'up', run_as_root=True)
+         utils.execute('ovs-vsctl', '--', '--may-exist', 'add-port',
+                 FLAGS.libvirt_ovs_bridge, dev,
+-- 
+1.7.6.5
+
diff --git a/0054-Undefine-libvirt-saved-instances.patch b/0054-Undefine-libvirt-saved-instances.patch
new file mode 100644
index 0000000..2665c75
--- /dev/null
+++ b/0054-Undefine-libvirt-saved-instances.patch
@@ -0,0 +1,93 @@
+From 27b0ff5ccd66eaaeda2ac2a013815c4d34cf9ec9 Mon Sep 17 00:00:00 2001
+From: Derek Higgins <higginsd at gmail.com>
+Date: Fri, 4 Nov 2011 00:25:34 +0000
+Subject: [PATCH 54/94] Undefine libvirt saved instances
+
+Fixes bug 814561
+
+Adding a call to managedSaveRemove if the instance has a
+saved instance, so they are now undefined in addition to running
+instances during destroy
+With test case
+
+Also added myself to Authors
+
+(cherry picked from commit ad7fcf225e126d2a719c04019c4daa1616d2159e)
+
+Change-Id: I760a15d2ab135d7c3d638ca3c4358d8600582411
+---
+ Authors                         |    1 +
+ nova/tests/test_libvirt.py      |   22 ++++++++++++++++++++++
+ nova/virt/libvirt/connection.py |   11 +++++++++++
+ 3 files changed, 34 insertions(+), 0 deletions(-)
+
+diff --git a/Authors b/Authors
+index cedd199..f8aa25e 100644
+--- a/Authors
++++ b/Authors
+@@ -31,6 +31,7 @@ Dave Walker <DaveWalker at ubuntu.com>
+ David Pravec <David.Pravec at danix.org>
+ David Subiros <david.perez5 at hp.com>
+ Dean Troyer <dtroyer at gmail.com>
++Derek Higgins <higginsd at gmail.com>
+ Devendra Modium <dmodium at isi.edu>
+ Devin Carlen <devin.carlen at gmail.com>
+ Donal Lafferty <donal.lafferty at citrix.com>
+diff --git a/nova/tests/test_libvirt.py b/nova/tests/test_libvirt.py
+index 0673af2..f59b2f7 100644
+--- a/nova/tests/test_libvirt.py
++++ b/nova/tests/test_libvirt.py
+@@ -987,6 +987,28 @@ class LibvirtConnTestCase(test.TestCase):
+         _assert_volume_in_mapping('sdg', False)
+         _assert_volume_in_mapping('sdh1', False)
+ 
++    def test_destroy_saved(self):
++        """Ensure destroy calls managedSaveRemove for saved instance"""
++        # Skip if non-libvirt environment
++        if not self.lazy_load_library_exists():
++            return
++
++        mock = self.mox.CreateMock(libvirt.virDomain)
++        mock.destroy()
++        mock.hasManagedSaveImage(0).AndReturn(1)
++        mock.managedSaveRemove(0)
++        mock.undefine()
++
++        self.mox.ReplayAll()
++
++        def fake_lookup_by_name(instance_name):
++            return mock
++
++        conn = connection.LibvirtConnection(False)
++        self.stubs.Set(conn, '_lookup_by_name', fake_lookup_by_name)
++        instance = {"name": "instancename", "id": "instanceid"}
++        conn.destroy(instance, [])
++
+ 
+ class NWFilterFakes:
+     def __init__(self):
+diff --git a/nova/virt/libvirt/connection.py b/nova/virt/libvirt/connection.py
+index 67f4434..ba1dc86 100644
+--- a/nova/virt/libvirt/connection.py
++++ b/nova/virt/libvirt/connection.py
+@@ -293,6 +293,17 @@ class LibvirtConnection(driver.ComputeDriver):
+                     raise
+ 
+             try:
++                # NOTE(derekh): we can switch to undefineFlags and
++                # VIR_DOMAIN_UNDEFINE_MANAGED_SAVE once we require 0.9.4
++                if virt_dom.hasManagedSaveImage(0):
++                    virt_dom.managedSaveRemove(0)
++            except libvirt.libvirtError as e:
++                errcode = e.get_error_code()
++                LOG.warning(_("Error from libvirt during saved instance "
++                              "removal %(instance_name)s. Code=%(errcode)s"
++                              " Error=%(e)s") % locals())
++
++            try:
+                 # NOTE(justinsb): We remove the domain definition. We probably
+                 # would do better to keep it if cleanup=False (e.g. volumes?)
+                 # (e.g. #2 - not losing machines on failure)
+-- 
+1.7.6.5
+
diff --git a/0055-Log-original-dropped-exception-when-a-new-exception-.patch b/0055-Log-original-dropped-exception-when-a-new-exception-.patch
new file mode 100644
index 0000000..25d2156
--- /dev/null
+++ b/0055-Log-original-dropped-exception-when-a-new-exception-.patch
@@ -0,0 +1,96 @@
+From f286a4b29d4386f8fe93f9c58fe1486f859c1317 Mon Sep 17 00:00:00 2001
+From: Johannes Erdfelt <johannes.erdfelt at rackspace.com>
+Date: Mon, 31 Oct 2011 15:11:36 +0000
+Subject: [PATCH 55/94] Log original dropped exception when a new exception
+ occurs
+
+If a exception is caught while processing a previous exception, make sure
+to log it so it doesn't silently get discarded
+
+Cherry-picked from e2403739d5e866e011ecc45a4d5b20d5e0192997.
+
+Change-Id: Ic887db9c2592229970737daf5dd9732b2258877b
+---
+ nova/compute/manager.py |   10 +---------
+ nova/exception.py       |    2 ++
+ nova/utils.py           |   25 +++++++++++++++++++++++++
+ 3 files changed, 28 insertions(+), 9 deletions(-)
+
+diff --git a/nova/compute/manager.py b/nova/compute/manager.py
+index 5feb840..69dea2e 100644
+--- a/nova/compute/manager.py
++++ b/nova/compute/manager.py
+@@ -464,16 +464,8 @@ class ComputeManager(manager.SchedulerDependentManager):
+             # be fixed once we have no-db-messaging
+             pass
+         except:
+-            # NOTE(sirp): 3-arg raise needed since Eventlet clears exceptions
+-            # when switching between greenthreads.
+-            type_, value, traceback = sys.exc_info()
+-            try:
++            with utils.save_and_reraise_exception():
+                 _deallocate_network()
+-            finally:
+-                # FIXME(sirp): when/if
+-                # https://github.com/jcrocholl/pep8/pull/27 merges, we can add
+-                # a per-line disable flag here for W602
+-                raise type_, value, traceback
+ 
+     @exception.wrap_exception(notifier=notifier, publisher_id=publisher_id())
+     def run_instance(self, context, instance_id, **kwargs):
+diff --git a/nova/exception.py b/nova/exception.py
+index b88e8e5..a3992d2 100644
+--- a/nova/exception.py
++++ b/nova/exception.py
+@@ -92,6 +92,8 @@ def wrap_exception(notifier=None, publisher_id=None, event_type=None,
+     # TODO(sandy): Find a way to import nova.notifier.api so we don't have
+     # to pass it in as a parameter. Otherwise we get a cyclic import of
+     # nova.notifier.api -> nova.utils -> nova.exception :(
++    # TODO(johannes): Also, it would be nice to use
++    # utils.save_and_reraise_exception() without an import loop
+     def inner(f):
+         def wrapped(*args, **kw):
+             try:
+diff --git a/nova/utils.py b/nova/utils.py
+index c64b11f..4648f55 100644
+--- a/nova/utils.py
++++ b/nova/utils.py
+@@ -19,6 +19,7 @@
+ 
+ """Utilities and helper functions."""
+ 
++import contextlib
+ import datetime
+ import functools
+ import inspect
+@@ -910,3 +911,27 @@ def convert_to_list_dict(lst, label):
+     if not isinstance(lst, list):
+         lst = [lst]
+     return [{label: x} for x in lst]
++
++
++ at contextlib.contextmanager
++def save_and_reraise_exception():
++    """Save current exception, run some code and then re-raise.
++
++    In some cases the exception context can be cleared, resulting in None
++    being attempted to be reraised after an exception handler is run. This
++    can happen when eventlet switches greenthreads or when running an
++    exception handler, code raises and catches and exception. In both
++    cases the exception context will be cleared.
++
++    To work around this, we save the exception state, run handler code, and
++    then re-raise the original exception. If another exception occurs, the
++    saved exception is logged and the new exception is reraised.
++    """
++    type_, value, traceback = sys.exc_info()
++    try:
++        yield
++    except:
++        LOG.exception(_('Original exception being dropped'),
++                      exc_info=(type_, value, traceback))
++        raise
++    raise type_, value, traceback
+-- 
+1.7.6.5
+
diff --git a/0056-Fix-exception-reraising-in-volume-manager.patch b/0056-Fix-exception-reraising-in-volume-manager.patch
new file mode 100644
index 0000000..4522171
--- /dev/null
+++ b/0056-Fix-exception-reraising-in-volume-manager.patch
@@ -0,0 +1,78 @@
+From 3f0196a2cb2e708442de6f2676113e4e9417ba2b Mon Sep 17 00:00:00 2001
+From: Yuriy Taraday <yorik.sar at gmail.com>
+Date: Thu, 27 Oct 2011 13:57:59 +0400
+Subject: [PATCH 56/94] Fix exception reraising in volume manager.
+
+Cherry-picked from ad710f2743f4671927fd72387e10527ac1778362.
+
+Change-Id: Id75bdd6531acf492df4c8d96723b8303406bffe0
+---
+ nova/volume/manager.py |   31 ++++++++++++++++---------------
+ 1 files changed, 16 insertions(+), 15 deletions(-)
+
+diff --git a/nova/volume/manager.py b/nova/volume/manager.py
+index caa5298..7276915 100644
+--- a/nova/volume/manager.py
++++ b/nova/volume/manager.py
+@@ -126,10 +126,10 @@ class VolumeManager(manager.SchedulerDependentManager):
+             if model_update:
+                 self.db.volume_update(context, volume_ref['id'], model_update)
+         except Exception:
+-            self.db.volume_update(context,
+-                                  volume_ref['id'], {'status': 'error'})
+-            self._notify_vsa(context, volume_ref, 'error')
+-            raise
++            with utils.save_and_reraise_exception():
++                self.db.volume_update(context,
++                                      volume_ref['id'], {'status': 'error'})
++                self._notify_vsa(context, volume_ref, 'error')
+ 
+         now = utils.utcnow()
+         self.db.volume_update(context,
+@@ -181,10 +181,10 @@ class VolumeManager(manager.SchedulerDependentManager):
+                                   {'status': 'available'})
+             return True
+         except Exception:
+-            self.db.volume_update(context,
+-                                  volume_ref['id'],
+-                                  {'status': 'error_deleting'})
+-            raise
++            with utils.save_and_reraise_exception():
++                self.db.volume_update(context,
++                                      volume_ref['id'],
++                                      {'status': 'error_deleting'})
+ 
+         self.db.volume_destroy(context, volume_id)
+         LOG.debug(_("volume %s: deleted successfully"), volume_ref['name'])
+@@ -205,9 +205,10 @@ class VolumeManager(manager.SchedulerDependentManager):
+                                         model_update)
+ 
+         except Exception:
+-            self.db.snapshot_update(context,
+-                                    snapshot_ref['id'], {'status': 'error'})
+-            raise
++            with utils.save_and_reraise_exception():
++                self.db.snapshot_update(context,
++                                        snapshot_ref['id'],
++                                        {'status': 'error'})
+ 
+         self.db.snapshot_update(context,
+                                 snapshot_ref['id'], {'status': 'available',
+@@ -224,10 +225,10 @@ class VolumeManager(manager.SchedulerDependentManager):
+             LOG.debug(_("snapshot %s: deleting"), snapshot_ref['name'])
+             self.driver.delete_snapshot(snapshot_ref)
+         except Exception:
+-            self.db.snapshot_update(context,
+-                                    snapshot_ref['id'],
+-                                    {'status': 'error_deleting'})
+-            raise
++            with utils.save_and_reraise_exception():
++                self.db.snapshot_update(context,
++                                        snapshot_ref['id'],
++                                        {'status': 'error_deleting'})
+ 
+         self.db.snapshot_destroy(context, snapshot_id)
+         LOG.debug(_("snapshot %s: deleted successfully"), snapshot_ref['name'])
+-- 
+1.7.6.5
+
diff --git a/0057-Make-run-instances-respect-availability-zone.patch b/0057-Make-run-instances-respect-availability-zone.patch
new file mode 100644
index 0000000..b44a113
--- /dev/null
+++ b/0057-Make-run-instances-respect-availability-zone.patch
@@ -0,0 +1,78 @@
+From d0b0f76b2b90866b20c2a7cd4d230308972d512a Mon Sep 17 00:00:00 2001
+From: Vishvananda Ishaya <vishvananda at gmail.com>
+Date: Fri, 11 Nov 2011 11:37:03 -0800
+Subject: [PATCH 57/94] Make run instances respect availability zone
+
+ * includes test
+ * fixes bug 888918
+ * cherry picked from b6644ffe4360a9d55e138e20e0d453e8ffb2c718
+ * test had to be updated
+
+Change-Id: I40985e9dcc153fae53675f3da5e2d5b5763cfca3
+---
+ nova/api/ec2/cloud.py    |    2 +-
+ nova/tests/test_cloud.py |   35 +++++++++++++++++++++++++++++++++++
+ 2 files changed, 36 insertions(+), 1 deletions(-)
+
+diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py
+index b9fc7a0..79d603c 100644
+--- a/nova/api/ec2/cloud.py
++++ b/nova/api/ec2/cloud.py
+@@ -1398,7 +1398,7 @@ class CloudController(object):
+             user_data=kwargs.get('user_data'),
+             security_group=kwargs.get('security_group'),
+             availability_zone=kwargs.get('placement', {}).get(
+-                                  'AvailabilityZone'),
++                                  'availability_zone'),
+             block_device_mapping=kwargs.get('block_device_mapping', {}))
+         return self._format_run_instances(context,
+                 reservation_id=instances[0]['reservation_id'])
+diff --git a/nova/tests/test_cloud.py b/nova/tests/test_cloud.py
+index cc85cbd..fa45974 100644
+--- a/nova/tests/test_cloud.py
++++ b/nova/tests/test_cloud.py
+@@ -1103,6 +1103,41 @@ class CloudTestCase(test.TestCase):
+         self.assertEqual(instance['instanceState']['name'], 'running')
+         self.assertEqual(instance['instanceType'], 'm1.small')
+ 
++    def test_run_instances_availability_zone(self):
++        kwargs = {'image_id': 'ami-00000001',
++                  'instance_type': FLAGS.default_instance_type,
++                  'max_count': 1,
++                  'placement': {'availability_zone': 'fake'},
++                 }
++        run_instances = self.cloud.run_instances
++
++        def fake_show(self, context, id):
++            return {'id': 'cedef40a-ed67-4d10-800e-17455edce175',
++                    'properties': {
++                        'kernel_id': 'cedef40a-ed67-4d10-800e-17455edce175',
++                        'type': 'machine'},
++                    'container_format': 'ami',
++                    'status': 'active'}
++
++        self.stubs.Set(fake._FakeImageService, 'show', fake_show)
++        # NOTE(comstud): Make 'cast' behave like a 'call' which will
++        # ensure that operations complete
++        self.stubs.Set(rpc, 'cast', rpc.call)
++
++        def fake_format(*args, **kwargs):
++            pass
++
++        self.stubs.Set(self.cloud, '_format_run_instances', fake_format)
++
++        def fake_create(*args, **kwargs):
++            self.assertEqual(kwargs['availability_zone'], 'fake')
++            return ([{'id': 'fake-instance', 'reservation_id': 'fake-res-id'}])
++
++        self.stubs.Set(self.cloud.compute_api, 'create', fake_create)
++
++        # NOTE(vish) the assert for this call is in the fake_create method.
++        run_instances(self.context, **kwargs)
++
+     def test_run_instances_image_state_none(self):
+         kwargs = {'image_id': FLAGS.default_image,
+                   'instance_type': FLAGS.default_instance_type,
+-- 
+1.7.6.5
+
diff --git a/0058-Makes-rpc_allocate_fixed_ip-return-properly.patch b/0058-Makes-rpc_allocate_fixed_ip-return-properly.patch
new file mode 100644
index 0000000..f45fce4
--- /dev/null
+++ b/0058-Makes-rpc_allocate_fixed_ip-return-properly.patch
@@ -0,0 +1,74 @@
+From 1e3b88ba20b9f9ab925ecd1238845adbc0157cb1 Mon Sep 17 00:00:00 2001
+From: Vishvananda Ishaya <vishvananda at gmail.com>
+Date: Mon, 28 Nov 2011 14:42:38 -0800
+Subject: [PATCH 58/94] Makes rpc_allocate_fixed_ip return properly
+
+ * Fixes bug 855030
+ * Includes test
+
+Change-Id: If5b874fb0e4abd567445e67141d61942866cc5ec
+---
+ nova/network/manager.py    |    2 +-
+ nova/tests/test_network.py |   33 +++++++++++++++++++++++++++++++++
+ 2 files changed, 34 insertions(+), 1 deletions(-)
+
+diff --git a/nova/network/manager.py b/nova/network/manager.py
+index c6155f2..4fa4d47 100644
+--- a/nova/network/manager.py
++++ b/nova/network/manager.py
+@@ -179,7 +179,7 @@ class RPCAllocateFixedIP(object):
+         perform network lookup on the far side of rpc.
+         """
+         network = self.db.network_get(context, network_id)
+-        self.allocate_fixed_ip(context, instance_id, network, **kwargs)
++        return self.allocate_fixed_ip(context, instance_id, network, **kwargs)
+ 
+ 
+ class FloatingIP(object):
+diff --git a/nova/tests/test_network.py b/nova/tests/test_network.py
+index dbf934e..32502ea 100644
+--- a/nova/tests/test_network.py
++++ b/nova/tests/test_network.py
+@@ -731,6 +731,39 @@ class CommonNetworkTestCase(test.TestCase):
+         self.assertTrue(manager.create_networks(*args))
+ 
+ 
++class TestRPCFixedManager(network_manager.RPCAllocateFixedIP,
++        network_manager.NetworkManager):
++    """Dummy manager that implements RPCAllocateFixedIP"""
++
++
++class RPCAllocateTestCase(test.TestCase):
++    """Tests nova.network.manager.RPCAllocateFixedIP"""
++    def setUp(self):
++        super(RPCAllocateTestCase, self).setUp()
++        self.rpc_fixed = TestRPCFixedManager()
++        self.context = context.RequestContext('fake', 'fake')
++
++    def test_rpc_allocate(self):
++        """Test to verify bug 855030 doesn't resurface.
++
++        Mekes sure _rpc_allocate_fixed_ip returns a value so the call
++        returns properly and the greenpool completes."""
++        address = '10.10.10.10'
++
++        def fake_allocate(*args, **kwargs):
++            return address
++
++        def fake_network_get(*args, **kwargs):
++            return {}
++
++        self.stubs.Set(self.rpc_fixed, 'allocate_fixed_ip', fake_allocate)
++        self.stubs.Set(self.rpc_fixed.db, 'network_get', fake_network_get)
++        rval = self.rpc_fixed._rpc_allocate_fixed_ip(self.context,
++                                                     'fake_instance',
++                                                     'fake_network')
++        self.assertEqual(rval, address)
++
++
+ class TestFloatingIPManager(network_manager.FloatingIP,
+         network_manager.NetworkManager):
+     """Dummy manager that implements FloatingIP"""
+-- 
+1.7.6.5
+
diff --git a/0059-Update-exception.wrap_exception-so-that-all-exceptio.patch b/0059-Update-exception.wrap_exception-so-that-all-exceptio.patch
new file mode 100644
index 0000000..c7aa6d5
--- /dev/null
+++ b/0059-Update-exception.wrap_exception-so-that-all-exceptio.patch
@@ -0,0 +1,66 @@
+From d05c2e6d33f40dac1aa373fcceb819d97d9e3467 Mon Sep 17 00:00:00 2001
+From: Dan Prince <dan.prince at rackspace.com>
+Date: Thu, 15 Sep 2011 22:53:42 -0400
+Subject: [PATCH 59/94] Update exception.wrap_exception so that all exceptions
+ (not just Error and NovaException types) get logged
+ correctly.
+
+(cherry picked from commit 19b3b7a0c50dd6a68238daf8827519fd83a395cc)
+
+Change-Id: I37aef06551a5ea4e29960bd80aeb0415d945fe95
+---
+ nova/exception.py            |    7 -------
+ nova/tests/test_exception.py |    7 +++----
+ 2 files changed, 3 insertions(+), 11 deletions(-)
+
+diff --git a/nova/exception.py b/nova/exception.py
+index 50477af..7b1531b 100644
+--- a/nova/exception.py
++++ b/nova/exception.py
+@@ -123,13 +123,6 @@ def wrap_exception(notifier=None, publisher_id=None, event_type=None,
+                     notifier.notify(publisher_id, temp_type, temp_level,
+                                     payload)
+ 
+-                if (not isinstance(e, Error) and
+-                    not isinstance(e, NovaException)):
+-                    #exc_type, exc_value, exc_traceback = sys.exc_info()
+-                    LOG.exception(_('Uncaught exception'))
+-                    #logging.error(traceback.extract_stack(exc_traceback))
+-                    raise Error(str(e))
+-
+                 # re-raise original exception since it may have been clobbered
+                 raise exc_info[0], exc_info[1], exc_info[2]
+ 
+diff --git a/nova/tests/test_exception.py b/nova/tests/test_exception.py
+index cd74f88..d3bc1f6 100644
+--- a/nova/tests/test_exception.py
++++ b/nova/tests/test_exception.py
+@@ -74,14 +74,13 @@ class WrapExceptionTestCase(test.TestCase):
+ 
+     def test_wrap_exception_throws_exception(self):
+         wrapped = exception.wrap_exception()
+-        # Note that Exception is converted to Error ...
+-        self.assertRaises(exception.Error, wrapped(bad_function_exception))
++        self.assertRaises(Exception, wrapped(bad_function_exception))
+ 
+     def test_wrap_exception_with_notifier(self):
+         notifier = FakeNotifier()
+         wrapped = exception.wrap_exception(notifier, "publisher", "event",
+                                            "level")
+-        self.assertRaises(exception.Error, wrapped(bad_function_exception))
++        self.assertRaises(Exception, wrapped(bad_function_exception))
+         self.assertEquals(notifier.provided_publisher, "publisher")
+         self.assertEquals(notifier.provided_event, "event")
+         self.assertEquals(notifier.provided_priority, "level")
+@@ -91,7 +90,7 @@ class WrapExceptionTestCase(test.TestCase):
+     def test_wrap_exception_with_notifier_defaults(self):
+         notifier = FakeNotifier()
+         wrapped = exception.wrap_exception(notifier)
+-        self.assertRaises(exception.Error, wrapped(bad_function_exception))
++        self.assertRaises(Exception, wrapped(bad_function_exception))
+         self.assertEquals(notifier.provided_publisher, None)
+         self.assertEquals(notifier.provided_event, "bad_function_exception")
+         self.assertEquals(notifier.provided_priority, notifier.ERROR)
+-- 
+1.7.6.5
+
diff --git a/0060-Move-failed-instances-to-error-state.patch b/0060-Move-failed-instances-to-error-state.patch
new file mode 100644
index 0000000..996c269
--- /dev/null
+++ b/0060-Move-failed-instances-to-error-state.patch
@@ -0,0 +1,186 @@
+From 094ea6bf60c1edec84571bfe2d2d17fc554608c2 Mon Sep 17 00:00:00 2001
+From: Aaron Lee <aaron.lee at rackspace.com>
+Date: Thu, 3 Nov 2011 15:05:30 -0500
+Subject: [PATCH 60/94] Move failed instances to error state
+
+On instance creation there is the possibility of
+an instance raising. This would not cause the
+instance to be moved to the error state. This
+patch fixes that. lp885323
+
+update 1: fixing exception handling
+update 2: preserving the individual messages
+update 3: rebase on master & fix spacing
+
+(cherry picked from commit c04b431cd63f4d934f40dd1f62a9107ae6dfde90)
+
+Change-Id: I7584b527e408c08014f1b6a8abda343f1e2aa3b8
+---
+ nova/compute/manager.py    |   41 ++++++++++++++++++++++++------------
+ nova/tests/test_compute.py |   49 ++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 76 insertions(+), 14 deletions(-)
+
+diff --git a/nova/compute/manager.py b/nova/compute/manager.py
+index 69dea2e..1196d98 100644
+--- a/nova/compute/manager.py
++++ b/nova/compute/manager.py
+@@ -35,6 +35,7 @@ terminating it.
+ 
+ """
+ 
++import contextlib
+ import os
+ import socket
+ import sys
+@@ -396,6 +397,23 @@ class ComputeManager(manager.SchedulerDependentManager):
+                 self.network_api.deallocate_for_instance(context,
+                                     instance)
+ 
++        def _cleanup():
++            with utils.save_and_reraise_exception():
++                self._instance_update(context,
++                                      instance_id,
++                                      vm_state=vm_states.ERROR)
++                if network_info is not None:
++                    _deallocate_network()
++
++        @contextlib.contextmanager
++        def _logging_error(instance_id, message):
++            try:
++                yield
++            except Exception as error:
++                with utils.save_and_reraise_exception():
++                    LOG.exception(_("Instance '%(instance_id)s' "
++                                   "failed %(message)s.") % locals())
++
+         context = context.elevated()
+         instance = self.db.instance_get(context, instance_id)
+ 
+@@ -418,14 +436,17 @@ class ComputeManager(manager.SchedulerDependentManager):
+         instance['admin_pass'] = kwargs.get('admin_password', None)
+ 
+         is_vpn = instance['image_ref'] == str(FLAGS.vpn_image_id)
+-        network_info = _make_network_info()
+         try:
++            network_info = None
++            with _logging_error(instance_id, "network setup"):
++                network_info = _make_network_info()
++
+             self._instance_update(context,
+                                   instance_id,
+                                   vm_state=vm_states.BUILDING,
+                                   task_state=task_states.BLOCK_DEVICE_MAPPING)
+-
+-            block_device_info = _make_block_device_info()
++            with _logging_error(instance_id, "block device setup"):
++                block_device_info = _make_block_device_info()
+ 
+             self._instance_update(context,
+                                   instance_id,
+@@ -433,16 +454,9 @@ class ComputeManager(manager.SchedulerDependentManager):
+                                   task_state=task_states.SPAWNING)
+ 
+             # TODO(vish) check to make sure the availability zone matches
+-            try:
++            with _logging_error(instance_id, "failed to spawn"):
+                 self.driver.spawn(context, instance,
+                                   network_info, block_device_info)
+-            except Exception as ex:  # pylint: disable=W0702
+-                msg = _("Instance '%(instance_id)s' failed to spawn. Is "
+-                        "virtualization enabled in the BIOS? Details: "
+-                        "%(ex)s") % locals()
+-                LOG.exception(msg)
+-                _deallocate_network()
+-                return
+ 
+             current_power_state = self._get_power_state(context, instance)
+             self._instance_update(context,
+@@ -463,9 +477,8 @@ class ComputeManager(manager.SchedulerDependentManager):
+             # deleted before it actually got created.  This should
+             # be fixed once we have no-db-messaging
+             pass
+-        except:
+-            with utils.save_and_reraise_exception():
+-                _deallocate_network()
++        except Exception:
++            _cleanup()
+ 
+     @exception.wrap_exception(notifier=notifier, publisher_id=publisher_id())
+     def run_instance(self, context, instance_id, **kwargs):
+diff --git a/nova/tests/test_compute.py b/nova/tests/test_compute.py
+index 67dbe5e..d32c5df 100644
+--- a/nova/tests/test_compute.py
++++ b/nova/tests/test_compute.py
+@@ -20,6 +20,8 @@
+ Tests For Compute
+ """
+ 
++import mox
++
+ from nova import compute
+ from nova.compute import instance_types
+ from nova.compute import manager as compute_manager
+@@ -38,6 +40,8 @@ from nova import rpc
+ from nova import test
+ from nova import utils
+ from nova.notifier import test_notifier
++from nova.network.quantum import client as quantum_client
++
+ 
+ LOG = logging.getLogger('nova.tests.compute')
+ FLAGS = flags.FLAGS
+@@ -467,6 +471,51 @@ class ComputeTestCase(test.TestCase):
+                           instance_id)
+         self.compute.terminate_instance(self.context, instance_id)
+ 
++    def test_instance_set_to_error_on_uncaught_exception(self):
++        """Test that instance is set to error state when exception is raised"""
++        instance_id = self._create_instance()
++
++        self.mox.StubOutWithMock(self.compute.network_api,
++                                 "allocate_for_instance")
++        self.compute.network_api.allocate_for_instance(mox.IgnoreArg(),
++                                                       mox.IgnoreArg(),
++                                                       requested_networks=None,
++                                                       vpn=False).\
++            AndRaise(quantum_client.QuantumServerException())
++
++        FLAGS.stub_network = False
++
++        self.mox.ReplayAll()
++
++        self.assertRaises(quantum_client.QuantumServerException,
++                          self.compute.run_instance,
++                          self.context,
++                          instance_id)
++
++        instances = db.instance_get_all(context.get_admin_context())
++        self.assertEqual(vm_states.ERROR, instances[0]['vm_state'])
++
++        FLAGS.stub_network = True
++        self.compute.terminate_instance(self.context, instance_id)
++
++    def test_network_is_deallocated_on_spawn_failure(self):
++        """When a spawn fails the network must be deallocated"""
++        instance_id = self._create_instance()
++
++        self.mox.StubOutWithMock(self.compute, "_setup_block_device_mapping")
++        self.compute._setup_block_device_mapping(mox.IgnoreArg(),
++                                                 mox.IgnoreArg()).\
++            AndRaise(rpc.common.RemoteError('', '', ''))
++
++        self.mox.ReplayAll()
++
++        self.assertRaises(rpc.common.RemoteError,
++                          self.compute.run_instance,
++                          self.context,
++                          instance_id)
++
++        self.compute.terminate_instance(self.context, instance_id)
++
+     def test_lock(self):
+         """ensure locked instance cannot be changed"""
+         instance_id = self._create_instance()
+-- 
+1.7.6.5
+
diff --git a/0061-Fixes-LP878319.patch b/0061-Fixes-LP878319.patch
new file mode 100644
index 0000000..a1b3919
--- /dev/null
+++ b/0061-Fixes-LP878319.patch
@@ -0,0 +1,152 @@
+From 5423f1a88c105ac2214e6d77d99cbc0efb582282 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jason=20K=C3=B6lker?= <jason at koelker.net>
+Date: Fri, 4 Nov 2011 16:37:09 -0500
+Subject: [PATCH 61/94] Fixes LP878319
+
+* Adds lookup of host version in XenAPI session
+* Add call to determine function name of resize
+
+(cherry picked from commit bee61b32420a2b8ce982406cd6c9647098bdf70b)
+
+Change-Id: I797ff2ea34a3b3fde1091efba803a4572aaf1ede
+---
+ nova/tests/test_xenapi.py  |   17 +++++++++++++++++
+ nova/tests/xenapi/stubs.py |    8 ++++++--
+ nova/virt/xenapi/fake.py   |    2 ++
+ nova/virt/xenapi/vmops.py  |    9 +++++++--
+ nova/virt/xenapi_conn.py   |   11 ++++++++++-
+ 5 files changed, 42 insertions(+), 5 deletions(-)
+
+diff --git a/nova/tests/test_xenapi.py b/nova/tests/test_xenapi.py
+index 82226e6..a2ccfeb 100644
+--- a/nova/tests/test_xenapi.py
++++ b/nova/tests/test_xenapi.py
+@@ -751,6 +751,23 @@ class XenAPIMigrateInstance(test.TestCase):
+         stubs.stubout_get_this_vm_uuid(self.stubs)
+         glance_stubs.stubout_glance_client(self.stubs)
+ 
++    def test_resize_xenserver_6(self):
++        instance = db.instance_create(self.context, self.values)
++        called = {'resize': False}
++
++        def fake_vdi_resize(*args, **kwargs):
++            called['resize'] = True
++
++        self.stubs.Set(stubs.FakeSessionForMigrationTests,
++                       "VDI_resize", fake_vdi_resize)
++        stubs.stubout_session(self.stubs,
++                              stubs.FakeSessionForMigrationTests,
++                              product_version=(6, 0, 0))
++        stubs.stubout_loopingcall_start(self.stubs)
++        conn = xenapi_conn.get_connection(False)
++        conn._vmops.resize_instance(instance, '')
++        self.assertEqual(called['resize'], True)
++
+     def test_migrate_disk_and_power_off(self):
+         instance = db.instance_create(self.context, self.values)
+         stubs.stubout_session(self.stubs, stubs.FakeSessionForMigrationTests)
+diff --git a/nova/tests/xenapi/stubs.py b/nova/tests/xenapi/stubs.py
+index 49cdc1f..796c047 100644
+--- a/nova/tests/xenapi/stubs.py
++++ b/nova/tests/xenapi/stubs.py
+@@ -57,8 +57,8 @@ def stubout_instance_snapshot(stubs):
+     stubs.Set(vm_utils, 'wait_for_vhd_coalesce', fake_wait_for_vhd_coalesce)
+ 
+ 
+-def stubout_session(stubs, cls):
+-    """Stubs out two methods from XenAPISession"""
++def stubout_session(stubs, cls, product_version=None):
++    """Stubs out three methods from XenAPISession"""
+     def fake_import(self):
+         """Stubs out get_imported_xenapi of XenAPISession"""
+         fake_module = 'nova.virt.xenapi.fake'
+@@ -69,6 +69,10 @@ def stubout_session(stubs, cls):
+                        lambda s, url: cls(url))
+     stubs.Set(xenapi_conn.XenAPISession, 'get_imported_xenapi',
+                        fake_import)
++    if product_version is None:
++        product_version = (5, 6, 2)
++    stubs.Set(xenapi_conn.XenAPISession, 'get_product_version',
++            lambda s: product_version)
+ 
+ 
+ def stub_out_get_target(stubs):
+diff --git a/nova/virt/xenapi/fake.py b/nova/virt/xenapi/fake.py
+index 475ed54..33cd61c 100644
+--- a/nova/virt/xenapi/fake.py
++++ b/nova/virt/xenapi/fake.py
+@@ -381,6 +381,8 @@ class SessionBase(object):
+     def VDI_resize_online(self, *args):
+         return 'derp'
+ 
++    VDI_resize = VDI_resize_online
++
+     def VM_clean_reboot(self, *args):
+         return 'burp'
+ 
+diff --git a/nova/virt/xenapi/vmops.py b/nova/virt/xenapi/vmops.py
+index 446b623..04e9c4b 100644
+--- a/nova/virt/xenapi/vmops.py
++++ b/nova/virt/xenapi/vmops.py
+@@ -75,12 +75,13 @@ class VMOps(object):
+     """
+     Management class for VM-related tasks
+     """
+-    def __init__(self, session):
++    def __init__(self, session, product_version):
+         self.XenAPI = session.get_imported_xenapi()
+         self._session = session
+         self.poll_rescue_last_ran = None
+         VMHelper.XenAPI = self.XenAPI
+         self.vif_driver = utils.import_object(FLAGS.xenapi_vif_driver)
++        self._product_version = product_version
+ 
+     def list_instances(self):
+         """List VM instances."""
+@@ -622,7 +623,11 @@ class VMOps(object):
+                         " GB") % locals())
+             vdi_ref = self._session.call_xenapi('VDI.get_by_uuid', vdi_uuid)
+             # for an instance with no local storage
+-            self._session.call_xenapi('VDI.resize_online', vdi_ref,
++            if self._product_version[0] > 5:
++                resize_func_name = 'VDI.resize'
++            else:
++                resize_func_name = 'VDI.resize_online'
++            self._session.call_xenapi(resize_func_name, vdi_ref,
+                     str(new_disk_size))
+             LOG.debug(_("Resize instance %s complete") % (instance.name))
+ 
+diff --git a/nova/virt/xenapi_conn.py b/nova/virt/xenapi_conn.py
+index 0d23e76..9f410ba 100644
+--- a/nova/virt/xenapi_conn.py
++++ b/nova/virt/xenapi_conn.py
+@@ -160,9 +160,10 @@ class XenAPIConnection(driver.ComputeDriver):
+     def __init__(self, url, user, pw):
+         super(XenAPIConnection, self).__init__()
+         self._session = XenAPISession(url, user, pw)
+-        self._vmops = VMOps(self._session)
+         self._volumeops = VolumeOps(self._session)
+         self._host_state = None
++        self._product_version = self._session.get_product_version()
++        self._vmops = VMOps(self._session, self._product_version)
+ 
+     @property
+     def HostState(self):
+@@ -361,6 +362,14 @@ class XenAPISession(object):
+         with timeout.Timeout(FLAGS.xenapi_login_timeout, exception):
+             self._session.login_with_password(user, pw)
+ 
++    def get_product_version(self):
++        """Return a tuple of (major, minor, rev) for the host version"""
++        host = self.get_xenapi_host()
++        software_version = self.call_xenapi('host.get_software_version',
++                                            host)
++        product_version = software_version['product_version']
++        return tuple(int(part) for part in product_version.split('.'))
++
+     def get_imported_xenapi(self):
+         """Stubout point. This can be replaced with a mock xenapi module."""
+         return __import__('XenAPI')
+-- 
+1.7.6.5
+
diff --git a/0062-Fixes-bug-871877.patch b/0062-Fixes-bug-871877.patch
new file mode 100644
index 0000000..ff5844e
--- /dev/null
+++ b/0062-Fixes-bug-871877.patch
@@ -0,0 +1,76 @@
+From 60cb0496c25f71d748bc8634cc13c8614d970df1 Mon Sep 17 00:00:00 2001
+From: Alvaro Lopez <aloga at ifca.unican.es>
+Date: Wed, 9 Nov 2011 16:18:39 +0100
+Subject: [PATCH 62/94] Fixes bug 871877
+
+Added an aditional testunit to the VlanNetworkTestCase to check
+if the FixedIpNotFoundForNetwork exception is raised properly.
+
+(cherry picked from commit 6e7b0387e417e4ef36b8ce1e0b7a7db32732838d)
+
+Change-Id: I92a0ca22aadcfa9a7fd434375e239be8ccf4f387
+---
+ Authors                    |    1 +
+ nova/network/manager.py    |    1 +
+ nova/tests/test_network.py |   14 ++++++++++++++
+ 3 files changed, 16 insertions(+), 0 deletions(-)
+
+diff --git a/Authors b/Authors
+index 08403b8..ab90964 100644
+--- a/Authors
++++ b/Authors
+@@ -4,6 +4,7 @@ Adam Johnson <adjohn at gmail.com>
+ Ahmad Hassan <ahmad.hassan at hp.com>
+ Alex Meade <alex.meade at rackspace.com>
+ Alexander Sakhnov <asakhnov at mirantis.com>
++Alvaro Lopez Garcia <aloga at ifca.unican.es>
+ Andrey Brindeyev <abrindeyev at griddynamics.com>
+ Andy Smith <code at term.ie>
+ Andy Southgate <andy.southgate at citrix.com>
+diff --git a/nova/network/manager.py b/nova/network/manager.py
+index 4fa4d47..b0befab 100644
+--- a/nova/network/manager.py
++++ b/nova/network/manager.py
+@@ -1025,6 +1025,7 @@ class VlanManager(RPCAllocateFixedIP, FloatingIP, NetworkManager):
+             self.db.fixed_ip_associate(context,
+                                        address,
+                                        instance_id,
++                                       network['id'],
+                                        reserved=True)
+         else:
+             address = kwargs.get('address', None)
+diff --git a/nova/tests/test_network.py b/nova/tests/test_network.py
+index 32502ea..f7aa684 100644
+--- a/nova/tests/test_network.py
++++ b/nova/tests/test_network.py
+@@ -309,6 +309,7 @@ class VlanNetworkTestCase(test.TestCase):
+         db.fixed_ip_associate(mox.IgnoreArg(),
+                               mox.IgnoreArg(),
+                               mox.IgnoreArg(),
++                              mox.IgnoreArg(),
+                               reserved=True).AndReturn('192.168.0.1')
+         db.fixed_ip_update(mox.IgnoreArg(),
+                            mox.IgnoreArg(),
+@@ -321,6 +322,19 @@ class VlanNetworkTestCase(test.TestCase):
+         network['vpn_private_address'] = '192.168.0.2'
+         self.network.allocate_fixed_ip(None, 0, network, vpn=True)
+ 
++    def test_vpn_allocate_fixed_ip_no_network_id(self):
++        network = dict(networks[0])
++        network['vpn_private_address'] = '192.168.0.2'
++        network['id'] = None
++        context_admin = context.RequestContext('testuser', 'testproject',
++                is_admin=True)
++        self.assertRaises(exception.FixedIpNotFoundForNetwork,
++                self.network.allocate_fixed_ip,
++                context_admin,
++                0,
++                network,
++                vpn=True)
++
+     def test_allocate_fixed_ip(self):
+         self.mox.StubOutWithMock(db, 'fixed_ip_associate_pool')
+         self.mox.StubOutWithMock(db, 'fixed_ip_update')
+-- 
+1.7.6.5
+
diff --git a/0063-nova-manage-exit-with-status-1-if-an-image-registrat.patch b/0063-nova-manage-exit-with-status-1-if-an-image-registrat.patch
new file mode 100644
index 0000000..43d84dc
--- /dev/null
+++ b/0063-nova-manage-exit-with-status-1-if-an-image-registrat.patch
@@ -0,0 +1,32 @@
+From 39fdf335961f19903f87a4d09fd49a777c9838f2 Mon Sep 17 00:00:00 2001
+From: Ewan Mellor <ewan.mellor at citrix.com>
+Date: Wed, 9 Nov 2011 23:24:25 -0800
+Subject: [PATCH 63/94] nova-manage: exit with status 1 if an image
+ registration fails
+
+This indicates the failure to the user through the exit status.
+
+Original author: Renuka Apte <renuka.apte at citrix.com>
+
+(cherry picked from commit d7e5a791503b67c53bd497b9cdebb19083630b14)
+
+Change-Id: I73fc2cc35530e7ee7f113f5aaec7b577663e4dc1
+---
+ bin/nova-manage |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/bin/nova-manage b/bin/nova-manage
+index 8a16202..3ff73f1 100755
+--- a/bin/nova-manage
++++ b/bin/nova-manage
+@@ -1810,6 +1810,7 @@ class ImageCommands(object):
+             return new
+         except Exception as exc:
+             print _("Failed to register %(path)s: %(exc)s") % locals()
++            sys.exit(1)
+ 
+     @args('--image', dest='image', metavar='<image>', help='Image')
+     @args('--kernel', dest='kernel', metavar='<kernel>', help='Kernel')
+-- 
+1.7.6.5
+
diff --git a/0064-Fix-a-notification-bug-when-creating-instances.patch b/0064-Fix-a-notification-bug-when-creating-instances.patch
new file mode 100644
index 0000000..204aaa3
--- /dev/null
+++ b/0064-Fix-a-notification-bug-when-creating-instances.patch
@@ -0,0 +1,56 @@
+From d565f3ad5917e90ab50a4b8ae9fe5079f70ed591 Mon Sep 17 00:00:00 2001
+From: "Kevin L. Mitchell" <kevin.mitchell at rackspace.com>
+Date: Thu, 10 Nov 2011 17:35:44 -0600
+Subject: [PATCH 64/94] Fix a notification bug when creating instances
+
+Fixes a notifier bug that caused 'launched_at' to be empty and
+state to be reported as 'building', due to failure to refresh
+instance data prior to generating the notification.  Fixes
+bug 834867.
+
+(cherry picked from commit 57e73d374843cade854f07a228192c4f496507ff)
+
+Change-Id: I70fbf3c67407c67b69040ee481ca6d51212cc55d
+---
+ nova/compute/manager.py    |   12 ++++++------
+ nova/tests/test_compute.py |    1 +
+ 2 files changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/nova/compute/manager.py b/nova/compute/manager.py
+index 69dea2e..5203fc3 100644
+--- a/nova/compute/manager.py
++++ b/nova/compute/manager.py
+@@ -445,12 +445,12 @@ class ComputeManager(manager.SchedulerDependentManager):
+                 return
+ 
+             current_power_state = self._get_power_state(context, instance)
+-            self._instance_update(context,
+-                                  instance_id,
+-                                  power_state=current_power_state,
+-                                  vm_state=vm_states.ACTIVE,
+-                                  task_state=None,
+-                                  launched_at=utils.utcnow())
++            instance = self._instance_update(context,
++                                             instance_id,
++                                             power_state=current_power_state,
++                                             vm_state=vm_states.ACTIVE,
++                                             task_state=None,
++                                             launched_at=utils.utcnow())
+ 
+             usage_info = utils.usage_from_instance(instance)
+             notifier.notify('compute.%s' % self.host,
+diff --git a/nova/tests/test_compute.py b/nova/tests/test_compute.py
+index 67dbe5e..a791d52 100644
+--- a/nova/tests/test_compute.py
++++ b/nova/tests/test_compute.py
+@@ -431,6 +431,7 @@ class ComputeTestCase(test.TestCase):
+         self.assertTrue('display_name' in payload)
+         self.assertTrue('created_at' in payload)
+         self.assertTrue('launched_at' in payload)
++        self.assertTrue(payload['launched_at'])
+         self.assertEquals(payload['image_ref'], '1')
+         self.compute.terminate_instance(self.context, instance_id)
+ 
+-- 
+1.7.6.5
+
diff --git a/0065-fix-rebuild-sha1-not-string-error.patch b/0065-fix-rebuild-sha1-not-string-error.patch
new file mode 100644
index 0000000..b50d554
--- /dev/null
+++ b/0065-fix-rebuild-sha1-not-string-error.patch
@@ -0,0 +1,61 @@
+From ce4ea1f35c2d73b644498f4f06b46c75abd9b08d Mon Sep 17 00:00:00 2001
+From: David Subiros <david.perez5 at hp.com>
+Date: Tue, 4 Oct 2011 13:12:40 +0100
+Subject: [PATCH 65/94] fix rebuild sha1 not string error
+
+fixes bug #889164
+The sha1() parameter is converted to a string
+before calling the funcion.
+
+(cherry picked from commit 17ae2d2662ca9af6eee0cf96fe48d3951593dc6b)
+
+Change-Id: I9cb6ff43c106c214e027d3bdacb795b4b0269f94
+---
+ nova/tests/test_libvirt.py      |   10 ++++++++--
+ nova/virt/libvirt/connection.py |    2 +-
+ 2 files changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/nova/tests/test_libvirt.py b/nova/tests/test_libvirt.py
+index f59b2f7..b44bde2 100644
+--- a/nova/tests/test_libvirt.py
++++ b/nova/tests/test_libvirt.py
+@@ -926,7 +926,10 @@ class LibvirtConnTestCase(test.TestCase):
+             return
+ 
+         self.create_fake_libvirt_mock()
+-        instance = db.instance_create(self.context, self.test_instance)
++
++        instance_ref = self.test_instance
++        instance_ref['image_ref'] = 123456  # we send an int to test sha1 call
++        instance = db.instance_create(self.context, instance_ref)
+ 
+         # Start test
+         self.mox.ReplayAll()
+@@ -939,7 +942,10 @@ class LibvirtConnTestCase(test.TestCase):
+         try:
+             conn.spawn(self.context, instance, network_info)
+         except Exception, e:
+-            count = (0 <= str(e.message).find('Unexpected method call'))
++            # assert that no exception is raised due to sha1 receiving an int
++            self.assertEqual(-1, str(e).find('must be string or buffer'
++                                             ', not int'))
++            count = (0 <= str(e).find('Unexpected method call'))
+ 
+         shutil.rmtree(os.path.join(FLAGS.instances_path, instance.name))
+         shutil.rmtree(os.path.join(FLAGS.instances_path, '_base'))
+diff --git a/nova/virt/libvirt/connection.py b/nova/virt/libvirt/connection.py
+index ba1dc86..333ae49 100644
+--- a/nova/virt/libvirt/connection.py
++++ b/nova/virt/libvirt/connection.py
+@@ -866,7 +866,7 @@ class LibvirtConnection(driver.ComputeDriver):
+                                   user_id=inst['user_id'],
+                                   project_id=inst['project_id'])
+ 
+-        root_fname = hashlib.sha1(disk_images['image_id']).hexdigest()
++        root_fname = hashlib.sha1(str(disk_images['image_id'])).hexdigest()
+         size = FLAGS.minimum_root_size
+ 
+         inst_type_id = inst['instance_type_id']
+-- 
+1.7.6.5
+
diff --git a/0066-Verify-security-group-parameters.patch b/0066-Verify-security-group-parameters.patch
new file mode 100644
index 0000000..51aedd8
--- /dev/null
+++ b/0066-Verify-security-group-parameters.patch
@@ -0,0 +1,307 @@
+From bcf241259246179035f20649f947b99b21d7978a Mon Sep 17 00:00:00 2001
+From: Ahmad Hassan <ahmad.hassan at hp.com>
+Date: Fri, 30 Sep 2011 15:10:33 +0100
+Subject: [PATCH 66/94] Verify security group parameters
+
+Introduced various sanity checks before adding security group rule
+into the database. The checks have been implemented both in EC2 and
+openstack extension code.
+Implemented the suggestions made in first patch by Brian
+Fixed the unit tests in security groups
+Fixed pep8 issues in security group unit tests
+
+Fixes bug 869979.
+
+(cherry picked from commit 1a12349c056b52b488591abb1671ad94a6db6526)
+
+Change-Id: I2ac28666e90e7bdeacb7b1c2676c0719cfb9e441
+---
+ nova/api/ec2/cloud.py                         |   44 +++++++++++++++++++----
+ nova/api/openstack/contrib/security_groups.py |   42 +++++++++++++++++----
+ nova/exception.py                             |    2 +-
+ nova/tests/test_api.py                        |   48 ++++++++++++++++++++++++-
+ nova/utils.py                                 |   21 +++++++++++
+ 5 files changed, 140 insertions(+), 17 deletions(-)
+
+diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py
+index 79d603c..64fce0c 100644
+--- a/nova/api/ec2/cloud.py
++++ b/nova/api/ec2/cloud.py
+@@ -23,7 +23,6 @@ datastore.
+ """
+ 
+ import base64
+-import netaddr
+ import os
+ import re
+ import shutil
+@@ -692,22 +691,53 @@ class CloudController(object):
+         elif cidr_ip:
+             # If this fails, it throws an exception. This is what we want.
+             cidr_ip = urllib.unquote(cidr_ip).decode()
+-            netaddr.IPNetwork(cidr_ip)
++
++            if not utils.is_valid_cidr(cidr_ip):
++                # Raise exception for non-valid address
++                raise exception.InvalidCidr(cidr=cidr_ip)
++
+             values['cidr'] = cidr_ip
+         else:
+             values['cidr'] = '0.0.0.0/0'
+ 
+         if ip_protocol and from_port and to_port:
+-            from_port = int(from_port)
+-            to_port = int(to_port)
++
+             ip_protocol = str(ip_protocol)
++            try:
++                # Verify integer conversions
++                from_port = int(from_port)
++                to_port = int(to_port)
++            except ValueError:
++                if ip_protocol.upper() == 'ICMP':
++                    raise exception.InvalidInput(reason="Type and"
++                         " Code must be integers for ICMP protocol type")
++                else:
++                    raise exception.InvalidInput(reason="To and From ports "
++                          "must be integers")
+ 
+             if ip_protocol.upper() not in ['TCP', 'UDP', 'ICMP']:
+                 raise exception.InvalidIpProtocol(protocol=ip_protocol)
+-            if ((min(from_port, to_port) < -1) or
+-                (max(from_port, to_port) > 65535)):
++
++            # Verify that from_port must always be less than
++            # or equal to to_port
++            if from_port > to_port:
++                raise exception.InvalidPortRange(from_port=from_port,
++                      to_port=to_port, msg="Former value cannot"
++                                            " be greater than the later")
++
++            # Verify valid TCP, UDP port ranges
++            if (ip_protocol.upper() in ['TCP', 'UDP'] and
++                (from_port < 1 or to_port > 65535)):
++                raise exception.InvalidPortRange(from_port=from_port,
++                      to_port=to_port, msg="Valid TCP ports should"
++                                           " be between 1-65535")
++
++            # Verify ICMP type and code
++            if (ip_protocol.upper() == "ICMP" and
++                (from_port < -1 or to_port > 255)):
+                 raise exception.InvalidPortRange(from_port=from_port,
+-                                                 to_port=to_port)
++                      to_port=to_port, msg="For ICMP, the"
++                                           " type:code must be valid")
+ 
+             values['protocol'] = ip_protocol
+             values['from_port'] = from_port
+diff --git a/nova/api/openstack/contrib/security_groups.py b/nova/api/openstack/contrib/security_groups.py
+index 1fd64f3..e8f1f2c 100644
+--- a/nova/api/openstack/contrib/security_groups.py
++++ b/nova/api/openstack/contrib/security_groups.py
+@@ -15,7 +15,6 @@
+ 
+ """The security groups extension."""
+ 
+-import netaddr
+ import urllib
+ from webob import exc
+ import webob
+@@ -26,6 +25,7 @@ from nova import exception
+ from nova import flags
+ from nova import log as logging
+ from nova import rpc
++from nova import utils
+ from nova.api.openstack import common
+ from nova.api.openstack import extensions
+ from nova.api.openstack import wsgi
+@@ -270,28 +270,54 @@ class SecurityGroupRulesController(SecurityGroupController):
+             # If this fails, it throws an exception. This is what we want.
+             try:
+                 cidr = urllib.unquote(cidr).decode()
+-                netaddr.IPNetwork(cidr)
+             except Exception:
+                 raise exception.InvalidCidr(cidr=cidr)
++
++            if not utils.is_valid_cidr(cidr):
++                # Raise exception for non-valid address
++                raise exception.InvalidCidr(cidr=cidr)
++
+             values['cidr'] = cidr
+         else:
+             values['cidr'] = '0.0.0.0/0'
+ 
+         if ip_protocol and from_port and to_port:
+ 
++            ip_protocol = str(ip_protocol)
+             try:
+                 from_port = int(from_port)
+                 to_port = int(to_port)
+             except ValueError:
+-                raise exception.InvalidPortRange(from_port=from_port,
+-                                                 to_port=to_port)
+-            ip_protocol = str(ip_protocol)
++                if ip_protocol.upper() == 'ICMP':
++                    raise exception.InvalidInput(reason="Type and"
++                         " Code must be integers for ICMP protocol type")
++                else:
++                    raise exception.InvalidInput(reason="To and From ports "
++                          "must be integers")
++
+             if ip_protocol.upper() not in ['TCP', 'UDP', 'ICMP']:
+                 raise exception.InvalidIpProtocol(protocol=ip_protocol)
+-            if ((min(from_port, to_port) < -1) or
+-                       (max(from_port, to_port) > 65535)):
++
++            # Verify that from_port must always be less than
++            # or equal to to_port
++            if from_port > to_port:
++                raise exception.InvalidPortRange(from_port=from_port,
++                      to_port=to_port, msg="Former value cannot"
++                                            " be greater than the later")
++
++            # Verify valid TCP, UDP port ranges
++            if (ip_protocol.upper() in ['TCP', 'UDP'] and
++                (from_port < 1 or to_port > 65535)):
++                raise exception.InvalidPortRange(from_port=from_port,
++                      to_port=to_port, msg="Valid TCP ports should"
++                                           " be between 1-65535")
++
++            # Verify ICMP type and code
++            if (ip_protocol.upper() == "ICMP" and
++                (from_port < -1 or to_port > 255)):
+                 raise exception.InvalidPortRange(from_port=from_port,
+-                                                 to_port=to_port)
++                      to_port=to_port, msg="For ICMP, the"
++                                           " type:code must be valid")
+ 
+             values['protocol'] = ip_protocol
+             values['from_port'] = from_port
+diff --git a/nova/exception.py b/nova/exception.py
+index 50477af..2e7fb70 100644
+--- a/nova/exception.py
++++ b/nova/exception.py
+@@ -217,7 +217,7 @@ class InvalidVolumeType(Invalid):
+ 
+ 
+ class InvalidPortRange(Invalid):
+-    message = _("Invalid port range %(from_port)s:%(to_port)s.")
++    message = _("Invalid port range %(from_port)s:%(to_port)s. %(msg)s")
+ 
+ 
+ class InvalidIpProtocol(Invalid):
+diff --git a/nova/tests/test_api.py b/nova/tests/test_api.py
+index e9f1145..2d3d4b6 100644
+--- a/nova/tests/test_api.py
++++ b/nova/tests/test_api.py
+@@ -386,6 +386,50 @@ class ApiEc2TestCase(test.TestCase):
+         group.connection = self.ec2
+ 
+         group.authorize('tcp', 80, 81, '0.0.0.0/0')
++        group.authorize('icmp', -1, -1, '0.0.0.0/0')
++        group.authorize('udp', 80, 81, '0.0.0.0/0')
++        # Invalid CIDR address
++        self.assertRaises(Exception,
++                          group.authorize, 'tcp', 80, 81, '0.0.0.0/0444')
++        # Missing ports
++        self.assertRaises(Exception,
++                          group.authorize, 'tcp', '0.0.0.0/0')
++        # from port cannot be greater than to port
++        self.assertRaises(Exception,
++                          group.authorize, 'tcp', 100, 1, '0.0.0.0/0')
++        # For tcp, negative values are not allowed
++        self.assertRaises(Exception,
++                          group.authorize, 'tcp', -1, 1, '0.0.0.0/0')
++        # For tcp, valid port range 1-65535
++        self.assertRaises(Exception,
++                          group.authorize, 'tcp', 1, 65599, '0.0.0.0/0')
++        # For icmp, only -1:-1 is allowed for type:code
++        self.assertRaises(Exception,
++                          group.authorize, 'icmp', -1, 0, '0.0.0.0/0')
++        # Non valid type:code
++        self.assertRaises(Exception,
++                          group.authorize, 'icmp', 0, 3, '0.0.0.0/0')
++        # Invalid Cidr for ICMP type
++        self.assertRaises(Exception,
++                          group.authorize, 'icmp', -1, -1, '0.0.444.0/4')
++        # Invalid protocol
++        self.assertRaises(Exception,
++                          group.authorize, 'xyz', 1, 14, '0.0.0.0/0')
++        # Invalid port
++        self.assertRaises(Exception,
++                          group.authorize, 'tcp', " ", "81", '0.0.0.0/0')
++        # Invalid icmp port
++        self.assertRaises(Exception,
++                          group.authorize, 'icmp', " ", "81", '0.0.0.0/0')
++        # Invalid CIDR Address
++        self.assertRaises(Exception,
++                          group.authorize, 'icmp', -1, -1, '0.0.0.0')
++        # Invalid CIDR Address
++        self.assertRaises(Exception,
++                          group.authorize, 'icmp', -1, -1, '0.0.0.0/')
++        # Invalid Cidr ports
++        self.assertRaises(Exception,
++                          group.authorize, 'icmp', 1, 256, '0.0.0.0/0')
+ 
+         self.expect_http()
+         self.mox.ReplayAll()
+@@ -394,7 +438,7 @@ class ApiEc2TestCase(test.TestCase):
+ 
+         group = [grp for grp in rv if grp.name == security_group_name][0]
+ 
+-        self.assertEquals(len(group.rules), 1)
++        self.assertEquals(len(group.rules), 3)
+         self.assertEquals(int(group.rules[0].from_port), 80)
+         self.assertEquals(int(group.rules[0].to_port), 81)
+         self.assertEquals(len(group.rules[0].grants), 1)
+@@ -405,6 +449,8 @@ class ApiEc2TestCase(test.TestCase):
+         group.connection = self.ec2
+ 
+         group.revoke('tcp', 80, 81, '0.0.0.0/0')
++        group.revoke('icmp', -1, -1, '0.0.0.0/0')
++        group.revoke('udp', 80, 81, '0.0.0.0/0')
+ 
+         self.expect_http()
+         self.mox.ReplayAll()
+diff --git a/nova/utils.py b/nova/utils.py
+index 4648f55..696e060 100644
+--- a/nova/utils.py
++++ b/nova/utils.py
+@@ -37,6 +37,7 @@ import time
+ import types
+ import uuid
+ import pyclbr
++import netaddr
+ from xml.sax import saxutils
+ 
+ from eventlet import event
+@@ -864,6 +865,26 @@ def is_valid_ipv4(address):
+     return True
+ 
+ 
++def is_valid_cidr(address):
++    """Check if the provided ipv4 or ipv6 address is a valid
++    CIDR address or not"""
++    try:
++        # Validate the correct CIDR Address
++        netaddr.IPNetwork(address)
++    except netaddr.core.AddrFormatError:
++        return False
++
++    # Prior validation partially verify /xx part
++    # Verify it here
++    ip_segment = address.split('/')
++
++    if (len(ip_segment) <= 1 or
++        ip_segment[1] == ''):
++        return False
++
++    return True
++
++
+ def monkey_patch():
+     """  If the Flags.monkey_patch set as True,
+     this functuion patches a decorator
+-- 
+1.7.6.5
+
diff --git a/0067-Bug-886353-Faults-raised-by-OpenStack-API-Resource-h.patch b/0067-Bug-886353-Faults-raised-by-OpenStack-API-Resource-h.patch
new file mode 100644
index 0000000..b0e1d1f
--- /dev/null
+++ b/0067-Bug-886353-Faults-raised-by-OpenStack-API-Resource-h.patch
@@ -0,0 +1,35 @@
+From 1270e11ef9fb3723e4a86bfe99d500ffbe615a4d Mon Sep 17 00:00:00 2001
+From: Ewan Mellor <ewan.mellor at citrix.com>
+Date: Fri, 4 Nov 2011 14:00:37 -0700
+Subject: [PATCH 67/94] Bug #886353: Faults raised by OpenStack API Resource
+ handlers fail to be reported properly
+
+In Resource.__call__, catch any faults.Fault that are thrown by the request
+handler, and make those the action_result.  This means that the Fault doesn't
+fall into the exception handler below (faults.Fault is a subclass of
+webob.exc.HTTPException) and so we don't attempt to wrap a Fault in a Fault.
+
+(cherry picked from commit 01150b5d0d482a83a1065c2a6d62f4963c9f838d)
+
+Change-Id: Ica31723ddd621332ec4be75db0d675bc98905e43
+---
+ nova/api/openstack/wsgi.py |    3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/nova/api/openstack/wsgi.py b/nova/api/openstack/wsgi.py
+index 8641e96..72e8f1b 100644
+--- a/nova/api/openstack/wsgi.py
++++ b/nova/api/openstack/wsgi.py
+@@ -492,6 +492,9 @@ class Resource(wsgi.Application):
+ 
+         try:
+             action_result = self.dispatch(request, action, args)
++        except faults.Fault as ex:
++            LOG.info(_("Fault thrown: %s"), unicode(ex))
++            action_result = ex
+         except webob.exc.HTTPException as ex:
+             LOG.info(_("HTTP exception thrown: %s"), unicode(ex))
+             action_result = faults.Fault(ex)
+-- 
+1.7.6.5
+
diff --git a/0068-Makes-sure-gateways-forward-properly.patch b/0068-Makes-sure-gateways-forward-properly.patch
new file mode 100644
index 0000000..3325cf2
--- /dev/null
+++ b/0068-Makes-sure-gateways-forward-properly.patch
@@ -0,0 +1,111 @@
+From e9f427fc2e8014eeba3f46284c38414209fb0b7e Mon Sep 17 00:00:00 2001
+From: Vishvananda Ishaya <vishvananda at gmail.com>
+Date: Wed, 16 Nov 2011 10:17:23 -0800
+Subject: [PATCH 68/94] Makes sure gateways forward properly
+
+ * Fixes bug 890195
+ * Fixes missing context in dhcp call
+ * Adds test to verify call is correct
+
+(cherry picked from commit 41af372219793556e6ba335d765761fa277107df)
+
+Change-Id: Ic099082a18d9fd8f48c338e092cd4a2d227b927b
+---
+ nova/network/linux_net.py    |   12 +++++++-----
+ nova/tests/test_linux_net.py |   24 ++++++++++++++++++++----
+ 2 files changed, 27 insertions(+), 9 deletions(-)
+
+diff --git a/nova/network/linux_net.py b/nova/network/linux_net.py
+index a55ba2c..2d011dd 100755
+--- a/nova/network/linux_net.py
++++ b/nova/network/linux_net.py
+@@ -876,6 +876,8 @@ class LinuxBridgeInterfaceDriver(LinuxNetInterfaceDriver):
+                           network['bridge_interface'],
+                           network)
+ 
++        # NOTE(vish): applying here so we don't get a lock conflict
++        iptables_manager.apply()
+         return network['bridge']
+ 
+     def unplug(self, network):
+@@ -946,14 +948,14 @@ class LinuxBridgeInterfaceDriver(LinuxNetInterfaceDriver):
+ 
+             # NOTE(vish): This will break if there is already an ip on the
+             #             interface, so we move any ips to the bridge
+-            gateway = None
++            old_gateway = None
+             out, err = _execute('route', '-n', run_as_root=True)
+             for line in out.split('\n'):
+                 fields = line.split()
+                 if fields and fields[0] == '0.0.0.0' and \
+                                 fields[-1] == interface:
+-                    gateway = fields[1]
+-                    _execute('route', 'del', 'default', 'gw', gateway,
++                    old_gateway = fields[1]
++                    _execute('route', 'del', 'default', 'gw', old_gateway,
+                              'dev', interface, check_exit_code=False,
+                              run_as_root=True)
+             out, err = _execute('ip', 'addr', 'show', 'dev', interface,
+@@ -966,8 +968,8 @@ class LinuxBridgeInterfaceDriver(LinuxNetInterfaceDriver):
+                                 run_as_root=True)
+                     _execute(*_ip_bridge_cmd('add', params, bridge),
+                                 run_as_root=True)
+-            if gateway:
+-                _execute('route', 'add', 'default', 'gw', gateway,
++            if old_gateway:
++                _execute('route', 'add', 'default', 'gw', old_gateway,
+                             run_as_root=True)
+ 
+             if (err and err != "device %s is already a member of a bridge;"
+diff --git a/nova/tests/test_linux_net.py b/nova/tests/test_linux_net.py
+index 0e933ef..0f5862f 100755
+--- a/nova/tests/test_linux_net.py
++++ b/nova/tests/test_linux_net.py
+@@ -15,17 +15,15 @@
+ # License for the specific language governing permissions and limitations
+ # under the License.
+ 
+-from nova import context
++import mox
++
+ from nova import db
+-from nova import exception
+ from nova import flags
+ from nova import log as logging
+ from nova import test
+ from nova import utils
+-from nova.network import manager as network_manager
+ from nova.network import linux_net
+ 
+-import mox
+ 
+ FLAGS = flags.FLAGS
+ 
+@@ -346,6 +344,24 @@ class LinuxNetworkTestCase(test.TestCase):
+         actual = self.driver._host_dhcp(fixed_ips[0])
+         self.assertEquals(actual, expected)
+ 
++    def test_linux_bridge_driver_plug(self):
++        """Makes sure plug doesn't drop FORWARD by default.
++
++        Ensures bug 890195 doesn't reappear."""
++
++        def fake_execute(*args, **kwargs):
++            return "", ""
++        self.stubs.Set(utils, 'execute', fake_execute)
++
++        def verify_add_rule(chain, rule):
++            self.assertEqual(chain, 'FORWARD')
++            self.assertIn('ACCEPT', rule)
++        self.stubs.Set(linux_net.iptables_manager.ipv4['filter'],
++                       'add_rule', verify_add_rule)
++        driver = linux_net.LinuxBridgeInterfaceDriver()
++        driver.plug({"bridge": "br100", "bridge_interface": "eth0"},
++                    "fakemac")
++
+     def _test_initialize_gateway(self, existing, expected, routes=''):
+         self.flags(fake_network=False)
+         executes = []
+-- 
+1.7.6.5
+
diff --git a/0069-Fix-a-minor-memory-leak.patch b/0069-Fix-a-minor-memory-leak.patch
new file mode 100644
index 0000000..beade4c
--- /dev/null
+++ b/0069-Fix-a-minor-memory-leak.patch
@@ -0,0 +1,31 @@
+From d2ae5bef3d6dc253e942e284ed9149c3912b2385 Mon Sep 17 00:00:00 2001
+From: "Kevin L. Mitchell" <kevin.mitchell at rackspace.com>
+Date: Fri, 18 Nov 2011 14:49:41 -0600
+Subject: [PATCH 69/94] Fix a minor memory leak
+
+Fixes a minor memory leak caused by a self-referential data structure
+with a __del__() method by explicitly breaking the cycle.
+
+(cherry picked from commit a594f4d34418c27197fe7f82eab150bc7cb70478)
+
+Change-Id: Ic2c896d3067f8a2205abc8a43ec290fdbd92ef09
+---
+ nova/rpc/impl_kombu.py |    2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/nova/rpc/impl_kombu.py b/nova/rpc/impl_kombu.py
+index b994a6a..cc1c864 100644
+--- a/nova/rpc/impl_kombu.py
++++ b/nova/rpc/impl_kombu.py
+@@ -682,6 +682,8 @@ class MulticallWaiter(object):
+ 
+     def done(self):
+         self._done = True
++        self._iterator.close()
++        self._iterator = None
+         self._connection.close()
+ 
+     def __call__(self, data):
+-- 
+1.7.6.5
+
diff --git a/0070-Fixes-bug-886263.patch b/0070-Fixes-bug-886263.patch
new file mode 100644
index 0000000..ec52c24
--- /dev/null
+++ b/0070-Fixes-bug-886263.patch
@@ -0,0 +1,30 @@
+From a6aee7386eb68d749668193547c18e2e4d661724 Mon Sep 17 00:00:00 2001
+From: Nachi Ueno <ueno.nachi at lab.ntt.co.jp>
+Date: Thu, 10 Nov 2011 10:35:57 +0900
+Subject: [PATCH 70/94] Fixes bug 886263.
+
+IndexError: pop index out of range on replace_uuid_with_id
+
+(cherry picked from commit 10f93f567f4a164091d811765d1fdc39cdb36478)
+
+Change-Id: I2f89bcc1675315c800e0d34bc09a268293a23caf
+---
+ nova/scheduler/api.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/nova/scheduler/api.py b/nova/scheduler/api.py
+index 719437b..1705c95 100644
+--- a/nova/scheduler/api.py
++++ b/nova/scheduler/api.py
+@@ -342,7 +342,7 @@ class reroute_compute(object):
+         """
+         if 'instance_id' in kwargs:
+             kwargs['instance_id'] = replacement_id
+-        elif len(args) > 1:
++        elif len(args) > 2:
+             args.pop(2)
+             args.insert(2, replacement_id)
+ 
+-- 
+1.7.6.5
+
diff --git a/0071-Fix-for-bug-894431.patch b/0071-Fix-for-bug-894431.patch
new file mode 100644
index 0000000..15eb83f
--- /dev/null
+++ b/0071-Fix-for-bug-894431.patch
@@ -0,0 +1,30 @@
+From 18d0c9a59d94fc23b3fdf03b609ed11e6597e717 Mon Sep 17 00:00:00 2001
+From: Brad Hall <brad at nicira.com>
+Date: Thu, 24 Nov 2011 07:44:02 -0800
+Subject: [PATCH 71/94] Fix for bug 894431
+
+Make sure we set the correct interface id
+
+(cherry picked from commit 94ed3e71ac5ea79fc4746d5d1b0c758744316cc6)
+
+Change-Id: I427284182cc0a5a456b43b777faba0a74f3816e7
+---
+ nova/network/linux_net.py |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/nova/network/linux_net.py b/nova/network/linux_net.py
+index a55ba2c..e685b4b 100755
+--- a/nova/network/linux_net.py
++++ b/nova/network/linux_net.py
+@@ -993,7 +993,7 @@ class LinuxOVSInterfaceDriver(LinuxNetInterfaceDriver):
+                         '--', '--may-exist', 'add-port', bridge, dev,
+                         '--', 'set', 'Interface', dev, "type=internal",
+                         '--', 'set', 'Interface', dev,
+-                                "external-ids:iface-id=nova-%s" % dev,
++                                "external-ids:iface-id=%s" % dev,
+                         '--', 'set', 'Interface', dev,
+                                 "external-ids:iface-status=active",
+                         '--', 'set', 'Interface', dev,
+-- 
+1.7.6.5
+
diff --git a/0072-Bug-897091-nova-actions-fails-with-HTTP-400-TypeErro.patch b/0072-Bug-897091-nova-actions-fails-with-HTTP-400-TypeErro.patch
new file mode 100644
index 0000000..7be76b1
--- /dev/null
+++ b/0072-Bug-897091-nova-actions-fails-with-HTTP-400-TypeErro.patch
@@ -0,0 +1,119 @@
+From c733462b229290210d6249e0f8fc7d2beaab9091 Mon Sep 17 00:00:00 2001
+From: Ewan Mellor <ewan.mellor at citrix.com>
+Date: Sun, 27 Nov 2011 23:26:49 -0800
+Subject: [PATCH 72/94] Bug #897091: "nova actions" fails with HTTP 400 /
+ TypeError if a server action has been performed
+
+Fix code in Controller.action that was overwriting the definition of the
+actions method with a dictionary.  This meant that 'nova actions' would fail
+if 'nova reboot' had previously been called.
+
+Added two tests, one for the actions call in general, and one for this
+failure mode specifically.
+
+(cherry picked from commit 4a76167e354eed4aa98232fbf6c845f86ce4cf22)
+
+Change-Id: I695bb5c4dcfba96a5aba54125a8f3163e1a6a193
+---
+ nova/api/openstack/servers.py            |    8 +++---
+ nova/tests/api/openstack/test_servers.py |   35 +++++++++++++++++++++++++++++-
+ 2 files changed, 38 insertions(+), 5 deletions(-)
+
+diff --git a/nova/api/openstack/servers.py b/nova/api/openstack/servers.py
+index 29ae375..8681674 100644
+--- a/nova/api/openstack/servers.py
++++ b/nova/api/openstack/servers.py
+@@ -207,7 +207,7 @@ class Controller(object):
+     def action(self, req, id, body):
+         """Multi-purpose method used to take actions on a server"""
+ 
+-        self.actions = {
++        _actions = {
+             'changePassword': self._action_change_password,
+             'reboot': self._action_reboot,
+             'resize': self._action_resize,
+@@ -221,11 +221,11 @@ class Controller(object):
+             admin_actions = {
+                 'createBackup': self._action_create_backup,
+             }
+-            self.actions.update(admin_actions)
++            _actions.update(admin_actions)
+ 
+         for key in body:
+-            if key in self.actions:
+-                return self.actions[key](body, req, id)
++            if key in _actions:
++                return _actions[key](body, req, id)
+             else:
+                 msg = _("There is no such server action: %s") % (key,)
+                 raise exc.HTTPBadRequest(explanation=msg)
+diff --git a/nova/tests/api/openstack/test_servers.py b/nova/tests/api/openstack/test_servers.py
+index 817b8a3..43633be 100644
+--- a/nova/tests/api/openstack/test_servers.py
++++ b/nova/tests/api/openstack/test_servers.py
+@@ -42,6 +42,7 @@ from nova.compute import vm_states
+ import nova.db.api
+ import nova.scheduler.api
+ from nova.db.sqlalchemy.models import Instance
++from nova.db.sqlalchemy.models import InstanceActions
+ from nova.db.sqlalchemy.models import InstanceMetadata
+ import nova.image.fake
+ import nova.rpc
+@@ -229,6 +230,19 @@ def fake_compute_api(cls, req, id):
+     return True
+ 
+ 
++_fake_compute_actions = [
++    dict(
++        created_at=str(datetime.datetime(2010, 11, 11, 11, 0, 0)),
++        action='Fake Action',
++        error='Fake Error',
++        )
++    ]
++
++
++def fake_compute_actions(_1, _2, _3):
++    return [InstanceActions(**a) for a in _fake_compute_actions]
++
++
+ def find_host(self, context, instance_id):
+     return "nova"
+ 
+@@ -272,7 +286,7 @@ class ServersTest(test.TestCase):
+         self.stubs.Set(nova.compute.API, 'suspend', fake_compute_api)
+         self.stubs.Set(nova.compute.API, 'resume', fake_compute_api)
+         self.stubs.Set(nova.compute.API, "get_diagnostics", fake_compute_api)
+-        self.stubs.Set(nova.compute.API, "get_actions", fake_compute_api)
++        self.stubs.Set(nova.compute.API, "get_actions", fake_compute_actions)
+ 
+         self.webreq = common.webob_factory('/v1.0/servers')
+         self.config_drive = None
+@@ -2417,6 +2431,25 @@ class ServersTest(test.TestCase):
+             self.assertEqual(s['status'], 'BUILD')
+             self.assertEqual(s['metadata']['seq'], str(i))
+ 
++    def test_server_actions(self):
++        req = webob.Request.blank('/v1.1/fake/servers/%s/actions' % FAKE_UUID)
++        req.method = "GET"
++        res = req.get_response(fakes.wsgi_app())
++        res_dict = json.loads(res.body)
++        self.assertEqual(res_dict, {'actions': _fake_compute_actions})
++
++    def test_server_actions_after_reboot(self):
++        """
++        Bug #897091 was this failure mode -- the /actions call failed if
++        /action had been called first.
++        """
++        req = webob.Request.blank('/v1.1/fake/servers/%s/action' % FAKE_UUID)
++        req.method = 'POST'
++        req.body = json.dumps(dict(reboot=dict(type="HARD")))
++        req.headers["content-type"] = "application/json"
++        req.get_response(fakes.wsgi_app())
++        self.test_server_actions()
++
+     def test_get_all_server_details_with_host(self):
+         '''
+         We want to make sure that if two instances are on the same host, then
+-- 
+1.7.6.5
+
diff --git a/0073-removed-logic-of-throwing-exception-if-no-floating-i.patch b/0073-removed-logic-of-throwing-exception-if-no-floating-i.patch
new file mode 100644
index 0000000..70b660e
--- /dev/null
+++ b/0073-removed-logic-of-throwing-exception-if-no-floating-i.patch
@@ -0,0 +1,80 @@
+From 78e81f1b7c0c2cc9b1e447cf3dce47d3b6ed0ce3 Mon Sep 17 00:00:00 2001
+From: Jesse Andrews <anotherjesse at gmail.com>
+Date: Mon, 28 Nov 2011 17:00:47 -0800
+Subject: [PATCH 73/94] removed logic of throwing exception if no floating ip
+
+fixes 897089
+
+(cherry picked from commit 8230533824fd170498e51b43dd2f20e6af410c53)
+
+Change-Id: Iaa03c7b75abf67c78b4605c29ef1770c96c6a199
+---
+ nova/api/openstack/contrib/floating_ips.py |    7 ++-----
+ nova/db/sqlalchemy/api.py                  |   15 ++++++---------
+ nova/exception.py                          |    4 ----
+ 3 files changed, 8 insertions(+), 18 deletions(-)
+
+diff --git a/nova/api/openstack/contrib/floating_ips.py b/nova/api/openstack/contrib/floating_ips.py
+index 8b5b19c..5088357 100644
+--- a/nova/api/openstack/contrib/floating_ips.py
++++ b/nova/api/openstack/contrib/floating_ips.py
+@@ -77,13 +77,10 @@ class FloatingIPController(object):
+         return _translate_floating_ip_view(floating_ip)
+ 
+     def index(self, req):
++        """Return a list of floating ips allocated to a project."""
+         context = req.environ['nova.context']
+ 
+-        try:
+-            # FIXME(ja) - why does self.network_api.list_floating_ips raise?
+-            floating_ips = self.network_api.list_floating_ips(context)
+-        except exception.FloatingIpNotFoundForProject:
+-            floating_ips = []
++        floating_ips = self.network_api.list_floating_ips(context)
+ 
+         return _translate_floating_ips_view(floating_ips)
+ 
+diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py
+index 23c0408..6108585 100644
+--- a/nova/db/sqlalchemy/api.py
++++ b/nova/db/sqlalchemy/api.py
+@@ -626,15 +626,12 @@ def floating_ip_get_all_by_project(context, project_id):
+     authorize_project_context(context, project_id)
+     session = get_session()
+     # TODO(tr3buchet): why do we not want auto_assigned floating IPs here?
+-    floating_ip_refs = session.query(models.FloatingIp).\
+-                               options(joinedload_all('fixed_ip.instance')).\
+-                               filter_by(project_id=project_id).\
+-                               filter_by(auto_assigned=False).\
+-                               filter_by(deleted=False).\
+-                               all()
+-    if not floating_ip_refs:
+-        raise exception.FloatingIpNotFoundForProject(project_id=project_id)
+-    return floating_ip_refs
++    return session.query(models.FloatingIp).\
++                         options(joinedload_all('fixed_ip.instance')).\
++                         filter_by(project_id=project_id).\
++                         filter_by(auto_assigned=False).\
++                         filter_by(deleted=False).\
++                         all()
+ 
+ 
+ @require_context
+diff --git a/nova/exception.py b/nova/exception.py
+index 50477af..2db2e2b 100644
+--- a/nova/exception.py
++++ b/nova/exception.py
+@@ -536,10 +536,6 @@ class FloatingIpNotFoundForAddress(FloatingIpNotFound):
+     message = _("Floating ip not found for address %(address)s.")
+ 
+ 
+-class FloatingIpNotFoundForProject(FloatingIpNotFound):
+-    message = _("Floating ip not found for project %(project_id)s.")
+-
+-
+ class FloatingIpNotFoundForHost(FloatingIpNotFound):
+     message = _("Floating ip not found for host %(host)s.")
+ 
+-- 
+1.7.6.5
+
diff --git a/0074-Fix-RPC-responses-to-allow-None-response-correctly.patch b/0074-Fix-RPC-responses-to-allow-None-response-correctly.patch
new file mode 100644
index 0000000..471ec43
--- /dev/null
+++ b/0074-Fix-RPC-responses-to-allow-None-response-correctly.patch
@@ -0,0 +1,322 @@
+From 475f3624245500c5382faf5b2708a59fcec2c9ad Mon Sep 17 00:00:00 2001
+From: Chris Behrens <cbehrens at codestud.com>
+Date: Tue, 29 Nov 2011 09:01:16 -0800
+Subject: [PATCH 74/94] Fix RPC responses to allow None response correctly.
+
+Fixes bug 897155
+
+Cherry picked from 84693b4a16413830be61f465f602de9d13b45161
+
+Also adds a new fake rpc implementation that tests use by default.
+This speeds up the test run by ~10% on my system.  We can decide to
+ditch fake_rabbit at some point later..
+
+Change-Id: I8877fad3d41ae055c15b1adff99e535c34e9ce92
+---
+ nova/rpc/impl_carrot.py       |   88 ++++++++++++++++++++++-------------------
+ nova/rpc/impl_kombu.py        |   23 +++++++---
+ nova/tests/test_rpc_common.py |   18 ++++++++
+ run_tests.py                  |    2 +
+ 4 files changed, 83 insertions(+), 48 deletions(-)
+
+diff --git a/nova/rpc/impl_carrot.py b/nova/rpc/impl_carrot.py
+index 303a4ff..57fd074 100644
+--- a/nova/rpc/impl_carrot.py
++++ b/nova/rpc/impl_carrot.py
+@@ -266,15 +266,14 @@ class AdapterConsumer(Consumer):
+             #             we just log the message and send an error string
+             #             back to the caller
+             LOG.warn(_('no method for message: %s') % message_data)
+-            if msg_id:
+-                msg_reply(msg_id,
+-                          _('No method for message: %s') % message_data)
++            ctxt.reply(msg_id,
++                    _('No method for message: %s') % message_data)
+             return
+-        self.pool.spawn_n(self._process_data, msg_id, ctxt, method, args)
++        self.pool.spawn_n(self._process_data, ctxt, method, args)
+ 
+     @exception.wrap_exception()
+-    def _process_data(self, msg_id, ctxt, method, args):
+-        """Thread that maigcally looks for a method on the proxy
++    def _process_data(self, ctxt, method, args):
++        """Thread that magically looks for a method on the proxy
+         object and calls it.
+         """
+ 
+@@ -283,23 +282,18 @@ class AdapterConsumer(Consumer):
+         # NOTE(vish): magic is fun!
+         try:
+             rval = node_func(context=ctxt, **node_args)
+-            if msg_id:
+-                # Check if the result was a generator
+-                if isinstance(rval, types.GeneratorType):
+-                    for x in rval:
+-                        msg_reply(msg_id, x, None)
+-                else:
+-                    msg_reply(msg_id, rval, None)
+-
+-                # This final None tells multicall that it is done.
+-                msg_reply(msg_id, None, None)
+-            elif isinstance(rval, types.GeneratorType):
+-                # NOTE(vish): this iterates through the generator
+-                list(rval)
++            # Check if the result was a generator
++            if isinstance(rval, types.GeneratorType):
++                for x in rval:
++                    ctxt.reply(x, None)
++            else:
++                ctxt.reply(rval, None)
++
++            # This final None tells multicall that it is done.
++            ctxt.reply(ending=True)
+         except Exception as e:
+             LOG.exception('Exception during message handling')
+-            if msg_id:
+-                msg_reply(msg_id, None, sys.exc_info())
++            ctxt.reply(None, sys.exc_info())
+         return
+ 
+ 
+@@ -447,7 +441,7 @@ class DirectPublisher(Publisher):
+         super(DirectPublisher, self).__init__(connection=connection)
+ 
+ 
+-def msg_reply(msg_id, reply=None, failure=None):
++def msg_reply(msg_id, reply=None, failure=None, ending=False):
+     """Sends a reply or an error on the channel signified by msg_id.
+ 
+     Failure should be a sys.exc_info() tuple.
+@@ -463,12 +457,17 @@ def msg_reply(msg_id, reply=None, failure=None):
+     with ConnectionPool.item() as conn:
+         publisher = DirectPublisher(connection=conn, msg_id=msg_id)
+         try:
+-            publisher.send({'result': reply, 'failure': failure})
++            msg = {'result': reply, 'failure': failure}
++            if ending:
++                msg['ending'] = True
++            publisher.send(msg)
+         except TypeError:
+-            publisher.send(
+-                    {'result': dict((k, repr(v))
+-                                    for k, v in reply.__dict__.iteritems()),
+-                     'failure': failure})
++            msg = {'result': dict((k, repr(v))
++                            for k, v in reply.__dict__.iteritems()),
++                    'failure': failure}
++            if ending:
++                msg['ending'] = True
++            publisher.send(msg)
+ 
+         publisher.close()
+ 
+@@ -508,8 +507,11 @@ class RpcContext(context.RequestContext):
+         self.msg_id = msg_id
+         super(RpcContext, self).__init__(*args, **kwargs)
+ 
+-    def reply(self, *args, **kwargs):
+-        msg_reply(self.msg_id, *args, **kwargs)
++    def reply(self, reply=None, failure=None, ending=False):
++        if self.msg_id:
++            msg_reply(self.msg_id, reply, failure, ending)
++            if ending:
++                self.msg_id = None
+ 
+ 
+ def multicall(context, topic, msg):
+@@ -537,8 +539,11 @@ class MulticallWaiter(object):
+         self._consumer = consumer
+         self._results = queue.Queue()
+         self._closed = False
++        self._got_ending = False
+ 
+     def close(self):
++        if self._closed:
++            return
+         self._closed = True
+         self._consumer.close()
+         ConnectionPool.put(self._consumer.connection)
+@@ -548,6 +553,8 @@ class MulticallWaiter(object):
+         message.ack()
+         if data['failure']:
+             self._results.put(RemoteError(*data['failure']))
++        elif data.get('ending', False):
++            self._got_ending = True
+         else:
+             self._results.put(data['result'])
+ 
+@@ -555,23 +562,22 @@ class MulticallWaiter(object):
+         return self.wait()
+ 
+     def wait(self):
+-        while True:
+-            rv = None
+-            while rv is None and not self._closed:
+-                try:
+-                    rv = self._consumer.fetch(enable_callbacks=True)
+-                except Exception:
+-                    self.close()
+-                    raise
++        while not self._closed:
++            try:
++                rv = self._consumer.fetch(enable_callbacks=True)
++            except Exception:
++                self.close()
++                raise
++            if rv is None:
+                 time.sleep(0.01)
+-
++                continue
++            if self._got_ending:
++                self.close()
++                raise StopIteration
+             result = self._results.get()
+             if isinstance(result, Exception):
+                 self.close()
+                 raise result
+-            if result == None:
+-                self.close()
+-                raise StopIteration
+             yield result
+ 
+ 
+diff --git a/nova/rpc/impl_kombu.py b/nova/rpc/impl_kombu.py
+index b994a6a..41e8ff5 100644
+--- a/nova/rpc/impl_kombu.py
++++ b/nova/rpc/impl_kombu.py
+@@ -625,7 +625,7 @@ class ProxyCallback(object):
+             else:
+                 ctxt.reply(rval, None)
+             # This final None tells multicall that it is done.
+-            ctxt.reply(None, None)
++            ctxt.reply(ending=True)
+         except Exception as e:
+             LOG.exception('Exception during message handling')
+             ctxt.reply(None, sys.exc_info())
+@@ -668,9 +668,11 @@ class RpcContext(context.RequestContext):
+         self.msg_id = msg_id
+         super(RpcContext, self).__init__(*args, **kwargs)
+ 
+-    def reply(self, *args, **kwargs):
++    def reply(self, reply=None, failure=None, ending=False):
+         if self.msg_id:
+-            msg_reply(self.msg_id, *args, **kwargs)
++            msg_reply(self.msg_id, reply, failure, ending)
++            if ending:
++                self.msg_id = None
+ 
+ 
+ class MulticallWaiter(object):
+@@ -679,8 +681,11 @@ class MulticallWaiter(object):
+         self._iterator = connection.iterconsume()
+         self._result = None
+         self._done = False
++        self._got_ending = False
+ 
+     def done(self):
++        if self._done:
++            return
+         self._done = True
+         self._connection.close()
+ 
+@@ -688,6 +693,8 @@ class MulticallWaiter(object):
+         """The consume() callback will call this.  Store the result."""
+         if data['failure']:
+             self._result = RemoteError(*data['failure'])
++        elif data.get('ending', False):
++            self._got_ending = True
+         else:
+             self._result = data['result']
+ 
+@@ -697,13 +704,13 @@ class MulticallWaiter(object):
+             raise StopIteration
+         while True:
+             self._iterator.next()
++            if self._got_ending:
++                self.done()
++                raise StopIteration
+             result = self._result
+             if isinstance(result, Exception):
+                 self.done()
+                 raise result
+-            if result == None:
+-                self.done()
+-                raise StopIteration
+             yield result
+ 
+ 
+@@ -758,7 +765,7 @@ def fanout_cast(context, topic, msg):
+         conn.fanout_send(topic, msg)
+ 
+ 
+-def msg_reply(msg_id, reply=None, failure=None):
++def msg_reply(msg_id, reply=None, failure=None, ending=False):
+     """Sends a reply or an error on the channel signified by msg_id.
+ 
+     Failure should be a sys.exc_info() tuple.
+@@ -778,4 +785,6 @@ def msg_reply(msg_id, reply=None, failure=None):
+             msg = {'result': dict((k, repr(v))
+                             for k, v in reply.__dict__.iteritems()),
+                     'failure': failure}
++        if ending:
++            msg['ending'] = True
+         conn.direct_send(msg_id, msg)
+diff --git a/nova/tests/test_rpc_common.py b/nova/tests/test_rpc_common.py
+index 4ab4e8a..40ea110 100644
+--- a/nova/tests/test_rpc_common.py
++++ b/nova/tests/test_rpc_common.py
+@@ -90,6 +90,17 @@ class _BaseRpcTestCase(test.TestCase):
+         for i, x in enumerate(result):
+             self.assertEqual(value + i, x)
+ 
++    def test_multicall_three_nones(self):
++        value = 42
++        result = self.rpc.multicall(self.context,
++                              'test',
++                              {"method": "multicall_three_nones",
++                               "args": {"value": value}})
++        for i, x in enumerate(result):
++            self.assertEqual(x, None)
++        # i should have been 0, 1, and finally 2:
++        self.assertEqual(i, 2)
++
+     def test_context_passed(self):
+         """Makes sure a context is passed through rpc call."""
+         value = 42
+@@ -176,6 +187,13 @@ class TestReceiver(object):
+         context.reply(value)
+         context.reply(value + 1)
+         context.reply(value + 2)
++        context.reply(ending=True)
++
++    @staticmethod
++    def multicall_three_nones(context, value):
++        yield None
++        yield None
++        yield None
+ 
+     @staticmethod
+     def echo_three_times_yield(context, value):
+diff --git a/run_tests.py b/run_tests.py
+index fd83696..17547b8 100644
+--- a/run_tests.py
++++ b/run_tests.py
+@@ -64,6 +64,7 @@ import time
+ 
+ gettext.install('nova', unicode=1)
+ 
++import eventlet
+ from nose import config
+ from nose import core
+ from nose import result
+@@ -336,6 +337,7 @@ class NovaTestRunner(core.TextTestRunner):
+ 
+ 
+ if __name__ == '__main__':
++    eventlet.monkey_patch()
+     logging.setup()
+     # If any argument looks like a test name but doesn't have "nova.tests" in
+     # front of it, automatically add that so we don't have to type as much
+-- 
+1.7.6.5
+
diff --git a/0036-Sanitize-EC2-manifests-and-image-tarballs.patch b/0075-Sanitize-EC2-manifests-and-image-tarballs.patch
similarity index 97%
rename from 0036-Sanitize-EC2-manifests-and-image-tarballs.patch
rename to 0075-Sanitize-EC2-manifests-and-image-tarballs.patch
index 65e8254..f634142 100644
--- a/0036-Sanitize-EC2-manifests-and-image-tarballs.patch
+++ b/0075-Sanitize-EC2-manifests-and-image-tarballs.patch
@@ -1,7 +1,7 @@
-From 2971b1846d27ab489a6604445836b043818d5425 Mon Sep 17 00:00:00 2001
+From 76363226bd8533256f7795bba358d7f4b8a6c9e6 Mon Sep 17 00:00:00 2001
 From: Thierry Carrez <thierry at openstack.org>
 Date: Thu, 1 Dec 2011 17:54:16 +0100
-Subject: [PATCH 36/44] Sanitize EC2 manifests and image tarballs
+Subject: [PATCH 75/94] Sanitize EC2 manifests and image tarballs
 
 Prevent potential directory traversal with malicious EC2 image tarballs,
 by making sure the tarfile is safe before unpacking it. Fixes bug 894755
diff --git a/0076-Rename-.nova-venv-to-.venv.patch b/0076-Rename-.nova-venv-to-.venv.patch
new file mode 100644
index 0000000..c5fe00d
--- /dev/null
+++ b/0076-Rename-.nova-venv-to-.venv.patch
@@ -0,0 +1,128 @@
+From 18a5ca1c20729e4f3309dc1785999ecf3255616f Mon Sep 17 00:00:00 2001
+From: "James E. Blair" <jeblair at hp.com>
+Date: Thu, 8 Dec 2011 15:14:48 -0800
+Subject: [PATCH 76/94] Rename .nova-venv to .venv.
+
+This simplifies a number of Jenkins jobs which currently, other
+than directory names, could be the same for all OpenStack
+projects. By renaming the virtualenv directory, the redundant
+Jenkins virtualenv build and copy jobs can be eliminated.
+
+Cherry-picked from 5235106e95681a2942a083aff7c00d385bd10489
+
+Conflicts:
+
+	.gitignore
+	doc/source/devref/development.environment.rst
+
+Change-Id: Ieaf1dac3207ecb34b911c7edcd2086809abdf49e
+---
+ .gitignore                                    |    1 +
+ .mailmap                                      |    2 ++
+ Authors                                       |    2 +-
+ doc/source/devref/development.environment.rst |    3 +--
+ run_tests.sh                                  |    2 +-
+ tools/install_venv.py                         |    4 ++--
+ tools/with_venv.sh                            |    2 +-
+ 7 files changed, 9 insertions(+), 7 deletions(-)
+
+diff --git a/.gitignore b/.gitignore
+index 2afc7a3..8bc8497 100644
+--- a/.gitignore
++++ b/.gitignore
+@@ -10,3 +10,4 @@ build/*
+ build-stamp
+ nova.egg-info
+ .nova-venv
++.venv
+diff --git a/.mailmap b/.mailmap
+index f2f59d8..9b6127c 100644
+--- a/.mailmap
++++ b/.mailmap
+@@ -22,6 +22,8 @@
+ <jake at ansolabs.com> <jake at markupisart.com>
+ <jake at ansolabs.com> <admin at jakedahn.com>
+ <jaypipes at gmail.com> <jpipes at serialcoder>
++<jeblair at hp.com> <james.blair at rackspace.com>
++<jeblair at hp.com> <corvus at inaugust.com>
+ <jmckenty at gmail.com> <jmckenty at joshua-mckentys-macbook-pro.local>
+ <jmckenty at gmail.com> <jmckenty at yyj-dhcp171.corp.flock.com>
+ <jmckenty at gmail.com> <joshua.mckenty at nasa.gov>
+diff --git a/Authors b/Authors
+index 08403b8..9cb7ba8 100644
+--- a/Authors
++++ b/Authors
+@@ -48,7 +48,7 @@ Hisaki Ohara <hisaki.ohara at intel.com>
+ Ilya Alekseyev <ilyaalekseyev at acm.org>
+ Isaku Yamahata <yamahata at valinux.co.jp>
+ Jake Dahn <jake at ansolabs.com>
+-James E. Blair <james.blair at rackspace.com>
++James E. Blair <jeblair at hp.com>
+ Jason Cannavale <jason.cannavale at rackspace.com>
+ Jason Koelker <jason at koelker.net>
+ Jay Pipes <jaypipes at gmail.com>
+diff --git a/doc/source/devref/development.environment.rst b/doc/source/devref/development.environment.rst
+index 09f1eb2..6c9f2e6 100644
+--- a/doc/source/devref/development.environment.rst
++++ b/doc/source/devref/development.environment.rst
+@@ -85,11 +85,10 @@ Here's how to get the latest code::
+ 
+   cd nova
+   bzr pull # get the latest stuff...
+-  source .nova_venv/bin/activate
++  source .venv/bin/activate
+   ./run_tests.sh
+ 
+ Then you can do cleaning work or hack hack hack with a branched named cleaning.  
+-
+ Contributing Your Work
+ ----------------------
+ 
+diff --git a/run_tests.sh b/run_tests.sh
+index 9a69195..18589cd 100755
+--- a/run_tests.sh
++++ b/run_tests.sh
+@@ -40,7 +40,7 @@ function process_option {
+   esac
+ }
+ 
+-venv=.nova-venv
++venv=.venv
+ with_venv=tools/with_venv.sh
+ always_venv=0
+ never_venv=0
+diff --git a/tools/install_venv.py b/tools/install_venv.py
+index 3c2f697..601ce27 100644
+--- a/tools/install_venv.py
++++ b/tools/install_venv.py
+@@ -29,7 +29,7 @@ import sys
+ 
+ 
+ ROOT = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
+-VENV = os.path.join(ROOT, '.nova-venv')
++VENV = os.path.join(ROOT, '.venv')
+ PIP_REQUIRES = os.path.join(ROOT, 'tools', 'pip-requires')
+ PY_VERSION = "python%s.%s" % (sys.version_info[0], sys.version_info[1])
+ 
+@@ -123,7 +123,7 @@ def print_help():
+     To activate the Nova virtualenv for the extent of your current shell
+     session you can run:
+ 
+-    $ source .nova-venv/bin/activate
++    $ source .venv/bin/activate
+ 
+     Or, if you prefer, you can run commands in the virtualenv on a case by case
+     basis by running:
+diff --git a/tools/with_venv.sh b/tools/with_venv.sh
+index 99d1ac1..c8d2940 100755
+--- a/tools/with_venv.sh
++++ b/tools/with_venv.sh
+@@ -1,4 +1,4 @@
+ #!/bin/bash
+ TOOLS=`dirname $0`
+-VENV=$TOOLS/../.nova-venv
++VENV=$TOOLS/../.venv
+ source $VENV/bin/activate && $@
+-- 
+1.7.6.5
+
diff --git a/0077-Fix-issue-in-test_s3_malicious_tarballs.patch b/0077-Fix-issue-in-test_s3_malicious_tarballs.patch
new file mode 100644
index 0000000..49f2d31
--- /dev/null
+++ b/0077-Fix-issue-in-test_s3_malicious_tarballs.patch
@@ -0,0 +1,29 @@
+From 98877f9c3f633225315dadd8ea8e580ab623506a Mon Sep 17 00:00:00 2001
+From: Thierry Carrez <thierry at openstack.org>
+Date: Tue, 13 Dec 2011 17:10:44 +0100
+Subject: [PATCH 77/94] Fix issue in test_s3_malicious_tarballs
+
+The previous commit backported a master commit which added a test
+that cannot run successfully on stable/diablo due to a missing
+import.
+
+Change-Id: I6e5a1142e1902f4fc658ed376c91e9535379c12f
+---
+ nova/tests/image/test_s3.py |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/nova/tests/image/test_s3.py b/nova/tests/image/test_s3.py
+index 4ab36a0..c22e348 100644
+--- a/nova/tests/image/test_s3.py
++++ b/nova/tests/image/test_s3.py
+@@ -18,6 +18,7 @@
+ import os
+ 
+ from nova import context
++from nova import exception
+ from nova import test
+ from nova.image import s3
+ 
+-- 
+1.7.6.5
+
diff --git a/0078-Fixes-bug-888649.patch b/0078-Fixes-bug-888649.patch
new file mode 100644
index 0000000..ab69069
--- /dev/null
+++ b/0078-Fixes-bug-888649.patch
@@ -0,0 +1,91 @@
+From 5d319531552689e4842a84adce01c81899cdfb17 Mon Sep 17 00:00:00 2001
+From: Ollie Leahy <oliver.leahy at hp.com>
+Date: Thu, 24 Nov 2011 15:56:08 +0000
+Subject: [PATCH 78/94] Fixes bug 888649
+
+Change exception.VolumeIsBusy to derive from NovaException instead of
+Error, so that an 'unexpected keyword' exception is not thrown when
+the exception is raised with keyword parameters.
+
+Add unit test to confirm that the 'unexpected keyword' exception is not
+thrown when the exception is raised by nova.volume.driver.VolumeDriver
+
+Responded to reviewer observations, fix pep8 errors in tset_volume.py,
+added email address to Authors file.
+
+(cherry picked from commit e0ef89f091a77a25fa9bcfd466159e101cb42c56)
+
+Change-Id: I15464cb0cf72a2c71f430e4c8c5c2b27cd4e2ef9
+---
+ Authors                   |    1 +
+ nova/exception.py         |    2 +-
+ nova/tests/test_volume.py |   28 ++++++++++++++++++++++++++++
+ 3 files changed, 30 insertions(+), 1 deletions(-)
+
+diff --git a/Authors b/Authors
+index 9cb7ba8..4943767 100644
+--- a/Authors
++++ b/Authors
+@@ -99,6 +99,7 @@ Nachi Ueno <ueno.nachi at lab.ntt.co.jp>
+ Naveed Massjouni <naveedm9 at gmail.com>
+ Nikolay Sokolov <nsokolov at griddynamics.com>
+ Nirmal Ranganathan <nirmal.ranganathan at rackspace.com>
++Ollie Leahy <oliver.leahy at hp.com>
+ Paul Voccio <paul at openstack.org>
+ Renuka Apte <renuka.apte at citrix.com>
+ Ricardo Carrillo Cruz <emaildericky at gmail.com>
+diff --git a/nova/exception.py b/nova/exception.py
+index 50477af..688f554 100644
+--- a/nova/exception.py
++++ b/nova/exception.py
+@@ -384,7 +384,7 @@ class SnapshotNotFound(NotFound):
+     message = _("Snapshot %(snapshot_id)s could not be found.")
+ 
+ 
+-class VolumeIsBusy(Error):
++class VolumeIsBusy(NovaException):
+     message = _("deleting volume %(volume_name)s that has snapshot")
+ 
+ 
+diff --git a/nova/tests/test_volume.py b/nova/tests/test_volume.py
+index 7888b6b..689383c 100644
+--- a/nova/tests/test_volume.py
++++ b/nova/tests/test_volume.py
+@@ -295,6 +295,34 @@ class DriverTestCase(test.TestCase):
+             self.volume.delete_volume(self.context, volume_id)
+ 
+ 
++class VolumeDriverTestCase(DriverTestCase):
++    """Test case for VolumeDriver"""
++    driver_name = "nova.volume.driver.VolumeDriver"
++
++    def setUp(self):
++        super(VolumeDriverTestCase, self).setUp()
++
++    def tearDown(self):
++        super(VolumeDriverTestCase, self).tearDown()
++
++    def test_delete_busy_volume(self):
++        """Test deleting a busy volume."""
++        self.stubs.Set(self.volume.driver, '_volume_not_present',
++                       lambda x: False)
++        self.stubs.Set(self.volume.driver, '_delete_volume',
++                       lambda x, y: False)
++        # Want DriverTestCase._fake_execute to return 'o' so that
++        # volume.driver.delete_volume() raises the VolumeIsBusy exception.
++        self.output = 'o'
++        self.assertRaises(exception.VolumeIsBusy,
++                          self.volume.driver.delete_volume,
++                          {'name': 'test1', 'size': 1024})
++        # when DriverTestCase._fake_execute returns something other than
++        # 'o' volume.driver.delete_volume() does not raise an exception.
++        self.output = 'x'
++        self.volume.driver.delete_volume({'name': 'test1', 'size': 1024})
++
++
+ class AOETestCase(DriverTestCase):
+     """Test Case for AOEDriver"""
+     driver_name = "nova.volume.driver.AOEDriver"
+-- 
+1.7.6.5
+
diff --git a/0079-Fixes-bug-767947.patch b/0079-Fixes-bug-767947.patch
new file mode 100644
index 0000000..5332ef1
--- /dev/null
+++ b/0079-Fixes-bug-767947.patch
@@ -0,0 +1,85 @@
+From add84707ec40bc4de1de5616da41b2ac5f4a9537 Mon Sep 17 00:00:00 2001
+From: Alvaro Lopez Garcia <aloga at ifca.unican.es>
+Date: Wed, 30 Nov 2011 12:25:00 +0100
+Subject: [PATCH 79/94] Fixes bug 767947
+
+If libvirt was restarted, a libvirt.libvirtError was raised with error
+domain libvirt.VIR_FROM_RPC when trying to use the existing connection.
+
+(cherry picked from commit 7c11490677bc49086271ee377e6a8076eebe15f6)
+
+Change-Id: Ib3d4ff23aadf5a0c93dde0c37c5686bf404ce9de
+---
+ Authors                         |    1 +
+ nova/tests/test_libvirt.py      |   28 ++++++++++++++++++++++++++++
+ nova/virt/libvirt/connection.py |    3 ++-
+ 3 files changed, 31 insertions(+), 1 deletions(-)
+
+diff --git a/Authors b/Authors
+index 08403b8..ab90964 100644
+--- a/Authors
++++ b/Authors
+@@ -4,6 +4,7 @@ Adam Johnson <adjohn at gmail.com>
+ Ahmad Hassan <ahmad.hassan at hp.com>
+ Alex Meade <alex.meade at rackspace.com>
+ Alexander Sakhnov <asakhnov at mirantis.com>
++Alvaro Lopez Garcia <aloga at ifca.unican.es>
+ Andrey Brindeyev <abrindeyev at griddynamics.com>
+ Andy Smith <code at term.ie>
+ Andy Southgate <andy.southgate at citrix.com>
+diff --git a/nova/tests/test_libvirt.py b/nova/tests/test_libvirt.py
+index f59b2f7..e3e6b75 100644
+--- a/nova/tests/test_libvirt.py
++++ b/nova/tests/test_libvirt.py
+@@ -951,6 +951,34 @@ class LibvirtConnTestCase(test.TestCase):
+         ip = conn.get_host_ip_addr()
+         self.assertEquals(ip, FLAGS.my_ip)
+ 
++    def test_broken_connection(self):
++        # Skip if non-libvirt environment
++        if not self.lazy_load_library_exists():
++            return
++
++        for (error, domain) in (
++                (libvirt.VIR_ERR_SYSTEM_ERROR, libvirt.VIR_FROM_REMOTE),
++                (libvirt.VIR_ERR_SYSTEM_ERROR, libvirt.VIR_FROM_RPC)):
++
++            conn = connection.LibvirtConnection(False)
++
++            self.mox.StubOutWithMock(conn, "_wrapped_conn")
++            self.mox.StubOutWithMock(conn._wrapped_conn, "getCapabilities")
++            self.mox.StubOutWithMock(libvirt.libvirtError, "get_error_code")
++            self.mox.StubOutWithMock(libvirt.libvirtError, "get_error_domain")
++
++            conn._wrapped_conn.getCapabilities().AndRaise(
++                    libvirt.libvirtError("fake failure"))
++
++            libvirt.libvirtError.get_error_code().AndReturn(error)
++            libvirt.libvirtError.get_error_domain().AndReturn(domain)
++
++            self.mox.ReplayAll()
++
++            self.assertFalse(conn._test_connection())
++
++            self.mox.UnsetStubs()
++
+     def test_volume_in_mapping(self):
+         conn = connection.LibvirtConnection(False)
+         swap = {'device_name': '/dev/sdb',
+diff --git a/nova/virt/libvirt/connection.py b/nova/virt/libvirt/connection.py
+index ba1dc86..5237285 100644
+--- a/nova/virt/libvirt/connection.py
++++ b/nova/virt/libvirt/connection.py
+@@ -203,7 +203,8 @@ class LibvirtConnection(driver.ComputeDriver):
+             return True
+         except libvirt.libvirtError as e:
+             if e.get_error_code() == libvirt.VIR_ERR_SYSTEM_ERROR and \
+-               e.get_error_domain() == libvirt.VIR_FROM_REMOTE:
++               e.get_error_domain() in (libvirt.VIR_FROM_REMOTE,
++                       libvirt.VIR_FROM_RPC):
+                 LOG.debug(_('Connection to libvirt broke'))
+                 return False
+             raise
+-- 
+1.7.6.5
+
diff --git a/0080-Add-Support-to-delete-VMs-in-error-state.patch b/0080-Add-Support-to-delete-VMs-in-error-state.patch
new file mode 100644
index 0000000..acb9ecc
--- /dev/null
+++ b/0080-Add-Support-to-delete-VMs-in-error-state.patch
@@ -0,0 +1,27 @@
+From 400095e7f37020b8d671a1559452d88512fd60e8 Mon Sep 17 00:00:00 2001
+From: Joe Gordon <jogo at cloudscaling.com>
+Date: Mon, 2 Jan 2012 17:16:06 -0800
+Subject: [PATCH 80/94] Add Support to delete VMs in error state.
+
+Already supported in master
+
+Change-Id: I548474ba5cdbea398d6a7746b5dfcbf026d4d90f
+---
+ nova/compute/api.py |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/nova/compute/api.py b/nova/compute/api.py
+index 0d6e16d..7d42d34 100644
+--- a/nova/compute/api.py
++++ b/nova/compute/api.py
+@@ -82,6 +82,7 @@ def _is_able_to_shutdown(instance, instance_id):
+         vm_states.ACTIVE,
+         vm_states.REBUILDING,
+         vm_states.BUILDING,
++        vm_states.ERROR,
+     ]
+ 
+     if vm_state not in valid_shutdown_states:
+-- 
+1.7.6.5
+
diff --git a/0081-Fix-to-correctly-report-memory-on-Linux-3.X.patch b/0081-Fix-to-correctly-report-memory-on-Linux-3.X.patch
new file mode 100644
index 0000000..09f78aa
--- /dev/null
+++ b/0081-Fix-to-correctly-report-memory-on-Linux-3.X.patch
@@ -0,0 +1,38 @@
+From c067876e587ac55cd139f054900ca5219089ae22 Mon Sep 17 00:00:00 2001
+From: Mandell Degerness <mdegerne at gmail.com>
+Date: Mon, 21 Nov 2011 23:54:36 +0000
+Subject: [PATCH 81/94] Fix to correctly report memory on Linux 3.X.
+
+If sys is compiled on a Linux 3.X system, it returns LINUX3 instead of
+LINUX2 for sys.platform.upper().
+
+Change-Id: I78dae37d4facbaf6513c0eab651b1a06b93949b2
+---
+ nova/virt/libvirt/connection.py |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/nova/virt/libvirt/connection.py b/nova/virt/libvirt/connection.py
+index 36938bf..333d0cd 100644
+--- a/nova/virt/libvirt/connection.py
++++ b/nova/virt/libvirt/connection.py
+@@ -1348,7 +1348,7 @@ class LibvirtConnection(driver.ComputeDriver):
+ 
+         """
+ 
+-        if sys.platform.upper() != 'LINUX2':
++        if sys.platform.upper() not in ['LINUX2', 'LINUX3']:
+             return 0
+ 
+         meminfo = open('/proc/meminfo').read().split()
+@@ -1389,7 +1389,7 @@ class LibvirtConnection(driver.ComputeDriver):
+ 
+         """
+ 
+-        if sys.platform.upper() != 'LINUX2':
++        if sys.platform.upper() not in ['LINUX2', 'LINUX3']:
+             return 0
+ 
+         m = open('/proc/meminfo').read().split()
+-- 
+1.7.6.5
+
diff --git a/0082-avoid-error-and-trace-on-dom.vcpus-in-lxc.patch b/0082-avoid-error-and-trace-on-dom.vcpus-in-lxc.patch
new file mode 100644
index 0000000..4745f0e
--- /dev/null
+++ b/0082-avoid-error-and-trace-on-dom.vcpus-in-lxc.patch
@@ -0,0 +1,35 @@
+From abea7aac12704dcd0bc337e03f4e47a8ec189df8 Mon Sep 17 00:00:00 2001
+From: Scott Moser <smoser at ubuntu.com>
+Date: Tue, 13 Dec 2011 16:48:05 -0500
+Subject: [PATCH 82/94] avoid error and trace on dom.vcpus() in lxc
+
+This fixes bug 903943.  If you used lxc, you'd eventually
+see stack traces in nova-compute due to use of dom.vcpus().
+
+Change-Id: I8ff4e973d33eef3df116feb237b2febc8e6a59b5
+---
+ nova/virt/libvirt/connection.py |    8 +++++++-
+ 1 files changed, 7 insertions(+), 1 deletions(-)
+
+diff --git a/nova/virt/libvirt/connection.py b/nova/virt/libvirt/connection.py
+index 36938bf..d2735ea 100644
+--- a/nova/virt/libvirt/connection.py
++++ b/nova/virt/libvirt/connection.py
+@@ -1379,7 +1379,13 @@ class LibvirtConnection(driver.ComputeDriver):
+         total = 0
+         for dom_id in self._conn.listDomainsID():
+             dom = self._conn.lookupByID(dom_id)
+-            total += len(dom.vcpus()[1])
++            vcpus = dom.vcpus()
++            if vcpus is None:
++                # dom.vcpus is not implemented for lxc, but returning 0 for
++                # a used count is hardly useful for something measuring usage
++                total += 1
++            else:
++                total += len(vcpus[1])
+         return total
+ 
+     def get_memory_mb_used(self):
+-- 
+1.7.6.5
+
diff --git a/0083-Bug-751229-Floating-address-range-fixed.patch b/0083-Bug-751229-Floating-address-range-fixed.patch
new file mode 100644
index 0000000..94a2453
--- /dev/null
+++ b/0083-Bug-751229-Floating-address-range-fixed.patch
@@ -0,0 +1,43 @@
+From 1085e9d0fdc81eea734482e42a5fcb6ae1f4e8f7 Mon Sep 17 00:00:00 2001
+From: Ivan Kolodyazhny <e0ne at e0ne.info>
+Date: Wed, 28 Dec 2011 23:30:35 +0200
+Subject: [PATCH 83/94] Bug 751229: Floating address range fixed
+
+Change-Id: I4c7ab8512fe3a00dd555d3a183b2c2348cef9e21
+---
+ Authors         |    1 +
+ bin/nova-manage |    6 ++++--
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/Authors b/Authors
+index a9266b2..9c0f5c5 100644
+--- a/Authors
++++ b/Authors
+@@ -48,6 +48,7 @@ Hisaharu Ishii <ishii.hisaharu at lab.ntt.co.jp>
+ Hisaki Ohara <hisaki.ohara at intel.com>
+ Ilya Alekseyev <ilyaalekseyev at acm.org>
+ Isaku Yamahata <yamahata at valinux.co.jp>
++Ivan Kolodyazhny <e0ne at e0ne.info>
+ Jake Dahn <jake at ansolabs.com>
+ James E. Blair <jeblair at hp.com>
+ Jason Cannavale <jason.cannavale at rackspace.com>
+diff --git a/bin/nova-manage b/bin/nova-manage
+index 3ff73f1..45d649e 100755
+--- a/bin/nova-manage
++++ b/bin/nova-manage
+@@ -683,8 +683,10 @@ class FloatingIpCommands(object):
+     @args('--ip_range', dest="range", metavar='<range>', help='IP range')
+     def create(self, range):
+         """Creates floating ips for zone by range"""
+-        for address in netaddr.IPNetwork(range):
+-            db.floating_ip_create(context.get_admin_context(),
++        addresses = netaddr.IPNetwork(range)
++        admin_context = context.get_admin_context()
++        for address in addresses.iter_hosts():
++            db.floating_ip_create(admin_context,
+                                   {'address': str(address)})
+ 
+     @args('--ip_range', dest="ip_range", metavar='<range>', help='IP range')
+-- 
+1.7.6.5
+
diff --git a/0084-Bug-820059-bin-nova-manage.py-VpnCommands.spawn-call.patch b/0084-Bug-820059-bin-nova-manage.py-VpnCommands.spawn-call.patch
new file mode 100644
index 0000000..8edb463
--- /dev/null
+++ b/0084-Bug-820059-bin-nova-manage.py-VpnCommands.spawn-call.patch
@@ -0,0 +1,60 @@
+From fc37582812747887ebcce766fd80541da98c3b43 Mon Sep 17 00:00:00 2001
+From: Ivan Kolodyazhny <e0ne at e0ne.info>
+Date: Thu, 24 Nov 2011 14:54:30 +0200
+Subject: [PATCH 84/94] Bug 820059: bin/nova-manage.py VpnCommands.spawn calls
+ non-existant method VpnCommands._vpn_for - fixed
+
+Change-Id: I86c509d98fac685a5d658f397d0672f71b4bc175
+---
+ Authors         |    1 +
+ bin/nova-manage |    7 ++++++-
+ 2 files changed, 7 insertions(+), 1 deletions(-)
+
+diff --git a/Authors b/Authors
+index a9266b2..9c0f5c5 100644
+--- a/Authors
++++ b/Authors
+@@ -48,6 +48,7 @@ Hisaharu Ishii <ishii.hisaharu at lab.ntt.co.jp>
+ Hisaki Ohara <hisaki.ohara at intel.com>
+ Ilya Alekseyev <ilyaalekseyev at acm.org>
+ Isaku Yamahata <yamahata at valinux.co.jp>
++Ivan Kolodyazhny <e0ne at e0ne.info>
+ Jake Dahn <jake at ansolabs.com>
+ James E. Blair <jeblair at hp.com>
+ Jason Cannavale <jason.cannavale at rackspace.com>
+diff --git a/bin/nova-manage b/bin/nova-manage
+index 3ff73f1..fb6f7bd 100755
+--- a/bin/nova-manage
++++ b/bin/nova-manage
+@@ -88,6 +88,7 @@ from nova import rpc
+ from nova import utils
+ from nova import version
+ from nova import vsa
++from nova.api.ec2 import admin
+ from nova.api.ec2 import ec2utils
+ from nova.auth import manager
+ from nova.cloudpipe import pipelib
+@@ -175,8 +176,9 @@ class VpnCommands(object):
+     def spawn(self):
+         """Run all VPNs."""
+         print "WARNING: This method only works with deprecated auth"
++        ctxt = context.get_admin_context()
+         for p in reversed(self.manager.get_projects()):
+-            if not self._vpn_for(p.id):
++            if self._vpn_for(ctxt, p.id):
+                 print 'spawning %s' % p.id
+                 self.pipe.launch_vpn_instance(p.id, p.project_manager_id)
+                 time.sleep(10)
+@@ -212,6 +214,9 @@ class VpnCommands(object):
+                               {'vpn_public_address': ip,
+                                'vpn_public_port': int(port)})
+ 
++    def _vpn_for(self, context, project_id):
++        return admin.AdminController()._vpn_for(context, project_id)
++
+ 
+ class ShellCommands(object):
+     def bpython(self):
+-- 
+1.7.6.5
+
diff --git a/0085-Pass-r-option-to-collie-cluster-status.patch b/0085-Pass-r-option-to-collie-cluster-status.patch
new file mode 100644
index 0000000..63b55da
--- /dev/null
+++ b/0085-Pass-r-option-to-collie-cluster-status.patch
@@ -0,0 +1,47 @@
+From 43e0b44db00b3aece584978dace0bcc84e0eef52 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Fran=C3=A7ois=20Charlier?= <francois.charlier at enovance.com>
+Date: Fri, 2 Dec 2011 16:55:21 +0100
+Subject: [PATCH 85/94] Pass '-r' option to 'collie cluster status'.
+
+The  'collie  cluster  status'  default output  is  more  verbose  since
+sheepdog 0.24.  The '-r' (raw)  option has  been added for  less verbose
+output but won't be used to ensure compatibility with pre-0.24 sheepdog.
+
+Change-Id: Ie31bdded928772250515e439016fc5c5beb00d83
+---
+ Authors               |    1 +
+ nova/volume/driver.py |    5 ++++-
+ 2 files changed, 5 insertions(+), 1 deletions(-)
+
+diff --git a/Authors b/Authors
+index a9266b2..cc9683b 100644
+--- a/Authors
++++ b/Authors
+@@ -43,6 +43,7 @@ Eldar Nugaev <reldan at oscloud.ru>
+ Eric Day <eday at oddments.org>
+ Eric Windisch <eric at cloudscaling.com>
+ Ewan Mellor <ewan.mellor at citrix.com>
++François Charlier <francois.charlier at enovance.com>
+ Gabe Westmaas <gabe.westmaas at rackspace.com>
+ Hisaharu Ishii <ishii.hisaharu at lab.ntt.co.jp>
+ Hisaki Ohara <hisaki.ohara at intel.com>
+diff --git a/nova/volume/driver.py b/nova/volume/driver.py
+index e5bb498..bb56956 100644
+--- a/nova/volume/driver.py
++++ b/nova/volume/driver.py
+@@ -690,8 +690,11 @@ class SheepdogDriver(VolumeDriver):
+     def check_for_setup_error(self):
+         """Returns an error if prerequisites aren't met"""
+         try:
++            #NOTE(francois-charlier) Since 0.24 'collie cluster info -r'
++            #  gives short output, but for compatibility reason we won't
++            #  use it and just check if 'running' is in the output.
+             (out, err) = self._execute('collie', 'cluster', 'info')
+-            if not out.startswith('running'):
++            if not 'running' in out.split():
+                 raise exception.Error(_("Sheepdog is not working: %s") % out)
+         except exception.ProcessExecutionError:
+             raise exception.Error(_("Sheepdog is not working"))
+-- 
+1.7.6.5
+
diff --git a/0086-Fixing-snapshot-failure-task_state.patch b/0086-Fixing-snapshot-failure-task_state.patch
new file mode 100644
index 0000000..aef0559
--- /dev/null
+++ b/0086-Fixing-snapshot-failure-task_state.patch
@@ -0,0 +1,73 @@
+From 7e4e216e9011014d926d9a90afe46d4b64c0e369 Mon Sep 17 00:00:00 2001
+From: David Subiros <david.perez5 at hp.com>
+Date: Wed, 30 Nov 2011 09:45:23 +0000
+Subject: [PATCH 86/94] Fixing snapshot failure task_state
+
+fixes bug 898162
+If a snapshot fails now the instance task_state is set back to None.
+
+Change-Id: I5ed8850a35aea901adf253f3f4adc590efd3a075
+---
+ nova/compute/manager.py    |    6 ++++--
+ nova/tests/test_compute.py |   28 ++++++++++++++++++++++++++++
+ 2 files changed, 32 insertions(+), 2 deletions(-)
+
+diff --git a/nova/compute/manager.py b/nova/compute/manager.py
+index b926eac..98878f3 100644
+--- a/nova/compute/manager.py
++++ b/nova/compute/manager.py
+@@ -683,8 +683,10 @@ class ComputeManager(manager.SchedulerDependentManager):
+                        'instance: %(instance_id)s (state: %(state)s '
+                        'expected: %(running)s)') % locals())
+ 
+-        self.driver.snapshot(context, instance_ref, image_id)
+-        self._instance_update(context, instance_id, task_state=None)
++        try:
++            self.driver.snapshot(context, instance_ref, image_id)
++        finally:
++            self._instance_update(context, instance_id, task_state=None)
+ 
+         if image_type == 'snapshot' and rotation:
+             raise exception.ImageRotationNotAllowed()
+diff --git a/nova/tests/test_compute.py b/nova/tests/test_compute.py
+index c6747d0..f8c5b2c 100644
+--- a/nova/tests/test_compute.py
++++ b/nova/tests/test_compute.py
+@@ -387,6 +387,34 @@ class ComputeTestCase(test.TestCase):
+ 
+         db.instance_destroy(self.context, instance_id)
+ 
++    def test_snapshot_fails(self):
++        """Ensure task_state is set to None if snapshot fails"""
++        def fake_snapshot(*args, **kwargs):
++            raise Exception("I don't want to create a snapshot")
++
++        self.stubs.Set(self.compute.driver, 'snapshot', fake_snapshot)
++
++        instance_id = self._create_instance()
++        self.compute.run_instance(self.context, instance_id)
++        self.assertRaises(Exception, self.compute.snapshot_instance,
++                          self.context, instance_id, "failing_snapshot")
++        self._assert_state({'task_state': None})
++        self.compute.terminate_instance(self.context, instance_id)
++
++    def _assert_state(self, state_dict):
++        """Assert state of VM is equal to state passed as parameter"""
++        instances = db.instance_get_all(context.get_admin_context())
++        self.assertEqual(len(instances), 1)
++
++        if 'vm_state' in state_dict:
++            self.assertEqual(state_dict['vm_state'], instances[0]['vm_state'])
++        if 'task_state' in state_dict:
++            self.assertEqual(state_dict['task_state'],
++                             instances[0]['task_state'])
++        if 'power_state' in state_dict:
++            self.assertEqual(state_dict['power_state'],
++                             instances[0]['power_state'])
++
+     def test_console_output(self):
+         """Make sure we can get console output from instance"""
+         instance_id = self._create_instance()
+-- 
+1.7.6.5
+
diff --git a/0037-Add-INPUT-chain-rule-for-EC2-metadata-requests-lp-85.patch b/0087-Add-INPUT-chain-rule-for-EC2-metadata-requests-lp-85.patch
similarity index 89%
rename from 0037-Add-INPUT-chain-rule-for-EC2-metadata-requests-lp-85.patch
rename to 0087-Add-INPUT-chain-rule-for-EC2-metadata-requests-lp-85.patch
index f7a1b87..68563c0 100644
--- a/0037-Add-INPUT-chain-rule-for-EC2-metadata-requests-lp-85.patch
+++ b/0087-Add-INPUT-chain-rule-for-EC2-metadata-requests-lp-85.patch
@@ -1,7 +1,7 @@
-From cf35b2a4900ef47c2f564d9eb6896434db711cdf Mon Sep 17 00:00:00 2001
+From 8be66ace12f3af6bbc7cdbe651a78fd9ab363eeb Mon Sep 17 00:00:00 2001
 From: Mark McLoughlin <markmc at redhat.com>
 Date: Mon, 5 Sep 2011 07:10:52 +0100
-Subject: [PATCH 37/44] Add INPUT chain rule for EC2 metadata requests
+Subject: [PATCH 87/94] Add INPUT chain rule for EC2 metadata requests
  (lp:856385)
 
 On Fedora, the default policy for the INPUT chain in the filter table
@@ -22,7 +22,7 @@ Change-Id: Ic99ba9249ce5219cd2631184154add82d25d9d6d
  1 files changed, 4 insertions(+), 0 deletions(-)
 
 diff --git a/nova/network/linux_net.py b/nova/network/linux_net.py
-index c0be962..fd51e9b 100755
+index a6aea8a..df43f54 100755
 --- a/nova/network/linux_net.py
 +++ b/nova/network/linux_net.py
 @@ -378,6 +378,10 @@ def metadata_forward():
diff --git a/0038-Have-nova-api-add-the-INPUT-rule-for-EC2-metadata-lp.patch b/0088-Have-nova-api-add-the-INPUT-rule-for-EC2-metadata-lp.patch
similarity index 97%
rename from 0038-Have-nova-api-add-the-INPUT-rule-for-EC2-metadata-lp.patch
rename to 0088-Have-nova-api-add-the-INPUT-rule-for-EC2-metadata-lp.patch
index 7c7afcc..d4534d1 100644
--- a/0038-Have-nova-api-add-the-INPUT-rule-for-EC2-metadata-lp.patch
+++ b/0088-Have-nova-api-add-the-INPUT-rule-for-EC2-metadata-lp.patch
@@ -1,7 +1,7 @@
-From ff39bf6f78d2a2c0ea65b87ff0eec6f652eefc65 Mon Sep 17 00:00:00 2001
+From ec3c303f4e240c04400bc3c7d6e9171bc76457dc Mon Sep 17 00:00:00 2001
 From: Mark McLoughlin <markmc at redhat.com>
 Date: Thu, 8 Sep 2011 14:29:49 +0100
-Subject: [PATCH 38/44] Have nova-api add the INPUT rule for EC2 metadata
+Subject: [PATCH 88/94] Have nova-api add the INPUT rule for EC2 metadata
  (lp:856385)
 
 It makes no sense to have nova-network add an iptables rule for the EC2
@@ -70,7 +70,7 @@ index 0000000..b3fcf93
 +        """
 +        self.network_driver.metadata_accept()
 diff --git a/nova/flags.py b/nova/flags.py
-index 55a56f2..56bc797 100644
+index 11ac9f6..792407b 100644
 --- a/nova/flags.py
 +++ b/nova/flags.py
 @@ -413,6 +413,9 @@ DEFINE_bool('resume_guests_state_on_host_boot', False,
@@ -84,7 +84,7 @@ index 55a56f2..56bc797 100644
  
  DEFINE_bool('monkey_patch', False,
 diff --git a/nova/network/linux_net.py b/nova/network/linux_net.py
-index fd51e9b..297146b 100755
+index df43f54..2ad8452 100755
 --- a/nova/network/linux_net.py
 +++ b/nova/network/linux_net.py
 @@ -378,10 +378,17 @@ def metadata_forward():
@@ -108,7 +108,7 @@ index fd51e9b..297146b 100755
  
  
 diff --git a/nova/network/manager.py b/nova/network/manager.py
-index d8de396..71e171c 100644
+index b0befab..562401b 100644
 --- a/nova/network/manager.py
 +++ b/nova/network/manager.py
 @@ -96,8 +96,6 @@ flags.DEFINE_string('fixed_range_v6', 'fd00::/48', 'Fixed IPv6 address block')
diff --git a/0039-Allow-the-user-to-choose-either-ietadm-or-tgtadm-lp-.patch b/0089-Allow-the-user-to-choose-either-ietadm-or-tgtadm-lp-.patch
similarity index 97%
rename from 0039-Allow-the-user-to-choose-either-ietadm-or-tgtadm-lp-.patch
rename to 0089-Allow-the-user-to-choose-either-ietadm-or-tgtadm-lp-.patch
index 5d364c0..57c0a6d 100644
--- a/0039-Allow-the-user-to-choose-either-ietadm-or-tgtadm-lp-.patch
+++ b/0089-Allow-the-user-to-choose-either-ietadm-or-tgtadm-lp-.patch
@@ -1,7 +1,7 @@
-From 95e4d32d5abc9a86d7a6d1344f9c44ae293aca7b Mon Sep 17 00:00:00 2001
+From 8593b6efeb2650c4630f86caff9008c5360b0ad4 Mon Sep 17 00:00:00 2001
 From: Mark McLoughlin <markmc at redhat.com>
 Date: Thu, 11 Aug 2011 07:44:38 -0400
-Subject: [PATCH 39/44] Allow the user to choose either ietadm or tgtadm
+Subject: [PATCH 89/94] Allow the user to choose either ietadm or tgtadm
  (lp:819997)
 
 (Actually authored by Chuck Short <zulcss at ubuntu.com> but Gerrit won't
@@ -15,7 +15,7 @@ Change-Id: Ia350345a25a5f39b8aa26c8daf2a9987590d4b62
  3 files changed, 111 insertions(+), 34 deletions(-)
 
 diff --git a/nova/flags.py b/nova/flags.py
-index 56bc797..7e59ddc 100644
+index 792407b..2280222 100644
 --- a/nova/flags.py
 +++ b/nova/flags.py
 @@ -416,6 +416,9 @@ DEFINE_string('root_helper', 'sudo',
@@ -29,10 +29,10 @@ index 56bc797..7e59ddc 100644
  
  DEFINE_bool('monkey_patch', False,
 diff --git a/nova/tests/test_volume.py b/nova/tests/test_volume.py
-index 7888b6b..ba872b7 100644
+index 689383c..5aa4853 100644
 --- a/nova/tests/test_volume.py
 +++ b/nova/tests/test_volume.py
-@@ -414,7 +414,8 @@ class ISCSITestCase(DriverTestCase):
+@@ -442,7 +442,8 @@ class ISCSITestCase(DriverTestCase):
          self.mox.StubOutWithMock(self.volume.driver, '_execute')
          for i in volume_id_list:
              tid = db.volume_get_iscsi_target_num(self.context, i)
@@ -42,7 +42,7 @@ index 7888b6b..ba872b7 100644
                                          "--tid=%(tid)d" % locals(),
                                          run_as_root=True)
  
-@@ -434,7 +435,7 @@ class ISCSITestCase(DriverTestCase):
+@@ -462,7 +463,7 @@ class ISCSITestCase(DriverTestCase):
          # the first vblade process isn't running
          tid = db.volume_get_iscsi_target_num(self.context, volume_id_list[0])
          self.mox.StubOutWithMock(self.volume.driver, '_execute')
@@ -52,7 +52,7 @@ index 7888b6b..ba872b7 100644
                                      run_as_root=True).AndRaise(
                                              exception.ProcessExecutionError())
 diff --git a/nova/volume/driver.py b/nova/volume/driver.py
-index e5bb498..76f0655 100644
+index bb56956..781b1f2 100644
 --- a/nova/volume/driver.py
 +++ b/nova/volume/driver.py
 @@ -368,19 +368,40 @@ class ISCSIDriver(VolumeDriver):
diff --git a/0040-Remove-VolumeDriver.sync_exec-method-lp-819997.patch b/0090-Remove-VolumeDriver.sync_exec-method-lp-819997.patch
similarity index 95%
rename from 0040-Remove-VolumeDriver.sync_exec-method-lp-819997.patch
rename to 0090-Remove-VolumeDriver.sync_exec-method-lp-819997.patch
index 129c132..9073e82 100644
--- a/0040-Remove-VolumeDriver.sync_exec-method-lp-819997.patch
+++ b/0090-Remove-VolumeDriver.sync_exec-method-lp-819997.patch
@@ -1,7 +1,7 @@
-From 01ffa1eedf3cdced97bc4e7e07175d6dab9bb0a9 Mon Sep 17 00:00:00 2001
+From 84a16797a74adaa8a80027ced259e36384f23ef1 Mon Sep 17 00:00:00 2001
 From: Mark McLoughlin <markmc at redhat.com>
 Date: Sun, 18 Sep 2011 12:04:46 +0100
-Subject: [PATCH 40/44] Remove VolumeDriver.sync_exec method (lp:819997)
+Subject: [PATCH 90/94] Remove VolumeDriver.sync_exec method (lp:819997)
 
 We always use the same functions for sync_exec and execute.
 
@@ -19,7 +19,7 @@ Change-Id: I86d491cfbf8be73672df7cfdf22e465627a86034
  2 files changed, 62 insertions(+), 69 deletions(-)
 
 diff --git a/nova/tests/test_volume.py b/nova/tests/test_volume.py
-index ba872b7..86a03d9 100644
+index 5aa4853..8a80aeb 100644
 --- a/nova/tests/test_volume.py
 +++ b/nova/tests/test_volume.py
 @@ -271,7 +271,6 @@ class DriverTestCase(test.TestCase):
@@ -31,7 +31,7 @@ index ba872b7..86a03d9 100644
          log = logging.getLogger()
          self.stream = cStringIO.StringIO()
 diff --git a/nova/volume/driver.py b/nova/volume/driver.py
-index 76f0655..8468602 100644
+index 781b1f2..67ea423 100644
 --- a/nova/volume/driver.py
 +++ b/nova/volume/driver.py
 @@ -60,12 +60,10 @@ flags.DEFINE_string('rbd_pool', 'rbd',
@@ -136,7 +136,7 @@ index 76f0655..8468602 100644
                                                *args, **kwargs)
  
      def check_for_setup_error(self):
-@@ -943,14 +939,14 @@ class ZadaraBEDriver(ISCSIDriver):
+@@ -946,14 +942,14 @@ class ZadaraBEDriver(ISCSIDriver):
                  break
  
          try:
@@ -159,7 +159,7 @@ index 76f0655..8468602 100644
          except exception.ProcessExecutionError:
              LOG.debug(_("VSA BE create_volume for %s failed"), volume['name'])
              raise
-@@ -968,11 +964,11 @@ class ZadaraBEDriver(ISCSIDriver):
+@@ -971,11 +967,11 @@ class ZadaraBEDriver(ISCSIDriver):
              return
  
          try:
@@ -176,7 +176,7 @@ index 76f0655..8468602 100644
          except exception.ProcessExecutionError:
              LOG.debug(_("VSA BE delete_volume for %s failed"), volume['name'])
              return
-@@ -1053,12 +1049,12 @@ class ZadaraBEDriver(ISCSIDriver):
+@@ -1056,12 +1052,12 @@ class ZadaraBEDriver(ISCSIDriver):
              return
  
          try:
@@ -195,7 +195,7 @@ index 76f0655..8468602 100644
          except exception.ProcessExecutionError:
              LOG.debug(_("VSA BE remove_export for %s failed"), volume['name'])
              return
-@@ -1083,13 +1079,12 @@ class ZadaraBEDriver(ISCSIDriver):
+@@ -1086,13 +1082,12 @@ class ZadaraBEDriver(ISCSIDriver):
          Common logic that asks zadara_sncfg to setup iSCSI target/lun for
          this volume
          """
@@ -215,7 +215,7 @@ index 76f0655..8468602 100644
  
          result_xml = ElementTree.fromstring(out)
          response_node = result_xml.find("Sn")
-@@ -1110,11 +1105,10 @@ class ZadaraBEDriver(ISCSIDriver):
+@@ -1113,11 +1108,10 @@ class ZadaraBEDriver(ISCSIDriver):
      def _get_qosgroup_summary(self):
          """gets the list of qosgroups from Zadara BE"""
          try:
diff --git a/0041-Refactor-ietadm-tgtadm-calls-out-into-helper-classes.patch b/0091-Refactor-ietadm-tgtadm-calls-out-into-helper-classes.patch
similarity index 98%
rename from 0041-Refactor-ietadm-tgtadm-calls-out-into-helper-classes.patch
rename to 0091-Refactor-ietadm-tgtadm-calls-out-into-helper-classes.patch
index fc59c7f..22418b4 100644
--- a/0041-Refactor-ietadm-tgtadm-calls-out-into-helper-classes.patch
+++ b/0091-Refactor-ietadm-tgtadm-calls-out-into-helper-classes.patch
@@ -1,7 +1,7 @@
-From 4ee1b55f3c5e667e1a84a365f5ed759e3a284409 Mon Sep 17 00:00:00 2001
+From 115346111630c53fe258840bac130e6a578b4bcb Mon Sep 17 00:00:00 2001
 From: Mark McLoughlin <markmc at redhat.com>
 Date: Sun, 18 Sep 2011 16:02:43 +0100
-Subject: [PATCH 41/44] Refactor ietadm/tgtadm calls out into helper classes
+Subject: [PATCH 91/94] Refactor ietadm/tgtadm calls out into helper classes
  (lp:819997)
 
 Add a new TargetAdmin abstract base class and implement it using ietadm
@@ -19,7 +19,7 @@ Change-Id: I1c0064e5d35483a6c4059cfc61a484f5f576b2da
  create mode 100644 nova/volume/iscsi.py
 
 diff --git a/nova/flags.py b/nova/flags.py
-index 7e59ddc..56bc797 100644
+index 2280222..792407b 100644
 --- a/nova/flags.py
 +++ b/nova/flags.py
 @@ -416,9 +416,6 @@ DEFINE_string('root_helper', 'sudo',
@@ -155,7 +155,7 @@ index 0000000..d7aed0f
 +ietadm --op delete --tid=%(tid)s
 +"""
 diff --git a/nova/tests/test_volume.py b/nova/tests/test_volume.py
-index 86a03d9..a087975 100644
+index 8a80aeb..7c9a978 100644
 --- a/nova/tests/test_volume.py
 +++ b/nova/tests/test_volume.py
 @@ -270,7 +270,7 @@ class DriverTestCase(test.TestCase):
@@ -167,7 +167,7 @@ index 86a03d9..a087975 100644
  
          log = logging.getLogger()
          self.stream = cStringIO.StringIO()
-@@ -410,13 +410,10 @@ class ISCSITestCase(DriverTestCase):
+@@ -438,13 +438,10 @@ class ISCSITestCase(DriverTestCase):
          """No log message when all the vblade processes are running."""
          volume_id_list = self._attach_volume()
  
@@ -183,7 +183,7 @@ index 86a03d9..a087975 100644
  
          self.stream.truncate(0)
          self.mox.ReplayAll()
-@@ -433,11 +430,9 @@ class ISCSITestCase(DriverTestCase):
+@@ -461,11 +458,9 @@ class ISCSITestCase(DriverTestCase):
  
          # the first vblade process isn't running
          tid = db.volume_get_iscsi_target_num(self.context, volume_id_list[0])
@@ -199,7 +199,7 @@ index 86a03d9..a087975 100644
          self.mox.ReplayAll()
          self.assertRaises(exception.ProcessExecutionError,
 diff --git a/nova/volume/driver.py b/nova/volume/driver.py
-index 8468602..3c2b80b 100644
+index 67ea423..82f0106 100644
 --- a/nova/volume/driver.py
 +++ b/nova/volume/driver.py
 @@ -28,6 +28,7 @@ from nova import exception
diff --git a/0042-Bug-898257-abstract-out-disk-image-access-methods.patch b/0092-Bug-898257-abstract-out-disk-image-access-methods.patch
similarity index 98%
rename from 0042-Bug-898257-abstract-out-disk-image-access-methods.patch
rename to 0092-Bug-898257-abstract-out-disk-image-access-methods.patch
index 779417c..7595368 100644
--- a/0042-Bug-898257-abstract-out-disk-image-access-methods.patch
+++ b/0092-Bug-898257-abstract-out-disk-image-access-methods.patch
@@ -1,7 +1,7 @@
-From 6ae9df1eea3749ed2e570e1573b8a781f17caed4 Mon Sep 17 00:00:00 2001
+From 463a14c7c722d1cbd51b0deaf23c1b0179f870f8 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?P=C3=A1draig=20Brady?= <pbrady at redhat.com>
 Date: Wed, 30 Nov 2011 17:00:17 +0000
-Subject: [PATCH 42/44] Bug#898257 abstract out disk image access methods
+Subject: [PATCH 92/94] Bug#898257 abstract out disk image access methods
 
 Rather than providing two mutually exlusive image
 access methods (loop and qemu-nbd), try each in turn.
@@ -54,10 +54,10 @@ Change-Id: If3a4b1c8f4e2f2e7300a21071340dcc839cb36d7
  create mode 100644 nova/virt/disk/nbd.py
 
 diff --git a/nova/utils.py b/nova/utils.py
-index c64b11f..f2e69cf 100644
+index 696e060..2062293 100644
 --- a/nova/utils.py
 +++ b/nova/utils.py
-@@ -201,6 +201,36 @@ def execute(*cmd, **kwargs):
+@@ -203,6 +203,36 @@ def execute(*cmd, **kwargs):
              greenthread.sleep(0)
  
  
@@ -1021,7 +1021,7 @@ index 0000000..55b287e
 +        self.linked = False
 +        self.device = None
 diff --git a/nova/virt/libvirt/connection.py b/nova/virt/libvirt/connection.py
-index 67f4434..19ad79e 100644
+index 55cb31d..9abd330 100644
 --- a/nova/virt/libvirt/connection.py
 +++ b/nova/virt/libvirt/connection.py
 @@ -179,6 +179,7 @@ class LibvirtConnection(driver.ComputeDriver):
@@ -1032,7 +1032,7 @@ index 67f4434..19ad79e 100644
          self.read_only = read_only
  
          fw_class = utils.import_class(FLAGS.firewall_driver)
-@@ -336,7 +337,7 @@ class LibvirtConnection(driver.ComputeDriver):
+@@ -348,7 +349,7 @@ class LibvirtConnection(driver.ComputeDriver):
          LOG.info(_('instance %(instance_name)s: deleting instance files'
                  ' %(target)s') % locals())
          if FLAGS.libvirt_type == 'lxc':
@@ -1041,7 +1041,7 @@ index 67f4434..19ad79e 100644
          if os.path.exists(target):
              shutil.rmtree(target)
  
-@@ -992,11 +993,11 @@ class LibvirtConnection(driver.ComputeDriver):
+@@ -1004,11 +1005,11 @@ class LibvirtConnection(driver.ComputeDriver):
              if config_drive:  # Should be True or None by now.
                  injection_path = basepath('disk.config')
                  img_id = 'config-drive'
@@ -1055,7 +1055,7 @@ index 67f4434..19ad79e 100644
  
              for injection in ('metadata', 'key', 'net'):
                  if locals()[injection]:
-@@ -1006,8 +1007,8 @@ class LibvirtConnection(driver.ComputeDriver):
+@@ -1018,8 +1019,8 @@ class LibvirtConnection(driver.ComputeDriver):
              try:
                  disk.inject_data(injection_path, key, net, metadata,
                                   partition=target_partition,
@@ -1066,7 +1066,7 @@ index 67f4434..19ad79e 100644
  
              except Exception as e:
                  # This could be a windows image, or a vmdk format disk
-@@ -1015,9 +1016,9 @@ class LibvirtConnection(driver.ComputeDriver):
+@@ -1027,9 +1028,9 @@ class LibvirtConnection(driver.ComputeDriver):
                          ' data into image %(img_id)s (%(e)s)') % locals())
  
          if FLAGS.libvirt_type == 'lxc':
diff --git a/0043-Bug-898257-support-handling-images-with-libguestfs.patch b/0093-Bug-898257-support-handling-images-with-libguestfs.patch
similarity index 97%
rename from 0043-Bug-898257-support-handling-images-with-libguestfs.patch
rename to 0093-Bug-898257-support-handling-images-with-libguestfs.patch
index 8916944..502c594 100644
--- a/0043-Bug-898257-support-handling-images-with-libguestfs.patch
+++ b/0093-Bug-898257-support-handling-images-with-libguestfs.patch
@@ -1,7 +1,7 @@
-From c8850ec6c038291b0816aa64c67e754e59ec29e2 Mon Sep 17 00:00:00 2001
+From 8ebcb58bbe45f1541237678c74dda51cfb8623c1 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?P=C3=A1draig=20Brady?= <pbrady at redhat.com>
 Date: Wed, 30 Nov 2011 17:00:17 +0000
-Subject: [PATCH 43/44] Bug#898257 support handling images with libguestfs
+Subject: [PATCH 93/94] Bug#898257 support handling images with libguestfs
 
 http://libguestfs.org/ provides both utilities and libraries
 to manipulate image files containing various operating systems.
diff --git a/0044-Ensure-we-don-t-access-the-net-when-building-docs.patch b/0094-Ensure-we-don-t-access-the-net-when-building-docs.patch
similarity index 89%
rename from 0044-Ensure-we-don-t-access-the-net-when-building-docs.patch
rename to 0094-Ensure-we-don-t-access-the-net-when-building-docs.patch
index 8d09504..4a55f6a 100644
--- a/0044-Ensure-we-don-t-access-the-net-when-building-docs.patch
+++ b/0094-Ensure-we-don-t-access-the-net-when-building-docs.patch
@@ -1,7 +1,7 @@
-From 31f7efd77ac07bebc7378b49dafa93c1219e2edf Mon Sep 17 00:00:00 2001
+From 9d2631367bab92367fb7c137ddad5701ac29b0c0 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 44/44] Ensure we don't access the net when building docs
+Subject: [PATCH 94/94] Ensure we don't access the net when building docs
 
 (Note, this has not been sent upstream)
 
diff --git a/openstack-nova.spec b/openstack-nova.spec
index ee32bbd..53892bf 100644
--- a/openstack-nova.spec
+++ b/openstack-nova.spec
@@ -2,7 +2,7 @@
 
 Name:             openstack-nova
 Version:          2011.3
-Release:          15%{?dist}
+Release:          16%{?dist}
 Summary:          OpenStack Compute (nova)
 
 Group:            Applications/System
@@ -48,44 +48,92 @@ Patch09:          0009-Fix-the-grantee-group-loading-for-source-groups.patch
 Patch10:          0010-Call-endheaders-when-auth_token-is-None.-Fixes-bug-8.patch
 Patch11:          0011-Removed-db_pool-complexities-from-nova.db.sqlalchemy.patch
 Patch12:          0012-Raise-InsufficientFreeMemory.patch
-Patch13:          0013-Add-missing-author.patch
-Patch14:          0014-Make-snapshots-private-by-default.patch
-Patch15:          0015-Snapshots-backups-can-no-longer-happen-simultaneousl.patch
-Patch16:          0016-Fixed-bug-lp850602.patch
-Patch17:          0017-bug-861310.patch
-Patch18:          0018-Enforce-snapshot-cleanup.patch
-Patch19:          0019-bug-lp845714.patch
-Patch20:          0020-Added-1.0.4-version-specifier-to-kombu-in-pip-requir.patch
-Patch21:          0021-Adds-the-tenant-id-to-the-create-images-response-Loc.patch
-Patch22:          0022-Fixes-bug-862633-OS-api-consoles-create-broken.patch
-Patch23:          0023-Deallocate-ip-if-build-fails.patch
-Patch24:          0024-Stop-returning-correct-password-on-api-calls.patch
-Patch25:          0025-Handle-pidfile-exception-for-dnsmasq.patch
-Patch26:          0026-Make-sure-unknown-extensions-return-404.patch
-Patch27:          0027-Include-original-exception-in-ClassNotFound-exceptio.patch
-Patch28:          0028-Ensure-non-default-FLAGS.logfile_mode-is-properly-co.patch
-Patch29:          0029-Don-t-leak-exceptions-out-to-users.patch
-Patch30:          0030-Makes-snapshots-work-for-amis.-Fixes-bug-873156.patch
+Patch13:          0013-Don-t-leak-exceptions-out-to-users.patch
+Patch14:          0014-Makes-snapshots-work-for-amis.-Fixes-bug-873156.patch
+Patch15:          0015-Add-missing-author.patch
+Patch16:          0016-Make-snapshots-private-by-default.patch
+Patch17:          0017-Snapshots-backups-can-no-longer-happen-simultaneousl.patch
+Patch18:          0018-Fixed-bug-lp850602.patch
+Patch19:          0019-bug-861310.patch
+Patch20:          0020-Enforce-snapshot-cleanup.patch
+Patch21:          0021-bug-lp845714.patch
+Patch22:          0022-Added-1.0.4-version-specifier-to-kombu-in-pip-requir.patch
+Patch23:          0023-Adds-the-tenant-id-to-the-create-images-response-Loc.patch
+Patch24:          0024-Fixes-bug-862633-OS-api-consoles-create-broken.patch
+Patch25:          0025-Deallocate-ip-if-build-fails.patch
+Patch26:          0026-Stop-returning-correct-password-on-api-calls.patch
+Patch27:          0027-Handle-pidfile-exception-for-dnsmasq.patch
+Patch28:          0028-Make-sure-unknown-extensions-return-404.patch
+Patch29:          0029-Include-original-exception-in-ClassNotFound-exceptio.patch
+Patch30:          0030-Ensure-non-default-FLAGS.logfile_mode-is-properly-co.patch
 Patch31:          0031-Explicit-errors-on-confirm-revertResize-failures.patch
 Patch32:          0032-Adds-ext4-and-reiserfs-to-_mount_filesystem.patch
 Patch33:          0033-Improve-access-check-on-images.patch
 Patch34:          0034-Fixes-bug-834633-Auto-assigning-floating-IPs.patch
 Patch35:          0035-fixes-bug-883233.patch
-
-# This is a security fix
-Patch36:          0036-Sanitize-EC2-manifests-and-image-tarballs.patch
+Patch36:          0036-Fix-deletion-of-instances-without-fixed-ips.patch
+Patch37:          0037-Fix-file-injection-for-OSAPI-rebuilds.-Fixes-881649.patch
+Patch38:          0038-Add-.gitreview-config-file-for-gerrit.patch
+Patch39:          0039-Adding-bulk-create-fixed-ips.-The-true-issue-here.patch
+Patch40:          0040-Retry-failed-SQL-connections-LP-876663.patch
+Patch41:          0041-Updated-NoAuth-to-account-for-requests-ending-in.patch
+Patch42:          0042-Make-sure-networks-returned-from-get_instance_nw_inf.patch
+Patch43:          0043-Bug-884527-ajax_console_proxy_port-needs-to-be-an-in.patch
+Patch44:          0044-Fix-lp-861160-newly-created-network-has-no-uuid.patch
+Patch45:          0045-Fix-KeyError-when-passed-unknown-format-of-time.patch
+Patch46:          0046-Add-local-storage-of-context-for-logging.patch
+Patch47:          0047-Bug-884863-nova-logs-everything-to-syslog-twice.patch
+Patch48:          0048-Bug-884534-nova-ajax-console-proxy-crashes-on-shutdo.patch
+Patch49:          0049-exception.KeypairNotFound-usage-correction.patch
+Patch50:          0050-fix-bug-816630.patch
+Patch51:          0051-Log-the-exception-when-we-get-one.patch
+Patch52:          0052-Change-floating-snat-to-float-snat.patch
+Patch53:          0053-Fix-for-launchpad-bug-882568.patch
+Patch54:          0054-Undefine-libvirt-saved-instances.patch
+Patch55:          0055-Log-original-dropped-exception-when-a-new-exception-.patch
+Patch56:          0056-Fix-exception-reraising-in-volume-manager.patch
+Patch57:          0057-Make-run-instances-respect-availability-zone.patch
+Patch58:          0058-Makes-rpc_allocate_fixed_ip-return-properly.patch
+Patch59:          0059-Update-exception.wrap_exception-so-that-all-exceptio.patch
+Patch60:          0060-Move-failed-instances-to-error-state.patch
+Patch61:          0061-Fixes-LP878319.patch
+Patch62:          0062-Fixes-bug-871877.patch
+Patch63:          0063-nova-manage-exit-with-status-1-if-an-image-registrat.patch
+Patch64:          0064-Fix-a-notification-bug-when-creating-instances.patch
+Patch65:          0065-fix-rebuild-sha1-not-string-error.patch
+Patch66:          0066-Verify-security-group-parameters.patch
+Patch67:          0067-Bug-886353-Faults-raised-by-OpenStack-API-Resource-h.patch
+Patch68:          0068-Makes-sure-gateways-forward-properly.patch
+Patch69:          0069-Fix-a-minor-memory-leak.patch
+Patch70:          0070-Fixes-bug-886263.patch
+Patch71:          0071-Fix-for-bug-894431.patch
+Patch72:          0072-Bug-897091-nova-actions-fails-with-HTTP-400-TypeErro.patch
+Patch73:          0073-removed-logic-of-throwing-exception-if-no-floating-i.patch
+Patch74:          0074-Fix-RPC-responses-to-allow-None-response-correctly.patch
+Patch75:          0075-Sanitize-EC2-manifests-and-image-tarballs.patch
+Patch76:          0076-Rename-.nova-venv-to-.venv.patch
+Patch77:          0077-Fix-issue-in-test_s3_malicious_tarballs.patch
+Patch78:          0078-Fixes-bug-888649.patch
+Patch79:          0079-Fixes-bug-767947.patch
+Patch80:          0080-Add-Support-to-delete-VMs-in-error-state.patch
+Patch81:          0081-Fix-to-correctly-report-memory-on-Linux-3.X.patch
+Patch82:          0082-avoid-error-and-trace-on-dom.vcpus-in-lxc.patch
+Patch83:          0083-Bug-751229-Floating-address-range-fixed.patch
+Patch84:          0084-Bug-820059-bin-nova-manage.py-VpnCommands.spawn-call.patch
+Patch85:          0085-Pass-r-option-to-collie-cluster-status.patch
+Patch86:          0086-Fixing-snapshot-failure-task_state.patch
 
 # These are Fedora specific backports from master
-Patch37:          0037-Add-INPUT-chain-rule-for-EC2-metadata-requests-lp-85.patch
-Patch38:          0038-Have-nova-api-add-the-INPUT-rule-for-EC2-metadata-lp.patch
-Patch39:          0039-Allow-the-user-to-choose-either-ietadm-or-tgtadm-lp-.patch
-Patch40:          0040-Remove-VolumeDriver.sync_exec-method-lp-819997.patch
-Patch41:          0041-Refactor-ietadm-tgtadm-calls-out-into-helper-classes.patch
-Patch42:          0042-Bug-898257-abstract-out-disk-image-access-methods.patch
-Patch43:          0043-Bug-898257-support-handling-images-with-libguestfs.patch
+Patch87:          0087-Add-INPUT-chain-rule-for-EC2-metadata-requests-lp-85.patch
+Patch88:          0088-Have-nova-api-add-the-INPUT-rule-for-EC2-metadata-lp.patch
+Patch89:          0089-Allow-the-user-to-choose-either-ietadm-or-tgtadm-lp-.patch
+Patch90:          0090-Remove-VolumeDriver.sync_exec-method-lp-819997.patch
+Patch91:          0091-Refactor-ietadm-tgtadm-calls-out-into-helper-classes.patch
+Patch92:          0092-Bug-898257-abstract-out-disk-image-access-methods.patch
+Patch93:          0093-Bug-898257-support-handling-images-with-libguestfs.patch
 
 # This is Fedora specific and not upstream
-Patch44:          0044-Ensure-we-don-t-access-the-net-when-building-docs.patch
+Patch94:          0094-Ensure-we-don-t-access-the-net-when-building-docs.patch
 
 BuildArch:        noarch
 BuildRequires:    intltool
@@ -264,6 +312,56 @@ This package contains documentation files for nova.
 %patch42 -p1
 %patch43 -p1
 %patch44 -p1
+%patch45 -p1
+%patch46 -p1
+%patch47 -p1
+%patch48 -p1
+%patch49 -p1
+%patch50 -p1
+%patch51 -p1
+%patch52 -p1
+%patch53 -p1
+%patch54 -p1
+%patch55 -p1
+%patch56 -p1
+%patch57 -p1
+%patch58 -p1
+%patch59 -p1
+%patch60 -p1
+%patch61 -p1
+%patch62 -p1
+%patch63 -p1
+%patch64 -p1
+%patch65 -p1
+%patch66 -p1
+%patch67 -p1
+%patch68 -p1
+%patch69 -p1
+%patch70 -p1
+%patch71 -p1
+%patch72 -p1
+%patch73 -p1
+%patch74 -p1
+%patch75 -p1
+%patch76 -p1
+%patch77 -p1
+%patch78 -p1
+%patch79 -p1
+%patch80 -p1
+%patch81 -p1
+%patch82 -p1
+%patch83 -p1
+%patch84 -p1
+%patch85 -p1
+%patch86 -p1
+%patch87 -p1
+%patch88 -p1
+%patch89 -p1
+%patch90 -p1
+%patch91 -p1
+%patch92 -p1
+%patch93 -p1
+%patch94 -p1
 
 find . \( -name .gitignore -o -name .placeholder \) -delete
 
@@ -450,6 +548,9 @@ fi
 %endif
 
 %changelog
+* Fri Jan  6 2012 Mark McLoughlin <markmc at redhat.com> - 2011.3-16
+- Rebase to latest upstream stable/diablo, pulling in ~50 patches
+
 * Fri Jan  6 2012 Mark McLoughlin <markmc at redhat.com> - 2011.3-15
 - Move recent patches into git (no functional changes)
 


More information about the scm-commits mailing list