Bug #5970
librados: python bindings Rados() backwards compatiblity issue with 0.67.0
0%
Description
As described on ceph-users:
I have a Ceph test cluster doing storage for an OpenStack Grizzly platform (also testing). Upgrading to 0.67 went fine on the Ceph side with the cluster showing healthy but suddenly I can't upload images into Glance anymore. The upload fails and glance-api throws an error: 2013-08-14 15:19:55.898 ERROR glance.api.v1.images [4dcd9de0-af65-4902-a36d-afc5497605e7 3867c65db6cc48398a0f57ce53144e69 5dbca756421c4a3eb0a1cc2f1ee3c67c] Failed to upload image 2013-08-14 15:19:55.898 24740 TRACE glance.api.v1.images Traceback (most recent call last): 2013-08-14 15:19:55.898 24740 TRACE glance.api.v1.images File "/usr/lib/python2.6/site-packages/glance/api/v1/images.py", line 444, in _upload 2013-08-14 15:19:55.898 24740 TRACE glance.api.v1.images image_meta['size']) 2013-08-14 15:19:55.898 24740 TRACE glance.api.v1.images File "/usr/lib/python2.6/site-packages/glance/store/rbd.py", line 241, in add 2013-08-14 15:19:55.898 24740 TRACE glance.api.v1.images with rados.Rados(conffile=self.conf_file, rados_id=self.user) as conn: 2013-08-14 15:19:55.898 24740 TRACE glance.api.v1.images File "/usr/lib/python2.6/site-packages/rados.py", line 195, in __init__ 2013-08-14 15:19:55.898 24740 TRACE glance.api.v1.images raise Error("Rados(): can't supply both rados_id and name") 2013-08-14 15:19:55.898 24740 TRACE glance.api.v1.images Error: Rados(): can't supply both rados_id and name 2013-08-14 15:19:55.898 24740 TRACE glance.api.v1.images I'm not sure if there's a patch I need to track down for Glance or if I missed a change in the necessary Glance/Ceph setup. Is anyone else seeing this behavior? Thanks!
Associated revisions
rados.py: fix Rados() backwards compatibility
Previously it had no name parameter, so the default will be used by
old clients. However, if an old client set rados_id, a new check that
both rados_id and name are set would result in an error. Fix this by
only applying the default names after the check, and add tests of this
behavior.
This was introduced in 783b7ec847c7f987ac1814c9c41c91921cac4eba,
so it does not affect cuttlefish.
Fixes: #5970
Reported-by: Michael Morgan <mmorgan@dca.net>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Sage Weil <sage.weil@inktank.com>
rados.py: fix Rados() backwards compatibility
Previously it had no name parameter, so the default will be used by
old clients. However, if an old client set rados_id, a new check that
both rados_id and name are set would result in an error. Fix this by
only applying the default names after the check, and add tests of this
behavior.
This was introduced in 783b7ec847c7f987ac1814c9c41c91921cac4eba,
so it does not affect cuttlefish.
Fixes: #5970
Reported-by: Michael Morgan <mmorgan@dca.net>
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Sage Weil <sage.weil@inktank.com>
(cherry picked from commit 34da9cbc33205623cf64aee1989f53dfb2c5bddd)
History
#1 Updated by Josh Durgin over 10 years ago
- Status changed from In Progress to Resolved
- Backport set to dumpling
34da9cbc33205623cf64aee1989f53dfb2c5bddd in next and dd0df583e2661444287a36acc240a8ac0ec381e8 in dumpling