gnocchi-statsd errors out ugly when lacking config

Bug #1481439 reported by Chris Dent
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Gnocchi
Fix Released
Low
Mehdi Abaakouk
1.3
Fix Released
Low
Julien Danjou

Bug Description

If you try to start gnocchi-statsd without config settings it will produce confusions exceptions (for instance since it has no resource id there will be an exception from sqla).

The conf settings that statsd wants are:

                'resource_id',
                'user_id',
                'project_id',
                'archive_policy_name',
                'flush_delay',

None of these have defaults. flush_delay could presumably have a default.

We should probably error out with a nice message when there are no defaults for the rest of them so that the initiator has some idea of what to do to fix the problem.

Revision history for this message
Julien Danjou (jdanjou) wrote :

You can set them to mandatory=True with oslo.config. I think I did that but it forced people to configure that even if they were not using statsd.

Revision history for this message
Chris Dent (cdent) wrote :

Yeah, I think it is going to have to be in the statsd code itself: pseudo:

if resource_id is None:
    send a friendly message
if something else is None:
   send some other friendly message

Julien Danjou (jdanjou)
Changed in gnocchi:
status: New → Confirmed
importance: Undecided → Low
Changed in gnocchi:
assignee: nobody → Pradeep Kilambi (pkilambi)
Revision history for this message
Pradeep Kilambi (pkilambi) wrote :
Changed in gnocchi:
status: Confirmed → In Progress
Changed in gnocchi:
assignee: Pradeep Kilambi (pkilambi) → Mehdi Abaakouk (sileht)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on gnocchi (master)

Change abandoned by Pradeep Kilambi (<email address hidden>) on branch: master
Review: https://review.openstack.org/245325

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to gnocchi (master)

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

commit b877365de696bc3184b0da7571b7bb264e636654
Author: Mehdi Abaakouk <email address hidden>
Date: Mon Nov 23 12:13:49 2015 +0100

    statsd have some required configuration options

    Closes-bug: #1481439
    Change-Id: I7b37ccdf2988135504add1801c23e28e9123ccd0

Changed in gnocchi:
status: In Progress → Fix Released
Julien Danjou (jdanjou)
Changed in gnocchi:
status: Fix Released → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to gnocchi (stable/1.3)

Fix proposed to branch: stable/1.3
Review: https://review.openstack.org/279553

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to gnocchi (stable/1.3)

Reviewed: https://review.openstack.org/279553
Committed: https://git.openstack.org/cgit/openstack/gnocchi/commit/?id=427dc28f2c6f12c409270411d3168e3403f75953
Submitter: Jenkins
Branch: stable/1.3

commit 427dc28f2c6f12c409270411d3168e3403f75953
Author: Mehdi Abaakouk <email address hidden>
Date: Mon Nov 23 12:13:49 2015 +0100

    statsd have some required configuration options

    Closes-bug: #1481439
    Change-Id: I7b37ccdf2988135504add1801c23e28e9123ccd0
    (cherry-picked from b877365de696bc3184b0da7571b7bb264e636654)

Julien Danjou (jdanjou)
Changed in gnocchi:
milestone: none → 2.0.0
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.