samples order is not userfriendly

Bug #1227495 reported by fujioka yuuichi
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-ceilometerclient
Fix Released
Undecided
fujioka yuuichi

Bug Description

Samples of "ceilometer sample-list" are sorted by Resource ID and Volume.
Expected order is Resource ID and Timestamp.

Expected:
$ ceilometer sample-list -m cpu_util
+--------------------------------------+----------+-------+----------------+------+---------------------+
| Resource ID | Name | Type | Volume | Unit | Timestamp |
+--------------------------------------+----------+-------+----------------+------+---------------------+
| 0be312b9-44b1-46bd-85d1-ca22f0d056bd | cpu_util | gauge | 0.241379310345 | % | 2013-09-19T04:37:16 |
| 0be312b9-44b1-46bd-85d1-ca22f0d056bd | cpu_util | gauge | 0.233333333333 | % | 2013-09-19T04:37:46 |
| 0be312b9-44b1-46bd-85d1-ca22f0d056bd | cpu_util | gauge | 0.3 | % | 2013-09-19T04:38:16 |
| 0be312b9-44b1-46bd-85d1-ca22f0d056bd | cpu_util | gauge | 0.266666666667 | % | 2013-09-19T04:38:46 |
| 0be312b9-44b1-46bd-85d1-ca22f0d056bd | cpu_util | gauge | 0.266666666667 | % | 2013-09-19T04:39:16 |
| 0be312b9-44b1-46bd-85d1-ca22f0d056bd | cpu_util | gauge | 0.266666666667 | % | 2013-09-19T04:39:46 |
+--------------------------------------+----------+-------+----------------+------+---------------------+

Actual:
$ ceilometer sample-list -m cpu_util
+--------------------------------------+----------+-------+----------------+------+---------------------+
| Resource ID | Name | Type | Volume | Unit | Timestamp |
+--------------------------------------+----------+-------+----------------+------+---------------------+
| 0be312b9-44b1-46bd-85d1-ca22f0d056bd | cpu_util | gauge | 0.233333333333 | % | 2013-09-19T04:37:46 |
| 0be312b9-44b1-46bd-85d1-ca22f0d056bd | cpu_util | gauge | 0.241379310345 | % | 2013-09-19T04:37:16 |
| 0be312b9-44b1-46bd-85d1-ca22f0d056bd | cpu_util | gauge | 0.266666666667 | % | 2013-09-19T04:38:46 |
| 0be312b9-44b1-46bd-85d1-ca22f0d056bd | cpu_util | gauge | 0.266666666667 | % | 2013-09-19T04:39:16 |
| 0be312b9-44b1-46bd-85d1-ca22f0d056bd | cpu_util | gauge | 0.266666666667 | % | 2013-09-19T04:39:46 |
| 0be312b9-44b1-46bd-85d1-ca22f0d056bd | cpu_util | gauge | 0.3 | % | 2013-09-19T04:38:16 |
+--------------------------------------+----------+-------+----------------+------+---------------------+

Changed in python-ceilometerclient:
assignee: nobody → fujioka yuuichi (fujioka-yuuichi-d)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-ceilometerclient (master)

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

Changed in python-ceilometerclient:
status: New → In Progress
Revision history for this message
Mehdi Abaakouk (sileht) wrote :

The bug report is outdated I think, a fix have already been done on the ceilometer storage layer, now the samples are ordered by timestamp when you call the API.

https://github.com/openstack/ceilometer/commit/1961ec9c733890b24bc47a4cd1168624e76c2477

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

Agreed that's sorted by timestamp by default

Changed in python-ceilometerclient:
status: In Progress → Incomplete
Revision history for this message
fujioka yuuichi (fujioka-yuuichi-d) wrote :

Indeed the server returns samples that be sorted by timestamp.
But the client re-sorts samples by Resource ID and Volume.

Changed in python-ceilometerclient:
status: Incomplete → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to python-ceilometerclient (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/54041

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Related fix proposed to branch: master
Review: https://review.openstack.org/54042

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to python-ceilometerclient (master)

Reviewed: https://review.openstack.org/54041
Committed: http://github.com/openstack/python-ceilometerclient/commit/f9be914ee4f1bec06f9dd604071b3d51b5d3d6e7
Submitter: Jenkins
Branch: master

commit f9be914ee4f1bec06f9dd604071b3d51b5d3d6e7
Author: fujioka yuuichi <email address hidden>
Date: Mon Oct 28 08:43:58 2013 +0900

    update oslo libraries

    Change-Id: I7eb0adfbb6bc86157c3e3b969c00099dd8cfe315
    Related-Bug: #1227495

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/54042
Committed: http://github.com/openstack/python-ceilometerclient/commit/46f12ab64b992efa2e0c42e4cefb643abdf2cd74
Submitter: Jenkins
Branch: master

commit 46f12ab64b992efa2e0c42e4cefb643abdf2cd74
Author: fujioka yuuichi <email address hidden>
Date: Mon Oct 28 08:55:39 2013 +0900

    add cliutils from oslo-incubator

    Change-Id: I3122b62ebf87354340e971f7cb58f67045fbcfef
    Related-Bug: #1227495

Changed in python-ceilometerclient:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-ceilometerclient (master)

Reviewed: https://review.openstack.org/47331
Committed: http://github.com/openstack/python-ceilometerclient/commit/1b0f94f20580a55bea52ba468bdeeca3dd4552bd
Submitter: Jenkins
Branch: master

commit 1b0f94f20580a55bea52ba468bdeeca3dd4552bd
Author: fujioka yuuichi <email address hidden>
Date: Mon Oct 28 09:05:57 2013 +0900

    Fix order of sample list

    Samples of "ceilometer sample-list" are sorted by Resource ID and
    Volume.
    Expected order is Timestamp.

    This pache fixes this problem.

    Change-Id: I338014e5868b2176a3afd549e13d0dd6118b3ac1
    Closes-Bug: #1227495

Changed in python-ceilometerclient:
milestone: none → 1.3.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.