Hello community, here is the log from the commit of package openstack-glance for openSUSE:Factory checked in at 2013-01-24 10:45:35 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/openstack-glance (Old) and /work/SRC/openSUSE:Factory/.openstack-glance.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "openstack-glance", Maintainer is "[email protected]" Changes: -------- --- /work/SRC/openSUSE:Factory/openstack-glance/openstack-glance.changes 2013-01-17 09:52:22.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.openstack-glance.new/openstack-glance.changes 2013-01-24 10:45:38.000000000 +0100 @@ -1,0 +2,8 @@ +Thu Jan 17 15:11:47 UTC 2013 - [email protected] + +- Update to version 2012.2.3+git.1358435434.fd04efb: + + Log error on failure to load paste deploy app. + + Verify size in addition to checksum of uploaded image +- Drop glance-webob-1_2b1-compat.patch: merged upstream. + +------------------------------------------------------------------- Old: ---- glance-webob-1_2b1-compat.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ openstack-glance-doc.spec ++++++ --- /var/tmp/diff_new_pack.1GQtCA/_old 2013-01-24 10:45:39.000000000 +0100 +++ /var/tmp/diff_new_pack.1GQtCA/_new 2013-01-24 10:45:39.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package openstack-glance-doc # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,8 +19,8 @@ %define component glance Name: openstack-%{component}-doc -Version: 2012.2.3+git.1355916805.35260a7 -Release: 0 +Version: 2012.2.3+git.1358435434.fd04efb +Release: 1 License: Apache-2.0 Summary: OpenStack Image Service (Glance) - Documentation Url: https://launchpad.net/glance ++++++ openstack-glance.spec ++++++ --- /var/tmp/diff_new_pack.1GQtCA/_old 2013-01-24 10:45:39.000000000 +0100 +++ /var/tmp/diff_new_pack.1GQtCA/_new 2013-01-24 10:45:39.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package openstack-glance # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2011 B1 Systems GmbH, Vohburg, Germany. # # All modifications and additions to the file contributed by third parties @@ -22,8 +22,8 @@ %define username openstack-%{component} Name: openstack-%{component} -Version: 2012.2.3+git.1355916805.35260a7 -Release: 0 +Version: 2012.2.3+git.1358435434.fd04efb +Release: 1 License: Apache-2.0 Summary: OpenStack Image Service (Glance) Url: https://launchpad.net/glance @@ -36,8 +36,6 @@ Source5: %{name}.logrotate # PATCH-FIX-UPSTREAM: [email protected] -- Backport of https://review.openstack.org/#/c/17798/ Patch0: glance-run-testsuite-as-root.patch -# PATCH-FIX-UPSTREAM: [email protected] -- Backport of https://review.openstack.org/#/c/17794/ -Patch1: glance-webob-1_2b1-compat.patch # PATCH-FIX-UPSTREAM: [email protected] -- Backport of https://review.openstack.org/#/c/17926/ Patch2: glance-lp1083155.patch # PATCH-FIX-UPSTREAM: [email protected] -- Backport of https://review.openstack.org/#/c/17932/ @@ -142,7 +140,6 @@ %prep %setup -q -n glance-2012.2.3 %patch0 -p1 -%patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 @@ -202,7 +199,6 @@ # Drop the "glance" binary, there is glanceclient: rm %{buildroot}%{_bindir}/glance - %pre getent group %{groupname} >/dev/null || groupadd -r %{groupname} getent passwd %{username} >/dev/null || useradd -r -g %{groupname} -d %{_localstatedir}/lib/glance -s /sbin/nologin -c "OpenStack glance Daemons" %{username} ++++++ glance-stable-folsom.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/glance-2012.2.3/ChangeLog new/glance-2012.2.3/ChangeLog --- old/glance-2012.2.3/ChangeLog 2012-12-13 23:14:39.000000000 +0100 +++ new/glance-2012.2.3/ChangeLog 2013-01-16 18:45:44.000000000 +0100 @@ -1,3 +1,55 @@ +commit fd04efb679a4521a2105ecb6645e40a60dfa3aeb +Merge: 3c56950 bca6e26 +Author: Jenkins <[email protected]> +Date: Wed Jan 16 17:41:03 2013 +0000 + + Merge "wsgi.Middleware forward-compatibility with webob 1.2b1 or later" into stable/folsom + +commit 3c569509c999d377ca3ff470d03e0b294850508c +Merge: 514b4b4 5e5e722 +Author: Jenkins <[email protected]> +Date: Thu Jan 10 01:12:44 2013 +0000 + + Merge "Verify size in addition to checksum of uploaded image" into stable/folsom + +commit 514b4b49fdba873518f8736b280d6691f34d3426 +Author: Eoghan Glynn <[email protected]> +Date: Thu Jan 3 14:11:45 2013 +0000 + + Log error on failure to load paste deploy app. + + Fixes bug 1091294 + + Avoids possible silent failure of service launch when say a + dependency such as keystone is missing (but required by the + configured paste_deploy flavor). + + Change-Id: I9a63d24bcf0a93277829d24073268210d2c063d3 + + glance/common/config.py | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +commit 5e5e722d353e0670d2aa06cbac8e138617c10806 +Author: Eoghan Glynn <[email protected]> +Date: Thu Dec 20 15:33:56 2012 +0000 + + Verify size in addition to checksum of uploaded image + + Fixes bug 1092584 + + Previously only the supplied checksum was verified against the actual + checksum calculated by the backend store, with the image being killed + on mismatch. + + Now we also similarly verify the supplied image size, if provided. + + Change-Id: I87fa3ff77715111f1095f3ebe64cd699776ec27e + + glance/api/v1/images.py | 28 ++++++++++++++++------------ + glance/tests/functional/v1/test_api.py | 19 +++++++++++++++++++ + glance/tests/unit/v1/test_api.py | 24 +++++++++++++++++++++--- + 3 files changed, 56 insertions(+), 15 deletions(-) + commit 35260a7f0b9336d65aac9ffb0aa4b099a35a54aa Author: Mark McLoughlin <[email protected]> Date: Thu Nov 29 21:28:17 2012 +0000 @@ -11,6 +63,23 @@ glance/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) +commit bca6e2661f44b4d27cba7431903ee1ce67205372 +Author: Sascha Peilicke <[email protected]> +Date: Mon Dec 10 19:20:26 2012 +0100 + + wsgi.Middleware forward-compatibility with webob 1.2b1 or later + + Response.request is None by default + (http://docs.webob.org/en/latest/news.html#b1), but is used in the + CacheFilter WSGI middleware. + + Backport of https://review.openstack.org/#/c/17794/ + + Change-Id: I28f5ca92fe517f4f56af934799db32650e079ba7 + + glance/common/wsgi.py | 1 + + 1 file changed, 1 insertion(+) + commit 199783cec5d42203740c8fe2272b7037315ce941 Author: Mark McLoughlin <[email protected]> Date: Thu Nov 29 21:28:17 2012 +0000 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/glance-2012.2.3/glance/api/v1/images.py new/glance-2012.2.3/glance/api/v1/images.py --- old/glance-2012.2.3/glance/api/v1/images.py 2012-12-13 23:12:32.000000000 +0100 +++ new/glance-2012.2.3/glance/api/v1/images.py 2013-01-16 18:41:39.000000000 +0100 @@ -436,19 +436,23 @@ utils.CooperativeReader(image_data), image_meta['size']) - # Verify any supplied checksum value matches checksum + def _kill_mismatched(image_meta, attr, actual): + supplied = image_meta.get(attr) + if supplied and supplied != actual: + msg = _("Supplied %(attr)s (%(supplied)s) and " + "%(attr)s generated from uploaded image " + "(%(actual)s) did not match. Setting image " + "status to 'killed'.") % locals() + LOG.error(msg) + self._safe_kill(req, image_id) + raise HTTPBadRequest(explanation=msg, + content_type="text/plain", + request=req) + + # Verify any supplied size/checksum value matches size/checksum # returned from store when adding image - supplied_checksum = image_meta.get('checksum') - if supplied_checksum and supplied_checksum != checksum: - msg = _("Supplied checksum (%(supplied_checksum)s) and " - "checksum generated from uploaded image " - "(%(checksum)s) did not match. Setting image " - "status to 'killed'.") % locals() - LOG.error(msg) - self._safe_kill(req, image_id) - raise HTTPBadRequest(explanation=msg, - content_type="text/plain", - request=req) + _kill_mismatched(image_meta, 'size', size) + _kill_mismatched(image_meta, 'checksum', checksum) # Update the database with the checksum returned # from the backend store diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/glance-2012.2.3/glance/common/config.py new/glance-2012.2.3/glance/common/config.py --- old/glance-2012.2.3/glance/common/config.py 2012-12-13 23:12:32.000000000 +0100 +++ new/glance-2012.2.3/glance/common/config.py 2013-01-16 18:41:39.000000000 +0100 @@ -192,6 +192,8 @@ return app except (LookupError, ImportError), e: - raise RuntimeError("Unable to load %(app_name)s from " - "configuration file %(conf_file)s." - "\nGot: %(e)r" % locals()) + msg = _("Unable to load %(app_name)s from " + "configuration file %(conf_file)s." + "\nGot: %(e)r") % locals() + logger.error(msg) + raise RuntimeError(msg) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/glance-2012.2.3/glance/common/wsgi.py new/glance-2012.2.3/glance/common/wsgi.py --- old/glance-2012.2.3/glance/common/wsgi.py 2012-12-13 23:12:32.000000000 +0100 +++ new/glance-2012.2.3/glance/common/wsgi.py 2013-01-16 18:41:39.000000000 +0100 @@ -324,6 +324,7 @@ if response: return response response = req.get_response(self.application) + response.request = req return self.process_response(response) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/glance-2012.2.3/glance/tests/functional/v1/test_api.py new/glance-2012.2.3/glance/tests/functional/v1/test_api.py --- old/glance-2012.2.3/glance/tests/functional/v1/test_api.py 2012-12-13 23:12:32.000000000 +0100 +++ new/glance-2012.2.3/glance/tests/functional/v1/test_api.py 2013-01-16 18:41:39.000000000 +0100 @@ -1451,3 +1451,22 @@ self.assertEqual('tenant2', response['x-image-meta-owner']) self.stop_servers() + + @skip_if_disabled + def test_mismatched_size(self): + """ + Test mismatched size. + """ + self.cleanup() + self.start_servers(**self.__dict__.copy()) + + image_data = "*" * FIVE_KB + headers = minimal_headers('Image1') + headers['x-image-meta-size'] = str(FIVE_KB + 1) + path = "http://%s:%d/v1/images" % ("127.0.0.1", self.api_port) + http = httplib2.Http() + response, content = http.request(path, 'POST', headers=headers, + body=image_data) + self.assertEqual(response.status, 400) + + self.stop_servers() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/glance-2012.2.3/glance/tests/unit/v1/test_api.py new/glance-2012.2.3/glance/tests/unit/v1/test_api.py --- old/glance-2012.2.3/glance/tests/unit/v1/test_api.py 2012-12-13 23:12:32.000000000 +0100 +++ new/glance-2012.2.3/glance/tests/unit/v1/test_api.py 2013-01-16 18:41:39.000000000 +0100 @@ -2189,12 +2189,11 @@ self.assertEqual(res.status_int, 200) self.assertEqual(len(res.body), 0) - def test_add_image_checksum_mismatch(self): + def _do_test_add_image_attribute_mismatch(self, attributes): fixture_headers = { - 'x-image-meta-checksum': 'asdf', - 'x-image-meta-size': '4', 'x-image-meta-name': 'fake image #3', } + fixture_headers.update(attributes) req = webob.Request.blank("/images") req.method = 'POST' @@ -2206,6 +2205,25 @@ res = req.get_response(self.api) self.assertEquals(res.status_int, 400) + def test_add_image_checksum_mismatch(self): + attributes = { + 'x-image-meta-checksum': 'asdf', + } + self._do_test_add_image_attribute_mismatch(attributes) + + def test_add_image_size_mismatch(self): + attributes = { + 'x-image-meta-size': str(len("XXXX") + 1), + } + self._do_test_add_image_attribute_mismatch(attributes) + + def test_add_image_checksum_and_size_mismatch(self): + attributes = { + 'x-image-meta-checksum': 'asdf', + 'x-image-meta-size': str(len("XXXX") + 1), + } + self._do_test_add_image_attribute_mismatch(attributes) + def test_add_image_bad_store(self): """Tests raises BadRequest for invalid store header""" fixture_headers = {'x-image-meta-store': 'bad', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/glance-2012.2.3/glance/versioninfo new/glance-2012.2.3/glance/versioninfo --- old/glance-2012.2.3/glance/versioninfo 2012-12-13 23:14:37.000000000 +0100 +++ new/glance-2012.2.3/glance/versioninfo 2013-01-16 18:45:42.000000000 +0100 @@ -1 +1 @@ -2012.2.3~20121213.2.g35260a7 +2012.2.3~20130116.7.gfd04efb -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
