[openstack-glance] Updated patches from master-patches
Pádraig Brady
pbrady at fedoraproject.org
Wed Apr 25 13:47:44 UTC 2012
commit 0c26232e2452d6d2f00ad73d664c2bebec284624
Author: Pádraig Brady <P at draigBrady.com>
Date: Wed Apr 25 14:32:32 2012 +0100
Updated patches from master-patches
The significant change here is to
fix the leak of swift objects on deletion
...re-swift-auth-URL-includes-trailing-slash.patch | 37 +++++++++++++++++++
0002-search-for-logger-in-PATH.patch | 38 ++++++++++++++++++++
...-Don-t-access-the-net-while-building-docs.patch | 2 +-
openstack-glance.spec | 11 +++++-
4 files changed, 85 insertions(+), 3 deletions(-)
---
diff --git a/0001-Ensure-swift-auth-URL-includes-trailing-slash.patch b/0001-Ensure-swift-auth-URL-includes-trailing-slash.patch
new file mode 100644
index 0000000..0356dde
--- /dev/null
+++ b/0001-Ensure-swift-auth-URL-includes-trailing-slash.patch
@@ -0,0 +1,37 @@
+From f136e7e6804bc02c9a623905d94eac955e2df0a3 Mon Sep 17 00:00:00 2001
+From: Eoghan Glynn <eglynn at redhat.com>
+Date: Thu, 12 Apr 2012 11:27:18 +0100
+Subject: [PATCH] Ensure swift auth URL includes trailing slash
+
+Fixes bug 979745
+
+Image objects in swift were previously leaked post-deletion
+due to a silent auth failure caused by the absense of the
+trailing forward slash on the swift connection auth URL.
+
+Change-Id: I9c73a2f75a6466e73801ababdd81db77701ccb20
+---
+ glance/store/swift.py | 6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/glance/store/swift.py b/glance/store/swift.py
+index 2659daa..6db54c4 100644
+--- a/glance/store/swift.py
++++ b/glance/store/swift.py
+@@ -303,12 +303,14 @@ class Store(glance.store.base.Store):
+ """
+ snet = self.snet
+ auth_version = self.auth_version
++ full_auth_url = (auth_url if not auth_url or auth_url.endswith('/')
++ else auth_url + '/')
+ logger.debug(_("Creating Swift connection with "
+- "(auth_address=%(auth_url)s, user=%(user)s, "
++ "(auth_address=%(full_auth_url)s, user=%(user)s, "
+ "snet=%(snet)s, auth_version=%(auth_version)s)") %
+ locals())
+ return swift_client.Connection(
+- authurl=auth_url, user=user, key=key, snet=snet,
++ authurl=full_auth_url, user=user, key=key, snet=snet,
+ auth_version=auth_version)
+
+ def _option_get(self, param):
diff --git a/0002-search-for-logger-in-PATH.patch b/0002-search-for-logger-in-PATH.patch
new file mode 100644
index 0000000..68e4984
--- /dev/null
+++ b/0002-search-for-logger-in-PATH.patch
@@ -0,0 +1,38 @@
+From 98913da774a7b5a978e010d754b77a352bd51ec9 Mon Sep 17 00:00:00 2001
+From: "J. Daniel Schmidt" <jdsn at suse.de>
+Date: Wed, 11 Apr 2012 15:19:55 +0200
+Subject: [PATCH] search for logger in PATH
+
+fixes bug 978907
+
+Change-Id: I16a20982cc90f3857e20ab23e2b3f5d1aa2722a0
+---
+ Authors | 1 +
+ bin/glance-control | 2 +-
+ 2 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/Authors b/Authors
+index 96a506b..31778b9 100644
+--- a/Authors
++++ b/Authors
+@@ -20,6 +20,7 @@ Ewan Mellor <ewan.mellor at citrix.com>
+ Gabriel Hurley <gabriel at strikeawe.com>
+ Hengqing Hu <hudayou at hotmail.com>
+ Isaku Yamahata <yamahata at valinux.co.jp>
++J. Daniel Schmidt <jdsn at suse.de>
+ Jason Koelker <jason at koelker.net>
+ Jay Pipes <jaypipes at gmail.com>
+ James E. Blair <jeblair at hp.com>
+diff --git a/bin/glance-control b/bin/glance-control
+index fac89b2..15473ac 100755
+--- a/bin/glance-control
++++ b/bin/glance-control
+@@ -133,7 +133,7 @@ def do_start(verb, server, conf, args):
+ pass
+
+ def redirect_to_syslog(fds, server):
+- log_cmd = '/usr/bin/logger -t "%s[%d]"' % (server, os.getpid())
++ log_cmd = 'logger -t "%s[%d]"' % (server, os.getpid())
+ process = subprocess.Popen(log_cmd,
+ shell=True,
+ stdin=subprocess.PIPE)
diff --git a/0001-Don-t-access-the-net-while-building-docs.patch b/0003-Don-t-access-the-net-while-building-docs.patch
similarity index 92%
rename from 0001-Don-t-access-the-net-while-building-docs.patch
rename to 0003-Don-t-access-the-net-while-building-docs.patch
index b91eb92..f4aba04 100644
--- a/0001-Don-t-access-the-net-while-building-docs.patch
+++ b/0003-Don-t-access-the-net-while-building-docs.patch
@@ -1,4 +1,4 @@
-From db73cfe8f4b3565c63d6d16b92d03cbbd9a77853 Mon Sep 17 00:00:00 2001
+From 332b3d0f916561bc85eaa1167fda4821815b0a3d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <pbrady at redhat.com>
Date: Fri, 6 Jan 2012 17:12:54 +0000
Subject: [PATCH] Don't access the net while building docs
diff --git a/openstack-glance.spec b/openstack-glance.spec
index 4f647a7..e3a0a9b 100644
--- a/openstack-glance.spec
+++ b/openstack-glance.spec
@@ -1,6 +1,6 @@
Name: openstack-glance
Version: 2012.1
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: OpenStack Image Service
Group: Applications/System
@@ -15,7 +15,9 @@ Source4: openstack-glance-db-setup
#
# patches_base=2012.1
#
-Patch0001: 0001-Don-t-access-the-net-while-building-docs.patch
+Patch0001: 0001-Ensure-swift-auth-URL-includes-trailing-slash.patch
+Patch0002: 0002-search-for-logger-in-PATH.patch
+Patch0003: 0003-Don-t-access-the-net-while-building-docs.patch
BuildArch: noarch
BuildRequires: python2-devel
@@ -93,6 +95,8 @@ This package contains documentation files for glance.
%setup -q -n glance-%{version}
%patch0001 -p1
+%patch0002 -p1
+%patch0003 -p1
sed -i 's|\(sql_connection = \)sqlite:///glance.sqlite|\1mysql://glance:glance@localhost/glance|' etc/glance-registry.conf
@@ -226,6 +230,9 @@ fi
%doc doc/build/html
%changelog
+* Wed Apr 25 2012 Pádraig Brady <P at draigBrady.com> - 2012.1-4
+- Fix leak of swift objects on deletion
+
* Tue Apr 10 2012 Pádraig Brady <P at draigBrady.com> - 2012.1-3
- Fix db setup script to correctly start mysqld
More information about the scm-commits
mailing list