Comment 9 for bug 1043999

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/essex)

Reviewed: https://review.openstack.org/12479
Committed: http://github.com/openstack/nova/commit/4ac2dcc36bb4e737e486ef86930c023b403a3f3a
Submitter: Jenkins
Branch: stable/essex

commit 4ac2dcc36bb4e737e486ef86930c023b403a3f3a
Author: RongzeZhu <email address hidden>
Date: Sun Sep 2 18:43:56 2012 +0800

    Fix simple_tenant_usage's handing of future end times

    Fixes bug #1043999

    simple_tenant_usage returns the usage in the range between the supplied
    start and end query parameters. The _hours_for() method calculates the
    number of hours the instance was running in this range, even if the end time
    is in the future.

    By default, python-novaclient requests usage between 4 weeks ago and tomorrow.
    This means we a report which accounts for 24 hours of extra running time for
    each currently running instance. Fix this by clamping the period of the
    returned report at the current time.

    Change-Id: I61c211fd85b729aaeaac6ef24644ee19eb5bb6b0
    (cherry picked from commit 869443f41c8826c9a4de1dcc65c5a5354b623a04)