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

gnocchi 4.0.3 not compatible with python-rados >= 10.1.0 #412

Closed
javacruft opened this issue Oct 5, 2017 · 6 comments
Closed

gnocchi 4.0.3 not compatible with python-rados >= 10.1.0 #412

javacruft opened this issue Oct 5, 2017 · 6 comments

Comments

@javacruft
Copy link
Contributor

javacruft commented Oct 5, 2017

Before reporting an issue on Gnocchi, please be sure to provide all necessary
information.

Which version of Gnocchi are you using

4.0.3 with python-rados from Ubuntu Xenial (currently 10.2.7)

This should full-fill the documented requirement for 10.1.0 of this python module

How to reproduce your problem

Deploy gnocchi with ceph storage backend; start collecting measures - add_measures_batch fails due to missing 'operate_aio_write_op' method in python-rados bindings @10.2.7

What is the result that you get

2017-10-05 10:10:29,927 [6341] CRITICAL root: Traceback (most recent call last):
  File "/snap/gnocchi/14/lib/python2.7/site-packages/webob/dec.py", line 131, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/snap/gnocchi/14/lib/python2.7/site-packages/webob/dec.py", line 196, in call_func
    return self.func(req, *args, **kwargs)
  File "/snap/gnocchi/14/lib/python2.7/site-packages/oslo_middleware/base.py", line 131, in __call__
    response = req.get_response(self.application)
  File "/snap/gnocchi/14/lib/python2.7/site-packages/webob/request.py", line 1316, in send
    application, catch_exc_info=False)
  File "/snap/gnocchi/14/lib/python2.7/site-packages/webob/request.py", line 1280, in call_application
    app_iter = application(self.environ, start_response)
  File "/snap/gnocchi/14/lib/python2.7/site-packages/paste/urlmap.py", line 216, in __call__
    return app(environ, start_response)
  File "/snap/gnocchi/14/lib/python2.7/site-packages/webob/dec.py", line 131, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/snap/gnocchi/14/lib/python2.7/site-packages/webob/dec.py", line 196, in call_func
    return self.func(req, *args, **kwargs)
  File "/snap/gnocchi/14/lib/python2.7/site-packages/oslo_middleware/base.py", line 131, in __call__
    response = req.get_response(self.application)
  File "/snap/gnocchi/14/lib/python2.7/site-packages/webob/request.py", line 1316, in send
    application, catch_exc_info=False)
  File "/snap/gnocchi/14/lib/python2.7/site-packages/webob/request.py", line 1280, in call_application
    app_iter = application(self.environ, start_response)
  File "/snap/gnocchi/14/lib/python2.7/site-packages/webob/dec.py", line 131, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/snap/gnocchi/14/lib/python2.7/site-packages/webob/dec.py", line 196, in call_func
    return self.func(req, *args, **kwargs)
  File "/snap/gnocchi/14/lib/python2.7/site-packages/keystonemiddleware/auth_token/__init__.py", line 334, in __call__
    response = req.get_response(self._app)
  File "/snap/gnocchi/14/lib/python2.7/site-packages/webob/request.py", line 1316, in send
    application, catch_exc_info=False)
  File "/snap/gnocchi/14/lib/python2.7/site-packages/webob/request.py", line 1280, in call_application
    app_iter = application(self.environ, start_response)
  File "/snap/gnocchi/14/lib/python2.7/site-packages/webob/exc.py", line 1162, in __call__
    return self.application(environ, start_response)
  File "/snap/gnocchi/14/lib/python2.7/site-packages/gnocchi/rest/app.py", line 69, in __call__
    return self.app(environ, start_response)
  File "/snap/gnocchi/14/lib/python2.7/site-packages/pecan/middleware/recursive.py", line 56, in __call__
    return self.application(environ, start_response)
  File "/snap/gnocchi/14/lib/python2.7/site-packages/pecan/core.py", line 840, in __call__
    return super(Pecan, self).__call__(environ, start_response)
  File "/snap/gnocchi/14/lib/python2.7/site-packages/pecan/core.py", line 683, in __call__
    self.invoke_controller(controller, args, kwargs, state)
  File "/snap/gnocchi/14/lib/python2.7/site-packages/pecan/core.py", line 574, in invoke_controller
    result = controller(*args, **kwargs)
  File "/snap/gnocchi/14/lib/python2.7/site-packages/gnocchi/rest/__init__.py", line 1477, in post
    for metric in known_metrics))
  File "/snap/gnocchi/14/lib/python2.7/site-packages/gnocchi/storage/incoming/ceph.py", line 103, in add_measures_batch
    ops.append(self.ioctx.operate_aio_write_op(
AttributeError: 'rados.Ioctx' object has no attribute 'operate_aio_write_op'

What is result that you expected

Functional measures!

@javacruft
Copy link
Contributor Author

FWIW the fix here might be to just update the minimum python-rados requirement to >= 12.2.0

sileht pushed a commit to sileht/gnocchi that referenced this issue Oct 5, 2017
operate_aio_write_op have been added on Ceph 12.2

Closes gnocchixyz#412
sileht pushed a commit to sileht/gnocchi that referenced this issue Oct 5, 2017
operate_aio_write_op have been added on Ceph 12.2

Closes gnocchixyz#412
@sileht
Copy link
Member

sileht commented Oct 5, 2017

Or switch to python-cradox. python-cradox exists especially to provide up2date python binding on old ceph version.

@javacruft
Copy link
Contributor Author

@sileht do you happen to know which ceph versions cradox supports? 10.2.7 and 10.2.9 are def not happy

@sileht
Copy link
Member

sileht commented Oct 5, 2017 via email

ghost pushed a commit that referenced this issue Oct 5, 2017
operate_aio_write_op have been added on Ceph 12.2

Closes #412
jd pushed a commit to jd/gnocchi that referenced this issue Oct 5, 2017
operate_aio_write_op have been added on Ceph 12.2

Closes gnocchixyz#412

(cherry picked from commit c020725)
ghost pushed a commit that referenced this issue Oct 5, 2017
operate_aio_write_op have been added on Ceph 12.2

Closes #412

(cherry picked from commit c020725)
@jd jd closed this as completed Oct 5, 2017
@yjLiInSky
Copy link

i switch to python-cradox. An error occurred: ImportError: No module named api.
what is the reason?

@jd
Copy link
Member

jd commented Nov 1, 2017

probably an mix of different installed version. clean your env.

openstack-gerrit pushed a commit to openstack/kolla that referenced this issue Nov 28, 2017
Based on gnocchi issue #412 [0], cradox is more stable and recommended
to use.

* Add cradox for source and  RHEL family distro binary.
* Ubuntu binary lacks of cradox package, so install from pypi

[0] gnocchixyz/gnocchi#412

Co-Authored-By: Jeffrey Zhang <zhang.lei.fly@gmail.com>
Change-Id: Icf7d6425884fb889d48c786caebbfc7b7050ae8e
Closes-Bug: #1718701
openstack-gerrit pushed a commit to openstack/kolla that referenced this issue Nov 29, 2017
Based on gnocchi issue #412 [0], cradox is more stable and recommended
to use.

* Add cradox for source and  RHEL family distro binary.
* Ubuntu binary lacks of cradox package, so install from pypi

[0] gnocchixyz/gnocchi#412

Co-Authored-By: Jeffrey Zhang <zhang.lei.fly@gmail.com>
Change-Id: Icf7d6425884fb889d48c786caebbfc7b7050ae8e
Closes-Bug: #1718701
(cherry picked from commit 24f1714)
yankcrime pushed a commit to stackhpc/kolla that referenced this issue Feb 23, 2018
Based on gnocchi issue #412 [0], cradox is more stable and recommended
to use.

* Add cradox for source and  RHEL family distro binary.
* Ubuntu binary lacks of cradox package, so install from pypi

[0] gnocchixyz/gnocchi#412

Co-Authored-By: Jeffrey Zhang <zhang.lei.fly@gmail.com>
Change-Id: Icf7d6425884fb889d48c786caebbfc7b7050ae8e
Closes-Bug: #1718701
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants