statd and archive policy bug

Bug #1532179 reported by Mehdi Abaakouk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gnocchi
Fix Released
Undecided
Julien Danjou
1.3
Fix Released
Undecided
Unassigned

Bug Description

 Hi,

I just run:

./stack.sh
echo "deploys.test.myservice:1|c" | nc -w 1 -u localhost 8125

And gnocchi-statd complains:

[SQL: 'INSERT INTO metric (id, archive_policy_name, created_by_user_id, created_by_project_id, resource_id, name) VALUES (%(id)s, %(archive_policy_name)s, %(created_by_user_id)s, %(created_by_project_id)s, %(resource_id)s, %(name)s)'] [parameters: {'created_by_user_id': UUID('92744466-e80d-422e-bb6d-0c45aa1b5bd8'), 'name': u'deploys.test.myservice|c', 'resource_id': UUID('acda8640-5964-4936-aec0-ccf2df6e0d61'), 'created_by_project_id': UUID('5f4640c0-d3cf-4f0b-b038-732be8676ec0'), 'archive_policy_name': None, 'id': UUID('f5b2e421-ff53-4c92-84b1-df96703b0f35')}]
2016-01-08 12:33:43.707 12143 ERROR oslo_db.sqlalchemy.exc_filters Traceback (most recent call last):
2016-01-08 12:33:43.707 12143 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
2016-01-08 12:33:43.707 12143 ERROR oslo_db.sqlalchemy.exc_filters context)
2016-01-08 12:33:43.707 12143 ERROR oslo_db.sqlalchemy.exc_filters File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
2016-01-08 12:33:43.707 12143 ERROR oslo_db.sqlalchemy.exc_filters cursor.execute(statement, parameters)
2016-01-08 12:33:43.707 12143 ERROR oslo_db.sqlalchemy.exc_filters IntegrityError: null value in column "archive_policy_name" violates not-null constraint
2016-01-08 12:33:43.707 12143 ERROR oslo_db.sqlalchemy.exc_filters DETAIL: Failing row contains (f5b2e421-ff53-4c92-84b1-df96703b0f35, null, 92744466-e80d-422e-bb6d-0c45aa1b5bd8, 5f4640c0-d3cf-4f0b-b038-732be8676ec0, acda8640-5964-4936-aec0-ccf2df6e0d61, deploys.test.myservice|c, active).
2016-01-08 12:33:43.707 12143 ERROR oslo_db.sqlalchemy.exc_filters
2016-01-08 12:33:43.707 12143 ERROR oslo_db.sqlalchemy.exc_filters
2016-01-08 12:33:43.708 12143 ERROR gnocchi.statsd [-] Unable to add measure deploys.test.myservice|c: (psycopg2.IntegrityError) null value in column "archive_policy_name" violates not-null constraint

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

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

Changed in gnocchi:
assignee: nobody → Mehdi Abaakouk (sileht)
status: New → In Progress
Changed in gnocchi:
assignee: Mehdi Abaakouk (sileht) → Julien Danjou (jdanjou)
gordon chung (chungg)
Changed in gnocchi:
assignee: Julien Danjou (jdanjou) → Mehdi Abaakouk (sileht)
Changed in gnocchi:
assignee: Mehdi Abaakouk (sileht) → Julien Danjou (jdanjou)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to gnocchi (master)

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

commit 44b1a06abe454c5221be0f0b0d1c4aa4d1aa9e8c
Author: Mehdi Abaakouk <email address hidden>
Date: Fri Jan 8 13:52:57 2016 +0100

    statsd: Use archive policy rule

    Currently when the archive policy configured for statd is empty,
    no user usable error is returned.

    This change uses archive policy rule to get an archive policy name
    in this case. And log the "NoArchivePolicyRuleMatch" exception if not.

    Change-Id: I6977382d4989934dbf7b6f4e9fa3713f20a8e1ca
    Closes-bug: #1532179

Changed in gnocchi:
status: In Progress → 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/265860

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

Reviewed: https://review.openstack.org/265860
Committed: https://git.openstack.org/cgit/openstack/gnocchi/commit/?id=85e1ca4e8d9cf3dc7d62fbf367b2eeffd8fceb86
Submitter: Jenkins
Branch: stable/1.3

commit 85e1ca4e8d9cf3dc7d62fbf367b2eeffd8fceb86
Author: Mehdi Abaakouk <email address hidden>
Date: Fri Jan 8 13:52:57 2016 +0100

    statsd: Use archive policy rule

    Currently when the archive policy configured for statd is empty,
    no user usable error is returned.

    This change uses archive policy rule to get an archive policy name
    in this case. And log the "NoArchivePolicyRuleMatch" exception if not.

    Change-Id: I6977382d4989934dbf7b6f4e9fa3713f20a8e1ca
    Closes-bug: #1532179
    (cherry picked from commit 44b1a06abe454c5221be0f0b0d1c4aa4d1aa9e8c)

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.

Other bug subscribers

Remote bug watches

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