gnocchiclient interface change causes errors

Bug #1714483 reported by Gautam Prasad on 2017-09-01
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Undecided
gordon chung

Bug Description

The gnocchi client interface has changed as per this commit:

https://github.com/gnocchixyz/python-gnocchiclient/commit/3b5648f6fa88f8c36eadb3a5729a4739788237fc

https://github.com/openstack/ceilometer/blob/master/ceilometer/gnocchi_client.py will probably need to adjust to the new interface. Not sure if region_name and interface is needed to be passed..

We are getting UT errors like below, there are couple of them. I havent tested these in deployment, but seems like it will be broken there too.

ceilometer.tests.unit.dispatcher.test_gnocchi.DispatcherTest.test_activity_gnocchi_project_not_found
----------------------------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "/root/pvcos/ceilometer-es/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
        return func(*args, **keywargs)
      File "ceilometer/tests/unit/dispatcher/test_gnocchi.py", line 449, in test_activity_gnocchi_project_not_found
        self._do_test_activity_filter(2)
      File "/root/pvcos/ceilometer-es/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
        return func(*args, **keywargs)
      File "ceilometer/tests/unit/dispatcher/test_gnocchi.py", line 435, in _do_test_activity_filter
        d = gnocchi.GnocchiDispatcher(self.conf.conf)
      File "ceilometer/dispatcher/gnocchi.py", line 219, in __init__
        self._gnocchi = gnocchi_client.get_gnocchiclient(conf)
      File "ceilometer/gnocchi_client.py", line 37, in get_gnocchiclient
        adapter_options={'connect_retries': 3})
      File "/root/pvcos/ceilometer-es/.tox/py27/lib/python2.7/site-packages/gnocchiclient/client.py", line 24, in Client
        return client_class(*args, **kwargs)
    TypeError: __init__() got an unexpected keyword argument 'region_name'

gordon chung (chungg) on 2017-09-01
Changed in ceilometer:
status: New → In Progress
assignee: nobody → gordon chung (chungg)

Reviewed: https://review.openstack.org/500046
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=c49546b43fdb49e4df63f095ffd71e3effa5717e
Submitter: Jenkins
Branch: master

commit c49546b43fdb49e4df63f095ffd71e3effa5717e
Author: gord chung <email address hidden>
Date: Fri Sep 1 13:15:12 2017 +0000

    support new gnocchiclient interface

    support for explicitly setting interface/regoin_name was changed in
    gnocchiclient 3.1 and remove in gnocchiclient 4.

    temporarily cap gnocchiclient to allow gate to pass

    Closes-Bug: #1714483
    Change-Id: I851e16f537f547fb3a31fb22535dd4dae62fb235

Changed in ceilometer:
status: In Progress → Fix Released
Gautam Prasad (gautpras) wrote :

Thanks Gordon for the fix. Do we have plan to port this to stable/pike?

gordon chung (chungg) wrote :

yes, we should do that.

Change abandoned by gordon chung (<email address hidden>) on branch: stable/ocata
Review: https://review.openstack.org/500977
Reason: we'll just cap it

Reviewed: https://review.openstack.org/500976
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=ef3cff89a8a4616ebbc5edaed61d80dabb0ae8b1
Submitter: Jenkins
Branch: stable/pike

commit ef3cff89a8a4616ebbc5edaed61d80dabb0ae8b1
Author: gord chung <email address hidden>
Date: Fri Sep 1 13:15:12 2017 +0000

    support new gnocchiclient interface

    support for explicitly setting interface/regoin_name was changed in
    gnocchiclient 3.1 and remove in gnocchiclient 4.

    Closes-Bug: #1714483
    Change-Id: I851e16f537f547fb3a31fb22535dd4dae62fb235
    (cherry picked from commit c49546b43fdb49e4df63f095ffd71e3effa5717e)

tags: added: in-stable-pike

This issue was fixed in the openstack/ceilometer 9.0.1 release.

This issue was fixed in the openstack/aodh 5.1.0 release.

This issue was fixed in the openstack/aodh 6.0.0 release.

This issue was fixed in the openstack/ceilometer 10.0.0 release.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers