Project

General

Profile

Bug #5970

librados: python bindings Rados() backwards compatiblity issue with 0.67.0

Added by Josh Durgin over 10 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Immediate
Assignee:
Category:
librados
Target version:
-
% Done:

0%

Source:
Community (user)
Tags:
Backport:
dumpling
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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

Revision 34da9cbc (diff)
Added by Josh Durgin over 10 years ago

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 <>
Signed-off-by: Josh Durgin <>
Reviewed-by: Sage Weil <>

Revision dd0df583 (diff)
Added by Josh Durgin over 10 years ago

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 <>
Signed-off-by: Josh Durgin <>
Reviewed-by: Sage Weil <>
(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

Also available in: Atom PDF