Problem parsing redis url incoming driver

Bug #1691542 reported by Victor Eduardo Bazterra on 2017-05-17
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gnocchi
Fix Released
Undecided
Julien Danjou

Bug Description

Looking for more performance, I explored the very recent version of gnocchi in master branch

commit 25cc9d7a03e81199379c900b85d16b347a8f2387

and I believed I found a bug.

I wanted to have incoming measurements store using redis with sentinel. For this I used the following setup in /etc/gnocchi/gnocchi.conf

[incoming]
driver = redis
redis_url = redis://{fakeuser}:{password}@{sentinel1}:26379?sentinel=mymaster&sentinel_fallback={sentinel2}:26379&sentinel_fallback={sentinel3}:26379

Gnocchi API was not able to connect to redis with sentinel. However, it was able to run when connecting to non sentinel redis installation.

Debugging I found that in gnocchi/storage/common/redis.py when processing CLIENT_LIST_ARGS the line

https://github.com/openstack/gnocchi/blob/master/gnocchi/storage/common/redis.py#L101

it takes the last element of the list instead the full list. I did the following modification to fix this issue:

https://github.com/openstack-telemetry/gnocchi/commit/13f648d030dd88337abc4a7b1cd443921e783426

This fixed my problem, I hope this help others.

Regards,
Victor

Fix proposed to branch: master
Review: https://review.openstack.org/465748

Changed in gnocchi:
assignee: nobody → Julien Danjou (jdanjou)
status: New → In Progress

Reviewed: https://review.openstack.org/465748
Committed: https://git.openstack.org/cgit/openstack/gnocchi/commit/?id=8dc03b9aca500889ef26c2044c48d3d40ee9ef84
Submitter: Jenkins
Branch: master

commit 8dc03b9aca500889ef26c2044c48d3d40ee9ef84
Author: Julien Danjou <email address hidden>
Date: Wed May 17 23:31:28 2017 +0200

    redis: fix CLIENT_LIST_ARGS parsing

    The entire list must be taken, not only the last argument.

    Change-Id: I9b5b9336250cb5292cdd6c7ca4964bfe186575d5
    Closes-Bug: #1691542

Changed in gnocchi:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers