[Hbase]Resource with multiple meters is not handled correctly

Bug #1288284 reported by Nadya Privalova
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
High
Nadya Privalova

Bug Description

In case when resource should be updated only new meter is recorded. It causes 'get meters' returns cut list of meters

Changed in ceilometer:
assignee: nobody → Nadya Privalova (nprivalova)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ceilometer (master)

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

Changed in ceilometer:
status: New → In Progress
Changed in ceilometer:
milestone: none → icehouse-rc1
Changed in ceilometer:
importance: Undecided → Medium
Eoghan Glynn (eglynn)
Changed in ceilometer:
milestone: icehouse-rc1 → none
Eoghan Glynn (eglynn)
summary: - [Hbase]Resourse with multiple meters is not handeled correctly
+ [Hbase]Resource with multiple meters is not handled correctly
Changed in ceilometer:
importance: Medium → High
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to ceilometer (master)

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

commit b938f10c320ec5a8c110299a4146334a40c6a773
Author: Nadya Privalova <email address hidden>
Date: Wed Apr 2 17:44:04 2014 +0400

    Make entities (Resource, User, Project) able to store lists

    When one Resource contains several meters we should store all of them.
    The same is true about User, Project and Resource regarding sources.
    To make it possible it is needed to change the way we store data in Hbase.

    Now Resource, User and Project may contain several sources. Besides, Resource may contain several meters.
    To store all of them we use ColumnFamily f and columns m_meters and s_sources.
    All meters stored as JSON-ed list.
    E.g.
    resource_1: {f: {meters: [meter1, meter2, meter3]} }
    The same for users and projects:
    user_1: {f: [sources: [source_1, source_2]}

    We cannot update these lists safely.

    In this commit m_meters and s_sources are changed to m_{unique_meter_structure} and s_{unique_source_name}.
    So we getting rid of 'lists' and may use safe put() method.
    All meters in Resource and sources in User, Project, Resource are
    stored with stub value=1 to make filtering simpler.

    New ColumnFamilies are not introdused here because CF is a 'namespace' and make sence in case when
    there is a lot of requests only for this CF. But it's not the case for Ceilometer: each request may
    contain _id field or metadata filter. It's better to store all this info in one CF.

    Closes bug 1288284

    Change-Id: I5814202e3d59fd29f96c8734e445367f766e6a4a

Changed in ceilometer:
status: In Progress → Fix Committed
Eoghan Glynn (eglynn)
Changed in ceilometer:
milestone: none → juno-1
Thierry Carrez (ttx)
Changed in ceilometer:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: juno-1 → 2014.2
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.