[openstack-nova/f17] update to 2012.1.3

Pádraig Brady pbrady at fedoraproject.org
Fri Oct 12 12:04:24 UTC 2012


commit 42d4955552382b09e713d0fb4302ea6f2b711111
Author: Pádraig Brady <P at draigBrady.com>
Date:   Fri Oct 12 12:06:18 2012 +0100

    update to 2012.1.3

 .gitignore                                         |    1 +
 ...tomic-manipulation-of-libvirt-disk-images.patch |   50 +----
 ...e-don-t-access-the-net-when-building-docs.patch |    2 +-
 ...0003-fix-useexisting-deprecation-warnings.patch |    2 +-
 ...bvirt_volume_driver-with-right-mountpoint.patch |   61 ------
 ...-configurable-libvirt-injection-partition.patch |   12 +-
 ...e_libvirt_utils-for-libvirt-console-tests.patch |   87 --------
 ...unt-guest-image-once-when-injecting-files.patch |   26 ++--
 ..._allocation_ratio-based-over-subscription.patch |   87 --------
 ...ect-SELinux-context-for-injected-ssh-keys.patch |   28 +--
 ...pam_lib-from-changing-the-timeout-setting.patch |   65 ------
 ...-when-parsing-null-connection-info-in-BDM.patch |    6 +-
 ...file-injection-writing-to-host-filesystem.patch |  183 -----------------
 ...-EC2-CreateImage-API-for-boot-from-volume.patch |    2 +-
 ...ish-over-quota-for-volume-size-and-number.patch |  216 --------------------
 ...ribeImages-reports-correct-rootDeviceType.patch |    2 +-
 ...pose-over-quota-exceptions-via-native-API.patch |  139 -------------
 ...Reject-EC2-CreateImage-for-instance-store.patch |    8 +-
 ... 0011-Fix-EC2-CreateImage-no_reboot-logic.patch |    2 +-
 0011-Fix-call-to-network_get_all_by_uuids.patch    |   30 ---
 ...oid-RPC-calls-while-holding-iptables-lock.patch |  103 ++++++++++
 ...-fix-libvirt-get_memory_mb_total-with-xen.patch |   54 -----
 ...ibguestfs-has-completed-before-proceeding.patch |   43 ----
 ...e-compute_api.get_all-in-affinity-filters.patch |   64 ------
 0015-fix-metadata-file-injection-with-xen.patch    |   27 ---
 ...Fixes-affinity-filters-when-hints-is-None.patch |  108 ----------
 ...al-CommandFilters-to-fix-rootwrap-on-SLES.patch |   94 ---------
 0018-Fix-marker-behavior-for-flavors.patch         |  108 ----------
 ...-qemu-img-cluster-size-in-libvirt-connect.patch |   64 ------
 ...13-status-on-over-quota-in-the-native-API.patch |  140 -------------
 ...ndle-local-remote-exceptions-consistently.patch |  147 -------------
 ...rt-fix-qcow2-size-on-live-block-migration.patch |   30 ---
 ...-Backport-fix-for-API-listing-of-os-hosts.patch |   73 -------
 ...void-lazy-loading-errors-on-instance_type.patch |   40 ----
 ...casts-in-network-manager-to-prevent-races.patch |   82 --------
 ...onally-allow-queries-for-deleted-flavours.patch |  141 -------------
 0027-Fix-wrong-regex-in-cleanup_file_locks.patch   |   58 ------
 0034-ensure-libguestfs-mounts-are-cleaned-up.patch |   57 -----
 ...orking-rules-to-vm-s-on-compute-service-s.patch |   45 ----
 ...HTTPResponse-class-for-versions-of-boto-2.patch |   66 ------
 ...vert-remaining-network-API-casts-to-calls.patch |   97 ---------
 ...g-where-the-fixed-ip-deallocation-happens.patch |  106 ----------
 ...d_heartbeat-option-so-that-it-s-effective.patch |   27 ---
 0045-Add-error-log-for-live-migration.patch        |   31 ---
 ...file-injection-writing-to-host-filesystem.patch |   81 --------
 openstack-nova.spec                                |  111 +++-------
 sources                                            |    2 +-
 47 files changed, 183 insertions(+), 2825 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 3cd86d1..504f376 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@
 /nova-2012.1~rc1.tar.gz
 /nova-2012.1.tar.gz
 /nova-2012.1.1.tar.gz
+/nova-2012.1.3.tar.gz
diff --git a/0028-ensure-atomic-manipulation-of-libvirt-disk-images.patch b/0001-ensure-atomic-manipulation-of-libvirt-disk-images.patch
similarity index 84%
rename from 0028-ensure-atomic-manipulation-of-libvirt-disk-images.patch
rename to 0001-ensure-atomic-manipulation-of-libvirt-disk-images.patch
index 5ca8d3e..02628bb 100644
--- a/0028-ensure-atomic-manipulation-of-libvirt-disk-images.patch
+++ b/0001-ensure-atomic-manipulation-of-libvirt-disk-images.patch
@@ -1,4 +1,4 @@
-From 614d618011a2278fa5ab2a5f63637eb3f5564909 Mon Sep 17 00:00:00 2001
+From 65bc9fc21e0162739eaedb5ade1184854c3b568a Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?P=C3=A1draig=20Brady?= <pbrady at redhat.com>
 Date: Fri, 16 Mar 2012 03:43:49 +0000
 Subject: [PATCH] ensure atomic manipulation of libvirt disk images
@@ -19,46 +19,16 @@ the image cache and instance dirs are protected.
 
 Change-Id: I81a5407665a6998128c0dee41387ef00ebddeb4d
 ---
- nova/utils.py                   |   21 +++++++++--
+ nova/utils.py                   |   12 +++++++
  nova/virt/images.py             |   69 +++++++++++++++++----------------------
  nova/virt/libvirt/connection.py |   16 ++++++---
- 3 files changed, 57 insertions(+), 49 deletions(-)
+ 3 files changed, 52 insertions(+), 45 deletions(-)
 
 diff --git a/nova/utils.py b/nova/utils.py
-index 01a52b5..0e5855a 100644
+index 6535b06..5fd6e47 100644
 --- a/nova/utils.py
 +++ b/nova/utils.py
-@@ -21,6 +21,7 @@
- 
- import contextlib
- import datetime
-+import errno
- import functools
- import hashlib
- import inspect
-@@ -1013,8 +1014,8 @@ def cleanup_file_locks():
-             continue
-         try:
-             stat_info = os.stat(os.path.join(FLAGS.lock_path, filename))
--        except OSError as (errno, strerror):
--            if errno == 2:  # doesn't exist
-+        except OSError as e:
-+            if e.errno == errno.ENOENT:
-                 continue
-             else:
-                 raise
-@@ -1033,8 +1034,8 @@ def delete_if_exists(pathname):
- 
-     try:
-         os.unlink(pathname)
--    except OSError as (errno, strerror):
--        if errno == 2:  # doesn't exist
-+    except OSError as e:
-+        if e.errno == errno.ENOENT:
-             return
-         else:
-             raise
-@@ -1344,6 +1345,18 @@ def logging_error(message):
+@@ -1346,6 +1346,18 @@ def logging_error(message):
              LOG.exception(message)
  
  
@@ -169,10 +139,10 @@ index 1e0ae0a..626f3ff 100644
  
      return metadata
 diff --git a/nova/virt/libvirt/connection.py b/nova/virt/libvirt/connection.py
-index ed94f15..5bc9ce0 100644
+index 8a14234..1da6b86 100644
 --- a/nova/virt/libvirt/connection.py
 +++ b/nova/virt/libvirt/connection.py
-@@ -1112,7 +1112,8 @@ class LibvirtConnection(driver.ComputeDriver):
+@@ -1144,7 +1144,8 @@ class LibvirtConnection(driver.ComputeDriver):
              @utils.synchronized(fname)
              def call_if_not_exists(base, fn, *args, **kwargs):
                  if not os.path.exists(base):
@@ -182,7 +152,7 @@ index ed94f15..5bc9ce0 100644
  
              if cow or not generating:
                  call_if_not_exists(base, fn, *args, **kwargs)
-@@ -1128,8 +1129,9 @@ class LibvirtConnection(driver.ComputeDriver):
+@@ -1160,8 +1161,9 @@ class LibvirtConnection(driver.ComputeDriver):
                          size_gb = size / (1024 * 1024 * 1024)
                          cow_base += "_%d" % size_gb
                          if not os.path.exists(cow_base):
@@ -194,7 +164,7 @@ index ed94f15..5bc9ce0 100644
                      libvirt_utils.create_cow_image(cow_base, target)
                  elif not generating:
                      libvirt_utils.copy_image(base, target)
-@@ -1139,7 +1141,8 @@ class LibvirtConnection(driver.ComputeDriver):
+@@ -1171,7 +1173,8 @@ class LibvirtConnection(driver.ComputeDriver):
                      if size:
                          disk.extend(target, size)
  
@@ -204,7 +174,7 @@ index ed94f15..5bc9ce0 100644
  
      @staticmethod
      def _create_local(target, local_size, unit='G',
-@@ -1312,8 +1315,9 @@ class LibvirtConnection(driver.ComputeDriver):
+@@ -1346,8 +1349,9 @@ class LibvirtConnection(driver.ComputeDriver):
                                project_id=instance['project_id'],)
          elif config_drive:
              label = 'config'
diff --git a/0029-Ensure-we-don-t-access-the-net-when-building-docs.patch b/0002-Ensure-we-don-t-access-the-net-when-building-docs.patch
similarity index 94%
rename from 0029-Ensure-we-don-t-access-the-net-when-building-docs.patch
rename to 0002-Ensure-we-don-t-access-the-net-when-building-docs.patch
index 8e390a6..bdb49c1 100644
--- a/0029-Ensure-we-don-t-access-the-net-when-building-docs.patch
+++ b/0002-Ensure-we-don-t-access-the-net-when-building-docs.patch
@@ -1,4 +1,4 @@
-From abf094c3941357446d1b9188c24c5bb3f1d005ac Mon Sep 17 00:00:00 2001
+From 9ec39c7226e6eac0433431b79ddc1bc9410ed60d Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?P=C3=A1draig=20Brady?= <pbrady at redhat.com>
 Date: Fri, 6 Jan 2012 12:16:34 +0000
 Subject: [PATCH] Ensure we don't access the net when building docs
diff --git a/0030-fix-useexisting-deprecation-warnings.patch b/0003-fix-useexisting-deprecation-warnings.patch
similarity index 97%
rename from 0030-fix-useexisting-deprecation-warnings.patch
rename to 0003-fix-useexisting-deprecation-warnings.patch
index bcc91f6..a891a30 100644
--- a/0030-fix-useexisting-deprecation-warnings.patch
+++ b/0003-fix-useexisting-deprecation-warnings.patch
@@ -1,4 +1,4 @@
-From 65c3799eb9050d065a94ad9992702e3ab8b52050 Mon Sep 17 00:00:00 2001
+From a7a58ff7fa7c6326eb8dfc0ec1ba3f2f50026071 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?P=C3=A1draig=20Brady?= <pbrady at redhat.com>
 Date: Thu, 8 Mar 2012 16:32:30 +0000
 Subject: [PATCH] fix useexisting deprecation warnings
diff --git a/0031-support-a-configurable-libvirt-injection-partition.patch b/0004-support-a-configurable-libvirt-injection-partition.patch
similarity index 92%
rename from 0031-support-a-configurable-libvirt-injection-partition.patch
rename to 0004-support-a-configurable-libvirt-injection-partition.patch
index 82c31f6..aa2fda6 100644
--- a/0031-support-a-configurable-libvirt-injection-partition.patch
+++ b/0004-support-a-configurable-libvirt-injection-partition.patch
@@ -1,4 +1,4 @@
-From 1e01e15630e654cee6cda5c327754f7ffc9e86b6 Mon Sep 17 00:00:00 2001
+From 7bee66c36a67e4f6634b0b829be0f9ac5feed97d Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?P=C3=A1draig=20Brady?= <pbrady at redhat.com>
 Date: Wed, 18 Apr 2012 23:27:31 +0100
 Subject: [PATCH] support a configurable libvirt injection partition
@@ -23,10 +23,10 @@ Conflicts:
  2 files changed, 12 insertions(+), 6 deletions(-)
 
 diff --git a/nova/virt/disk/mount.py b/nova/virt/disk/mount.py
-index 4fb5dda..11959b2 100644
+index e7860b1..53dc0c5 100644
 --- a/nova/virt/disk/mount.py
 +++ b/nova/virt/disk/mount.py
-@@ -58,7 +58,9 @@ class Mount(object):
+@@ -75,7 +75,9 @@ class Mount(object):
          """Map partitions of the device to the file system namespace."""
          assert(os.path.exists(self.device))
  
@@ -37,7 +37,7 @@ index 4fb5dda..11959b2 100644
              map_path = '/dev/mapper/%sp%s' % (os.path.basename(self.device),
                                                self.partition)
              assert(not os.path.exists(map_path))
-@@ -73,7 +75,7 @@ class Mount(object):
+@@ -90,7 +92,7 @@ class Mount(object):
              # so given we only use it when we expect a partitioned image, fail
              if not os.path.exists(map_path):
                  if not err:
@@ -47,7 +47,7 @@ index 4fb5dda..11959b2 100644
              else:
                  self.mapped_device = map_path
 diff --git a/nova/virt/libvirt/connection.py b/nova/virt/libvirt/connection.py
-index 5bc9ce0..c38283f 100644
+index 1da6b86..93e9395 100644
 --- a/nova/virt/libvirt/connection.py
 +++ b/nova/virt/libvirt/connection.py
 @@ -108,6 +108,11 @@ libvirt_opts = [
@@ -62,7 +62,7 @@ index 5bc9ce0..c38283f 100644
      cfg.BoolOpt('use_usb_tablet',
                  default=True,
                  help='Sync virtual and real mouse cursors in Windows VMs'),
-@@ -1292,12 +1297,11 @@ class LibvirtConnection(driver.ComputeDriver):
+@@ -1326,12 +1331,11 @@ class LibvirtConnection(driver.ComputeDriver):
                                cow=FLAGS.use_cow_images,
                                swap_mb=swap_mb)
  
diff --git a/0032-only-mount-guest-image-once-when-injecting-files.patch b/0005-only-mount-guest-image-once-when-injecting-files.patch
similarity index 89%
rename from 0032-only-mount-guest-image-once-when-injecting-files.patch
rename to 0005-only-mount-guest-image-once-when-injecting-files.patch
index 2080e94..ceb4ee1 100644
--- a/0032-only-mount-guest-image-once-when-injecting-files.patch
+++ b/0005-only-mount-guest-image-once-when-injecting-files.patch
@@ -1,4 +1,4 @@
-From b12fa5ea79d7b8adb272795ccb996c8da6578d5c Mon Sep 17 00:00:00 2001
+From e218a915f0363f907498583a493d18a7bcc63114 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?P=C3=A1draig=20Brady?= <pbrady at redhat.com>
 Date: Mon, 25 Jun 2012 13:52:46 +0100
 Subject: [PATCH] only mount guest image once when injecting files
@@ -14,10 +14,10 @@ Change-Id: I228da2229a19d9097507f67b697595616fa601fe
  2 files changed, 21 insertions(+), 41 deletions(-)
 
 diff --git a/nova/virt/disk/api.py b/nova/virt/disk/api.py
-index 04feb76..d6d6007 100644
+index dc78b2b..ac002a7 100644
 --- a/nova/virt/disk/api.py
 +++ b/nova/virt/disk/api.py
-@@ -224,7 +224,7 @@ class _DiskImage(object):
+@@ -260,7 +260,7 @@ class _DiskImage(object):
  
  def inject_data(image,
                  key=None, net=None, metadata=None, admin_password=None,
@@ -26,7 +26,7 @@ index 04feb76..d6d6007 100644
      """Injects a ssh key and optionally net data into a disk image.
  
      it will mount the image as a fully partitioned disk and attempt to inject
-@@ -237,21 +237,7 @@ def inject_data(image,
+@@ -273,21 +273,7 @@ def inject_data(image,
      if img.mount():
          try:
              inject_data_into_fs(img.mount_dir,
@@ -49,7 +49,7 @@ index 04feb76..d6d6007 100644
          finally:
              img.umount()
      else:
-@@ -291,19 +277,22 @@ def destroy_container(img):
+@@ -321,19 +307,22 @@ def destroy_container(container_dir):
          LOG.exception(_('Failed to remove container: %s'), exn)
  
  
@@ -77,7 +77,7 @@ index 04feb76..d6d6007 100644
  
  
  def _join_and_check_path_within_fs(fs, *args):
-@@ -336,12 +325,12 @@ def _inject_file_into_fs(fs, path, contents, append=False):
+@@ -368,12 +357,12 @@ def _inject_file_into_fs(fs, path, contents, append=False):
      utils.execute('tee', *args, **kwargs)
  
  
@@ -92,7 +92,7 @@ index 04feb76..d6d6007 100644
      """Add the given public ssh key to root's authorized_keys.
  
      key is an ssh key string.
-@@ -365,7 +354,7 @@ def _inject_key_into_fs(key, fs, execute=None):
+@@ -397,7 +386,7 @@ def _inject_key_into_fs(key, fs, execute=None):
      _inject_file_into_fs(fs, keyfile, key_data, append=True)
  
  
@@ -101,7 +101,7 @@ index 04feb76..d6d6007 100644
      """Inject /etc/network/interfaces into the filesystem rooted at fs.
  
      net is the contents of /etc/network/interfaces.
-@@ -379,7 +368,7 @@ def _inject_net_into_fs(net, fs, execute=None):
+@@ -411,7 +400,7 @@ def _inject_net_into_fs(net, fs, execute=None):
      _inject_file_into_fs(fs, netfile, net)
  
  
@@ -111,10 +111,10 @@ index 04feb76..d6d6007 100644
  
      admin_password is a root password
 diff --git a/nova/virt/libvirt/connection.py b/nova/virt/libvirt/connection.py
-index c38283f..11e5b34 100644
+index 93e9395..cb57aa2 100644
 --- a/nova/virt/libvirt/connection.py
 +++ b/nova/virt/libvirt/connection.py
-@@ -970,12 +970,6 @@ class LibvirtConnection(driver.ComputeDriver):
+@@ -1002,12 +1002,6 @@ class LibvirtConnection(driver.ComputeDriver):
          fp.write(data)
          return fpath
  
@@ -127,7 +127,7 @@ index c38283f..11e5b34 100644
      @exception.wrap_exception()
      def get_console_output(self, instance):
          virt_dom = self._lookup_by_name(instance['name'])
-@@ -1368,11 +1362,13 @@ class LibvirtConnection(driver.ComputeDriver):
+@@ -1402,11 +1396,13 @@ class LibvirtConnection(driver.ComputeDriver):
          metadata = instance.get('metadata')
  
          if FLAGS.libvirt_inject_password:
@@ -144,7 +144,7 @@ index c38283f..11e5b34 100644
              if config_drive:  # Should be True or None by now.
                  injection_path = basepath('disk.config')
                  img_id = 'config-drive'
-@@ -1380,13 +1376,13 @@ class LibvirtConnection(driver.ComputeDriver):
+@@ -1414,13 +1410,13 @@ class LibvirtConnection(driver.ComputeDriver):
                  injection_path = basepath('disk')
                  img_id = instance.image_ref
  
@@ -160,7 +160,7 @@ index c38283f..11e5b34 100644
                                   partition=target_partition,
                                   use_cow=FLAGS.use_cow_images)
  
-@@ -1404,11 +1400,6 @@ class LibvirtConnection(driver.ComputeDriver):
+@@ -1438,11 +1434,6 @@ class LibvirtConnection(driver.ComputeDriver):
          if FLAGS.libvirt_type == 'uml':
              libvirt_utils.chown(basepath('disk'), 'root')
  
diff --git a/0033-set-correct-SELinux-context-for-injected-ssh-keys.patch b/0006-set-correct-SELinux-context-for-injected-ssh-keys.patch
similarity index 71%
rename from 0033-set-correct-SELinux-context-for-injected-ssh-keys.patch
rename to 0006-set-correct-SELinux-context-for-injected-ssh-keys.patch
index 7266f27..5f38c7c 100644
--- a/0033-set-correct-SELinux-context-for-injected-ssh-keys.patch
+++ b/0006-set-correct-SELinux-context-for-injected-ssh-keys.patch
@@ -1,4 +1,4 @@
-From ad049175073aba988a1ed62bb4d87e462dd479de Mon Sep 17 00:00:00 2001
+From ae2e13b7e2481971f4c24da709e0c87234b42940 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?P=C3=A1draig=20Brady?= <pbrady at redhat.com>
 Date: Wed, 27 Jun 2012 10:29:57 +0100
 Subject: [PATCH] set correct SELinux context for injected ssh keys
@@ -12,30 +12,14 @@ currently doesn't support setting extended attributes.
 Suggested-by: David Naori <dnaori at redhat.com>
 Change-Id: Ibf3869e3ee477e91623e0c030838c1ec8a6128a6
 ---
- nova/rootwrap/compute.py |    4 ++++
- nova/virt/disk/api.py    |   33 +++++++++++++++++++++++++++++++++
- 2 files changed, 37 insertions(+), 0 deletions(-)
+ nova/virt/disk/api.py |   33 +++++++++++++++++++++++++++++++++
+ 1 files changed, 33 insertions(+), 0 deletions(-)
 
-diff --git a/nova/rootwrap/compute.py b/nova/rootwrap/compute.py
-index a3d7ec0..d28d3a0 100755
---- a/nova/rootwrap/compute.py
-+++ b/nova/rootwrap/compute.py
-@@ -189,6 +189,10 @@ filterlist = [
-     # nova/virt/libvirt/utils.py: 'qemu-img'
-     filters.CommandFilter("/usr/bin/qemu-img", "root"),
- 
-+    # nova/virt/disk/api.py: 'readlink', '-e'
-+    filters.CommandFilter("/usr/bin/readlink", "root"),
-+    filters.CommandFilter("/bin/readlink", "root"),
-+
-     # nova/virt/disk/api.py: 'touch', target
-     filters.CommandFilter("/usr/bin/touch", "root"),
- 
 diff --git a/nova/virt/disk/api.py b/nova/virt/disk/api.py
-index d6d6007..16d03c6 100644
+index ac002a7..ca2f49a 100644
 --- a/nova/virt/disk/api.py
 +++ b/nova/virt/disk/api.py
-@@ -330,6 +330,37 @@ def _inject_metadata_into_fs(metadata, fs):
+@@ -362,6 +362,37 @@ def _inject_metadata_into_fs(metadata, fs):
      _inject_file_into_fs(fs, 'meta.js', json.dumps(metadata))
  
  
@@ -73,7 +57,7 @@ index d6d6007..16d03c6 100644
  def _inject_key_into_fs(key, fs):
      """Add the given public ssh key to root's authorized_keys.
  
-@@ -353,6 +384,8 @@ def _inject_key_into_fs(key, fs):
+@@ -385,6 +416,8 @@ def _inject_key_into_fs(key, fs):
  
      _inject_file_into_fs(fs, keyfile, key_data, append=True)
  
diff --git a/0036-Tolerance-when-parsing-null-connection-info-in-BDM.patch b/0007-Tolerance-when-parsing-null-connection-info-in-BDM.patch
similarity index 91%
rename from 0036-Tolerance-when-parsing-null-connection-info-in-BDM.patch
rename to 0007-Tolerance-when-parsing-null-connection-info-in-BDM.patch
index a097c0b..edac6b7 100644
--- a/0036-Tolerance-when-parsing-null-connection-info-in-BDM.patch
+++ b/0007-Tolerance-when-parsing-null-connection-info-in-BDM.patch
@@ -1,4 +1,4 @@
-From cd6f94cbb260248f5092fb47e715e06767ba1cae Mon Sep 17 00:00:00 2001
+From 72aadd897b2f07f5191859ae1b94d51425828fa3 Mon Sep 17 00:00:00 2001
 From: Joe Heck <heckj at mac.com>
 Date: Fri, 1 Jun 2012 21:51:48 +0000
 Subject: [PATCH] Tolerance when parsing null connection info in BDM
@@ -16,10 +16,10 @@ Change-Id: If7afa4fb030b3c53a0b80737ff792e42cc4d3101
  1 files changed, 9 insertions(+), 4 deletions(-)
 
 diff --git a/nova/compute/manager.py b/nova/compute/manager.py
-index 0ce6e31..4cf12c8 100644
+index ca51fc5..2d1745b 100644
 --- a/nova/compute/manager.py
 +++ b/nova/compute/manager.py
-@@ -653,10 +653,15 @@ class ComputeManager(manager.SchedulerDependentManager):
+@@ -659,10 +659,15 @@ class ComputeManager(manager.SchedulerDependentManager):
          bdms = self._get_instance_volume_bdms(context, instance_id)
          block_device_mapping = []
          for bdm in bdms:
diff --git a/0037-Support-EC2-CreateImage-API-for-boot-from-volume.patch b/0008-Support-EC2-CreateImage-API-for-boot-from-volume.patch
similarity index 99%
rename from 0037-Support-EC2-CreateImage-API-for-boot-from-volume.patch
rename to 0008-Support-EC2-CreateImage-API-for-boot-from-volume.patch
index abc2eca..affcdc7 100644
--- a/0037-Support-EC2-CreateImage-API-for-boot-from-volume.patch
+++ b/0008-Support-EC2-CreateImage-API-for-boot-from-volume.patch
@@ -1,4 +1,4 @@
-From 4e57f9a6f552e3516917ecfcb48aab3d9a9b8482 Mon Sep 17 00:00:00 2001
+From 00e43cc327c7f42fb57be88ad8a3de29d688089b Mon Sep 17 00:00:00 2001
 From: Eoghan Glynn <eglynn at redhat.com>
 Date: Mon, 9 Jul 2012 11:59:56 +0000
 Subject: [PATCH] Support EC2 CreateImage API for boot-from-volume
diff --git a/0038-EC2-DescribeImages-reports-correct-rootDeviceType.patch b/0009-EC2-DescribeImages-reports-correct-rootDeviceType.patch
similarity index 97%
rename from 0038-EC2-DescribeImages-reports-correct-rootDeviceType.patch
rename to 0009-EC2-DescribeImages-reports-correct-rootDeviceType.patch
index 92c18a6..c47fabc 100644
--- a/0038-EC2-DescribeImages-reports-correct-rootDeviceType.patch
+++ b/0009-EC2-DescribeImages-reports-correct-rootDeviceType.patch
@@ -1,4 +1,4 @@
-From d18beab9fb9c5f61b7a8ec9d64dc95839ccc537e Mon Sep 17 00:00:00 2001
+From 3015523a9ca06deae79ba518c9215a8e191acc76 Mon Sep 17 00:00:00 2001
 From: Eoghan Glynn <eglynn at redhat.com>
 Date: Sat, 14 Jul 2012 21:30:43 +0100
 Subject: [PATCH] EC2 DescribeImages reports correct rootDeviceType
diff --git a/0039-Reject-EC2-CreateImage-for-instance-store.patch b/0010-Reject-EC2-CreateImage-for-instance-store.patch
similarity index 97%
rename from 0039-Reject-EC2-CreateImage-for-instance-store.patch
rename to 0010-Reject-EC2-CreateImage-for-instance-store.patch
index ad0aacf..12724cd 100644
--- a/0039-Reject-EC2-CreateImage-for-instance-store.patch
+++ b/0010-Reject-EC2-CreateImage-for-instance-store.patch
@@ -1,4 +1,4 @@
-From efc454dbb6a422e36da081827b4f566a4ee05854 Mon Sep 17 00:00:00 2001
+From 52361b5fcd7749bf0992783fed1619c72e3f7543 Mon Sep 17 00:00:00 2001
 From: Eoghan Glynn <eglynn at redhat.com>
 Date: Tue, 17 Jul 2012 15:20:30 +0100
 Subject: [PATCH] Reject EC2 CreateImage for instance-store
@@ -45,17 +45,17 @@ index 7172954..e9bf1b2 100644
              if bdm.no_device:
                  continue
 diff --git a/nova/compute/api.py b/nova/compute/api.py
-index 48f3d47..d756885 100644
+index f64a10c..13570f7 100644
 --- a/nova/compute/api.py
 +++ b/nova/compute/api.py
-@@ -1685,6 +1685,20 @@ class API(BaseAPI):
+@@ -1687,6 +1687,20 @@ class API(BaseAPI):
          uuids = [instance['uuid'] for instance in instances]
          return self.db.instance_fault_get_by_instance_uuids(context, uuids)
  
 +    def get_instance_bdms(self, context, instance):
 +        """Get all bdm tables for specified instance."""
 +        return self.db.block_device_mapping_get_all_by_instance(context,
-+                instance['uuid'])
++                instance['id'])
 +
 +    def is_volume_backed_instance(self, context, instance, bdms):
 +        bdms = bdms or self.get_instance_bdms(context, instance)
diff --git a/0040-Fix-EC2-CreateImage-no_reboot-logic.patch b/0011-Fix-EC2-CreateImage-no_reboot-logic.patch
similarity index 98%
rename from 0040-Fix-EC2-CreateImage-no_reboot-logic.patch
rename to 0011-Fix-EC2-CreateImage-no_reboot-logic.patch
index 8203793..a20b357 100644
--- a/0040-Fix-EC2-CreateImage-no_reboot-logic.patch
+++ b/0011-Fix-EC2-CreateImage-no_reboot-logic.patch
@@ -1,4 +1,4 @@
-From 885c385b63ef2ac9813f6a40dc1d885cc010ed88 Mon Sep 17 00:00:00 2001
+From 51e624805ae13f302fc07817343497de4c8ebe02 Mon Sep 17 00:00:00 2001
 From: Eoghan Glynn <eglynn at redhat.com>
 Date: Tue, 17 Jul 2012 18:18:07 +0100
 Subject: [PATCH] Fix EC2 CreateImage no_reboot logic
diff --git a/0012-Avoid-RPC-calls-while-holding-iptables-lock.patch b/0012-Avoid-RPC-calls-while-holding-iptables-lock.patch
new file mode 100644
index 0000000..fab4ba3
--- /dev/null
+++ b/0012-Avoid-RPC-calls-while-holding-iptables-lock.patch
@@ -0,0 +1,103 @@
+From 1d4fc2640221d0f8f084aaf882a896c0bbd8ba4b Mon Sep 17 00:00:00 2001
+From: Michael Still <mikal at stillhq.com>
+Date: Thu, 11 Oct 2012 15:46:11 +1100
+Subject: [PATCH] Avoid RPC calls while holding iptables lock.
+
+This exhibitied itself as very slow instance starts on a Canonical
+test cluster. This was because do_referesh_security_group_rules()
+was making rpc calls while holding the iptables lock. This refactor
+avoids that while making no functional changes (I hope).
+
+Fixes bug: 1062314
+Change-Id: I36f805bd72f7bd06082cfe96c58d637203bcffb7
+Cherry-picked: ba585524e32965697c1a44c8fd743dea060bb1af
+Conflicts:
+	nova/virt/firewall.py
+---
+ nova/tests/test_libvirt.py |   14 +++++++++++++-
+ nova/virt/firewall.py      |   20 ++++++++++++++------
+ 2 files changed, 27 insertions(+), 7 deletions(-)
+
+diff --git a/nova/tests/test_libvirt.py b/nova/tests/test_libvirt.py
+index bd13e0a..4fbb34a 100644
+--- a/nova/tests/test_libvirt.py
++++ b/nova/tests/test_libvirt.py
+@@ -1856,11 +1856,23 @@ class IptablesFirewallTestCase(test.TestCase):
+     def test_do_refresh_security_group_rules(self):
+         instance_ref = self._create_instance_ref()
+         self.mox.StubOutWithMock(self.fw,
++                                 'instance_rules')
++        self.mox.StubOutWithMock(self.fw,
+                                  'add_filters_for_instance',
+                                  use_mock_anything=True)
++
++        self.fw.instance_rules(instance_ref,
++                               mox.IgnoreArg()).AndReturn((None, None))
++        self.fw.add_filters_for_instance(instance_ref, mox.IgnoreArg(),
++                                         mox.IgnoreArg())
++        self.fw.instance_rules(instance_ref,
++                               mox.IgnoreArg()).AndReturn((None, None))
++        self.fw.add_filters_for_instance(instance_ref, mox.IgnoreArg(),
++                                         mox.IgnoreArg())
++        self.mox.ReplayAll()
++
+         self.fw.prepare_instance_filter(instance_ref, mox.IgnoreArg())
+         self.fw.instances[instance_ref['id']] = instance_ref
+-        self.mox.ReplayAll()
+         self.fw.do_refresh_security_group_rules("fake")
+ 
+     @test.skip_if(missing_libvirt(), "Test requires libvirt")
+diff --git a/nova/virt/firewall.py b/nova/virt/firewall.py
+index f0f1594..e9b177e 100644
+--- a/nova/virt/firewall.py
++++ b/nova/virt/firewall.py
+@@ -133,7 +133,8 @@ class IptablesFirewallDriver(FirewallDriver):
+     def prepare_instance_filter(self, instance, network_info):
+         self.instances[instance['id']] = instance
+         self.network_infos[instance['id']] = network_info
+-        self.add_filters_for_instance(instance)
++        ipv4_rules, ipv6_rules = self.instance_rules(instance, network_info)
++        self.add_filters_for_instance(instance, ipv4_rules, ipv6_rules)
+         LOG.debug(_('Filters added to instance %s'), instance['uuid'])
+         self.refresh_provider_fw_rules()
+         LOG.debug(_('Provider Firewall Rules refreshed'))
+@@ -166,7 +167,8 @@ class IptablesFirewallDriver(FirewallDriver):
+             for rule in ipv6_rules:
+                 self.iptables.ipv6['filter'].add_rule(chain_name, rule)
+ 
+-    def add_filters_for_instance(self, instance):
++    def add_filters_for_instance(self, instance, inst_ipv4_rules,
++                                 inst_ipv6_rules):
+         network_info = self.network_infos[instance['id']]
+         chain_name = self._instance_chain_name(instance)
+         if FLAGS.use_ipv6:
+@@ -175,8 +177,7 @@ class IptablesFirewallDriver(FirewallDriver):
+         ipv4_rules, ipv6_rules = self._filters_for_instance(chain_name,
+                                                             network_info)
+         self._add_filters('local', ipv4_rules, ipv6_rules)
+-        ipv4_rules, ipv6_rules = self.instance_rules(instance, network_info)
+-        self._add_filters(chain_name, ipv4_rules, ipv6_rules)
++        self._add_filters(chain_name, inst_ipv4_rules, inst_ipv6_rules)
+ 
+     def remove_filters_for_instance(self, instance):
+         chain_name = self._instance_chain_name(instance)
+@@ -361,10 +362,17 @@ class IptablesFirewallDriver(FirewallDriver):
+         self.iptables.apply()
+ 
+     @utils.synchronized('iptables', external=True)
++    def _inner_do_refresh_rules(self, instance, ipv4_rules,
++                                               ipv6_rules):
++        self.remove_filters_for_instance(instance)
++        self.add_filters_for_instance(instance, ipv4_rules, ipv6_rules)
++
+     def do_refresh_security_group_rules(self, security_group):
+         for instance in self.instances.values():
+-            self.remove_filters_for_instance(instance)
+-            self.add_filters_for_instance(instance)
++            network_info = self.network_infos[instance['id']]
++            ipv4_rules, ipv6_rules = self.instance_rules(instance,
++                                                         network_info)
++            self._inner_do_refresh_rules(instance, ipv4_rules, ipv6_rules)
+ 
+     def refresh_provider_fw_rules(self):
+         """See :class:`FirewallDriver` docs."""
diff --git a/openstack-nova.spec b/openstack-nova.spec
index 696fcff..82d1d97 100644
--- a/openstack-nova.spec
+++ b/openstack-nova.spec
@@ -1,8 +1,8 @@
 %global with_doc %{!?_without_doc:1}%{?_without_doc:0}
 
 Name:             openstack-nova
-Version:          2012.1.1
-Release:          15%{?dist}
+Version:          2012.1.3
+Release:          1%{?dist}
 Summary:          OpenStack Compute (nova)
 
 Group:            Applications/System
@@ -30,51 +30,20 @@ Source22:         nova-ifc-template
 Source24:         nova-sudoers
 
 #
-# patches_base=2012.1.1
+# patches_base=2012.1.3
 #
-Patch0004: 0004-Call-libvirt_volume_driver-with-right-mountpoint.patch
-Patch0005: 0005-Use-fake_libvirt_utils-for-libvirt-console-tests.patch
-Patch0006: 0006-Fixes-ram_allocation_ratio-based-over-subscription.patch
-Patch0007: 0007-Stop-nova_ipam_lib-from-changing-the-timeout-setting.patch
-Patch0008: 0008-Prevent-file-injection-writing-to-host-filesystem.patch
-Patch0009: 0009-Distinguish-over-quota-for-volume-size-and-number.patch
-Patch0010: 0010-Expose-over-quota-exceptions-via-native-API.patch
-Patch0011: 0011-Fix-call-to-network_get_all_by_uuids.patch
-Patch0012: 0012-fix-libvirt-get_memory_mb_total-with-xen.patch
-Patch0013: 0013-ensure-libguestfs-has-completed-before-proceeding.patch
-Patch0014: 0014-Use-compute_api.get_all-in-affinity-filters.patch
-Patch0015: 0015-fix-metadata-file-injection-with-xen.patch
-Patch0016: 0016-Fixes-affinity-filters-when-hints-is-None.patch
-Patch0017: 0017-Addtional-CommandFilters-to-fix-rootwrap-on-SLES.patch
-Patch0018: 0018-Fix-marker-behavior-for-flavors.patch
-Patch0019: 0019-Use-default-qemu-img-cluster-size-in-libvirt-connect.patch
-Patch0020: 0020-Return-413-status-on-over-quota-in-the-native-API.patch
-Patch0021: 0021-Handle-local-remote-exceptions-consistently.patch
-Patch0022: 0022-libvirt-fix-qcow2-size-on-live-block-migration.patch
-Patch0023: 0023-Backport-fix-for-API-listing-of-os-hosts.patch
-Patch0024: 0024-Avoid-lazy-loading-errors-on-instance_type.patch
-Patch0025: 0025-Avoid-casts-in-network-manager-to-prevent-races.patch
-Patch0026: 0026-Conditionally-allow-queries-for-deleted-flavours.patch
-Patch0027: 0027-Fix-wrong-regex-in-cleanup_file_locks.patch
-Patch0028: 0028-ensure-atomic-manipulation-of-libvirt-disk-images.patch
-Patch0029: 0029-Ensure-we-don-t-access-the-net-when-building-docs.patch
-Patch0030: 0030-fix-useexisting-deprecation-warnings.patch
-Patch0031: 0031-support-a-configurable-libvirt-injection-partition.patch
-Patch0032: 0032-only-mount-guest-image-once-when-injecting-files.patch
-Patch0033: 0033-set-correct-SELinux-context-for-injected-ssh-keys.patch
-Patch0034: 0034-ensure-libguestfs-mounts-are-cleaned-up.patch
-Patch0035: 0035-Adding-networking-rules-to-vm-s-on-compute-service-s.patch
-Patch0036: 0036-Tolerance-when-parsing-null-connection-info-in-BDM.patch
-Patch0037: 0037-Support-EC2-CreateImage-API-for-boot-from-volume.patch
-Patch0038: 0038-EC2-DescribeImages-reports-correct-rootDeviceType.patch
-Patch0039: 0039-Reject-EC2-CreateImage-for-instance-store.patch
-Patch0040: 0040-Fix-EC2-CreateImage-no_reboot-logic.patch
-Patch0041: 0041-use-boto-s-HTTPResponse-class-for-versions-of-boto-2.patch
-Patch0042: 0042-Convert-remaining-network-API-casts-to-calls.patch
-Patch0043: 0043-Moving-where-the-fixed-ip-deallocation-happens.patch
-Patch0044: 0044-fix-the-qpid_heartbeat-option-so-that-it-s-effective.patch
-Patch0045: 0045-Add-error-log-for-live-migration.patch
-Patch0046: 0046-Prohibit-file-injection-writing-to-host-filesystem.patch
+Patch0001: 0001-ensure-atomic-manipulation-of-libvirt-disk-images.patch
+Patch0002: 0002-Ensure-we-don-t-access-the-net-when-building-docs.patch
+Patch0003: 0003-fix-useexisting-deprecation-warnings.patch
+Patch0004: 0004-support-a-configurable-libvirt-injection-partition.patch
+Patch0005: 0005-only-mount-guest-image-once-when-injecting-files.patch
+Patch0006: 0006-set-correct-SELinux-context-for-injected-ssh-keys.patch
+Patch0007: 0007-Tolerance-when-parsing-null-connection-info-in-BDM.patch
+Patch0008: 0008-Support-EC2-CreateImage-API-for-boot-from-volume.patch
+Patch0009: 0009-EC2-DescribeImages-reports-correct-rootDeviceType.patch
+Patch0010: 0010-Reject-EC2-CreateImage-for-instance-store.patch
+Patch0011: 0011-Fix-EC2-CreateImage-no_reboot-logic.patch
+Patch0012: 0012-Avoid-RPC-calls-while-holding-iptables-lock.patch
 
 BuildArch:        noarch
 BuildRequires:    intltool
@@ -378,6 +347,9 @@ This package contains documentation files for nova.
 %prep
 %setup -q -n nova-%{version}
 
+%patch0001 -p1
+%patch0002 -p1
+%patch0003 -p1
 %patch0004 -p1
 %patch0005 -p1
 %patch0006 -p1
@@ -387,40 +359,6 @@ This package contains documentation files for nova.
 %patch0010 -p1
 %patch0011 -p1
 %patch0012 -p1
-%patch0013 -p1
-%patch0014 -p1
-%patch0015 -p1
-%patch0016 -p1
-%patch0017 -p1
-%patch0018 -p1
-%patch0019 -p1
-%patch0020 -p1
-%patch0021 -p1
-%patch0022 -p1
-%patch0023 -p1
-%patch0024 -p1
-%patch0025 -p1
-%patch0026 -p1
-%patch0027 -p1
-%patch0028 -p1
-%patch0029 -p1
-%patch0030 -p1
-%patch0031 -p1
-%patch0032 -p1
-%patch0033 -p1
-%patch0034 -p1
-%patch0035 -p1
-%patch0036 -p1
-%patch0037 -p1
-%patch0038 -p1
-%patch0039 -p1
-%patch0040 -p1
-%patch0041 -p1
-%patch0042 -p1
-%patch0043 -p1
-%patch0044 -p1
-%patch0045 -p1
-%patch0046 -p1
 
 find . \( -name .gitignore -o -name .placeholder \) -delete
 
@@ -811,6 +749,19 @@ fi
 %endif
 
 %changelog
+* Fri Oct 12 2012 Nikola Dipanov <ndipanov at redhat.com> - 2012.1.3-1
+- Restore libvirt block storage connections on reboot
+- Fix libvirt volume attachment error logging
+- Ensure instances with deleted floating IPs can be deleted
+- Ensure can contact floating IP after instance snapshot
+- Fix tenant usage time accounting
+- Ensure correct disk definitions are used on volume attach/detach
+- Improve concurrency of long running tasks
+- Fix unmounting of LXC containers in the presence of symlinks
+- Fix external lock corruption in the presence of SELinux
+- Allow snapshotting images that are deleted in glance
+- Ensure the correct fixed IP is deallocated when deleting VMs
+
 * Fri Aug 10 2012 Pádraig Brady <P at draigBrady.com> - 2012.1.1-15
 - Fix package versions to ensure update dependencies are correct
 - Fix CA cert permissions issue introduced in 2012.1.1-10
diff --git a/sources b/sources
index e19d5a8..058d95d 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-501d8356560c7bfdc4b4fb4755769f38  nova-2012.1.1.tar.gz
+16d3a5718a3b42987d3de1c25d6a1e85  nova-2012.1.3.tar.gz


More information about the scm-commits mailing list