inconsistent vcpus hours

Bug #1407568 reported by liaonanhai
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Undecided
liaonanhai

Bug Description

When I use nova cmd (nova usage-list),I get the CPU Hours 0.24,but I check the Overview page, the summary data is similar to this:
This Period's VCPU-Hours:0.12.

the nova --debug usage-list:
RESP BODY: {"tenant_usages": [{"total_memory_mb_usage": 62.18994346666666, "total_vcpus_usage": 0.24292946666666665, "start": "2014-12-08T06:25:30.623298", "tenant_id": "59f0edbed9b74743b66d645a11874739", "stop": "2015-01-05T06:25:30.927304", "server_usages": [{"instance_id": "e9412ae7-6809-4308-a9a3-9a1935004a58", "uptime": 428, "started_at": "2015-01-05T06:18:22.000000", "ended_at": null, "memory_mb": 512, "tenant_id": "59f0edbed9b74743b66d645a11874739", "state": "active", "hours": 0.12146473333333332, "vcpus": 2, "flavor": "2C512M", "local_gb": 0, "name": "demo"}], "total_hours": 0.12146473333333332, "total_local_gb_usage": 0.0}]}

Usage from 2014-12-08 to 2015-01-06:
+----------------------------------+---------+--------------+-----------+---------------+
| Tenant ID | Servers | RAM MB-Hours | CPU Hours | Disk GB-Hours |
+----------------------------------+---------+--------------+-----------+---------------+
| 59f0edbed9b74743b66d645a11874739 | 1 | 62.19 | 0.24 | 0.00 |
+----------------------------------+---------+--------------+-----------+---------------+

Maybe the horizon usage summary vcpu-hours get the data from total_hours not from total_vcpus_usage

Revision history for this message
liaonanhai (nanhai-liao) wrote :
liaonanhai (nanhai-liao)
Changed in horizon:
assignee: nobody → liaonanhai (nanhai-liao)
liaonanhai (nanhai-liao)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

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

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

Reviewed: https://review.openstack.org/145402
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=186472f9a52abde32ae7294999100983826f1ed7
Submitter: Jenkins
Branch: master

commit 186472f9a52abde32ae7294999100983826f1ed7
Author: nanhai liao <email address hidden>
Date: Wed Jan 7 12:51:25 2015 +0800

    Fixed the inconsistent VCPU-Hours summary

    This Period's VCPU-Hours" is retrieved from
    usage.summary.vcpu_hours.However, this is not
    the actual total VCPU hours, and usage.summary.vcpus
    should be used instead.

    Change-Id: Ib65ab6048037ed2b4a1e4f510587b02a858f1f4f
    closes-bug:#1407568

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
milestone: none → kilo-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: kilo-2 → 2015.1.0
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.