[Postgresql] ERROR in ceilometer-collector log after successful tempest run

Bug #1237671 reported by David Kranz
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
High
Mehdi Abaakouk
Havana
Fix Released
High
Eoghan Glynn

Bug Description

From http://logs.openstack.org/80/49580/2/check/check-tempest-devstack-vm-postgres-full/9fbd338/logs

2013-10-09 16:31:59.651 23708 ERROR ceilometer.collector.dispatcher.database [req-0d709c16-9e46-4eac-be31-0c2c4499dec5 admin None] Failed to record metering data: (IntegrityError) duplicate key value violates unique constraint "project_pkey"
2013-10-09 16:32:30.476 23708 ERROR ceilometer.collector.dispatcher.database [req-636bd715-dac8-44d2-9fb9-8651b748e025 None None] Failed to record metering data: (IntegrityError) duplicate key value violates unique constraint "resource_pkey"
2013-10-09 16:32:31.298 23708 ERROR ceilometer.collector.dispatcher.database [req-a355551e-da8d-400a-90a8-56b3053cf36b None None] Failed to record metering data: (IntegrityError) duplicate key value violates unique constraint "resource_pkey"
2013-10-09 16:32:32.542 23708 ERROR ceilometer.collector.dispatcher.database [req-35402a60-f548-435f-b560-2243521dba07 None None] Failed to record metering data: (IntegrityError) duplicate key value violates unique constraint "resource_pkey"

Mehdi Abaakouk (sileht)
Changed in ceilometer:
importance: Undecided → High
Mehdi Abaakouk (sileht)
Changed in ceilometer:
assignee: nobody → Mehdi Abaakouk (sileht)
Mehdi Abaakouk (sileht)
summary: - ERROR in ceilometer-collector log after successful tempest run
+ [Postgresql] ERROR in ceilometer-collector log after successful tempest
+ run
Changed in ceilometer:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/53321
Committed: http://github.com/openstack/ceilometer/commit/dd62f9ce0d8d5abac0fb34b0520515b6c4566c1f
Submitter: Jenkins
Branch: master

commit dd62f9ce0d8d5abac0fb34b0520515b6c4566c1f
Author: Mehdi Abaakouk <email address hidden>
Date: Wed Oct 23 13:33:53 2013 +0200

    make record_metering_data concurrency safe

    Recording metering might happen in parallel, and if two sqlalchemy
    session try to create a source, a user, a project or a resource at the
    same time, one of them fail with a IntegrityError.

    This patch ensure the record_metering_data sqlalchemy session always
    have the needed source, user, project and a resource by creating missing
    obj in an other sqlalchemy session.

    Fixes bug: #1237671

    Change-Id: Ie8761ce1615c3142ad6ad2a400537f465f3bbf0a

Changed in ceilometer:
status: In Progress → Fix Committed
Eoghan Glynn (eglynn)
tags: added: havana-backport-potential
Changed in ceilometer:
milestone: none → icehouse-1
Revision history for this message
David Kranz (david-kranz) wrote :

A more "global" view of this sort of thing can be obtained by looking at the ceilo entries in https://github.com/openstack/tempest/blob/master/etc/whitelist.yaml. I am not sure bug tickets exist for all of those items.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ceilometer (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/58853

Thierry Carrez (ttx)
Changed in ceilometer:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (stable/havana)

Reviewed: https://review.openstack.org/58853
Committed: http://github.com/openstack/ceilometer/commit/4a60f53ece305509cbed838bd74364dcdc243248
Submitter: Jenkins
Branch: stable/havana

commit 4a60f53ece305509cbed838bd74364dcdc243248
Author: Mehdi Abaakouk <email address hidden>
Date: Wed Oct 23 13:33:53 2013 +0200

    make record_metering_data concurrency safe

    Recording metering might happen in parallel, and if two sqlalchemy
    session try to create a source, a user, a project or a resource at the
    same time, one of them fail with a IntegrityError.

    This patch ensure the record_metering_data sqlalchemy session always
    have the needed source, user, project and a resource by creating missing
    obj in an other sqlalchemy session.

    Fixes bug: #1237671

    Change-Id: Ie8761ce1615c3142ad6ad2a400537f465f3bbf0a
    (cherry picked from commit dd62f9ce0d8d5abac0fb34b0520515b6c4566c1f)

Alan Pevec (apevec)
tags: removed: havana-backport-potential
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: icehouse-1 → 2014.1
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.