Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop cradox #1248

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
cradox is not supported anymore.
Update the docs etc. to use rados directly.

(cherry picked from commit bf37e90)
  • Loading branch information
mrunge authored and tobias-urdin committed Jun 13, 2022
commit e769fb4fa56890c824daafcb0023f55903c9b926
7 changes: 1 addition & 6 deletions doc/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,7 @@ be created for example with:


Gnocchi leverages some *librados* features (omap, async, operation context)
available in the Python binding only since *python-rados* >= 12.2.0. To handle
this, Gnocchi uses *cradox* python library which has exactly the same API but
works with Ceph >= 0.80.0.

If Ceph and python-rados are >= 12.2.0, the cradox Python library becomes
optional but is still recommended.
available in the Ceph Python binding only since *python-rados* >= 12.2.0.


Configuration
Expand Down
19 changes: 7 additions & 12 deletions gnocchi/common/ceph.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,10 @@

LOG = daiquiri.getLogger(__name__)


for RADOS_MODULE_NAME in ('rados', 'cradox'):
try:
rados = __import__(RADOS_MODULE_NAME)
except ImportError:
pass
else:
break
else:
RADOS_MODULE_NAME = 'rados'
try:
rados = __import__(RADOS_MODULE_NAME)
except ImportError:
RADOS_MODULE_NAME = None
rados = None

Expand All @@ -48,12 +43,12 @@ def create_rados_connection(conf):
options['client_mount_timeout'] = conf.ceph_timeout

if not rados:
raise ImportError("No module named 'rados' nor 'cradox'")
raise ImportError("No module named 'rados'")

if not hasattr(rados, 'OmapIterator'):
raise ImportError("Your rados python module does not support "
"omap feature. Install 'cradox' (recommended) "
"or upgrade 'python-rados' >= 9.1.0 ")
"omap feature. Install or upgrade "
"'python-rados' >= 9.1.0 ")

LOG.info("Ceph storage backend use '%s' python library",
RADOS_MODULE_NAME)
Expand Down