nova usage-list does not validate start/end date

Bug #1118910 reported by Behdad Fariba
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned

Bug Description

I am using Folsom.

start date is in the future, Usage from 2014-01-25 to 2013-01-17 -- negative
values for usage is reported:

nova usage-list --start 2014-01-25
Usage from 2014-01-25 to 2013-01-17:
+----------------------------------+-----------+--------------+-----------+---------------+
| Tenant ID | Instances | RAM MB-Hours | CPU Hours |
Disk GB-Hours |
+----------------------------------+-----------+--------------+-----------+---------------+
| 0f815312c8454242a2170da86c9822cb | 4 | -18335326.05 | -35811.18 |
0.00 |
+----------------------------------+-----------+--------------+-----------+---------------+

nova usage-list --start 2013-06-25 --end 2013-01-25
Usage from 2013-06-25 to 2013-01-25:
+----------------------------------+-----------+--------------+-----------+---------------+
| Tenant ID | Instances | RAM MB-Hours | CPU Hours |
Disk GB-Hours |
+----------------------------------+-----------+--------------+-----------+---------------+
| 0f815312c8454242a2170da86c9822cb | 4 | -7816770.15 | -15267.13 |
0.00 |
+----------------------------------+-----------+--------------+-----------+---------------+

Behdad Fariba (behdad-7)
affects: ubuntu → openstack-community
Tom Fifield (fifieldt)
affects: openstack-community → nova
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
assignee: nobody → Davanum Srinivas (DIMS) (dims-v)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/21488
Committed: http://github.com/openstack/nova/commit/23f7ee89ed5b5310b1604c3f745ae62b6969a0f0
Submitter: Jenkins
Branch: master

commit 23f7ee89ed5b5310b1604c3f745ae62b6969a0f0
Author: Davanum Srinivas <email address hidden>
Date: Thu Feb 7 22:42:19 2013 -0500

    Ensure start time is earlier than end time in simple_tenant_usage

    Simple check and respond with a http 400 if the start time is later

    Fixes LP# 1118910

    Change-Id: I95f12abca725f347488e620d8c699f424e53ed23

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-3 → 2013.1
Revision history for this message
Behdad Fariba (behdad-7) wrote :

cloudtest010 21:12:39 ~ $ nova usage-list --start 2013-11-25 --end 2013-12-25
Usage from 2013-11-25 to 2013-12-25:
+----------------------------------+-----------+--------------+-----------+---------------+
| Tenant ID | Instances | RAM MB-Hours | CPU Hours | Disk GB-Hours |
+----------------------------------+-----------+--------------+-----------+---------------+
| 5ce0df3eb2684c529967facc1be30445 | 5 | -4185046.05 | -8173.92 | -81739.18 |
| c5140a6e18354a7ab94713e650ca7e38 | 2 | -1674018.42 | -3269.57 | -32695.67 |
+----------------------------------+-----------+--------------+-----------+---------------+

Revision history for this message
Behdad Fariba (behdad-7) wrote :

Please see the last comment. The following scenario still happening in Havana:

nova usage-list --start 2014-11-25 --end 2014-12-25
Usage from 2014-11-25 to 2014-12-25:
+----------------------------------+---------+--------------+------------+---------------+
| Tenant ID | Servers | RAM MB-Hours | CPU Hours | Disk GB-Hours |
+----------------------------------+---------+--------------+------------+---------------+
| c5140a6e18354a7ab94713e650ca7e38 | 32 | -68800345.00 | -134375.67 | -1343756.74 |
+----------------------------------+---------+--------------+------------+---------------+

Changed in nova:
status: Fix Released → Incomplete
Changed in nova:
assignee: Davanum Srinivas (DIMS) (dims-v) → nobody
Revision history for this message
Sean Dague (sdague) wrote :

Behdad, how did your instance get a start time in the future?

Changed in nova:
status: Incomplete → Invalid
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.