Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1063249 - Even non-ended usages shown if running oo-admin-usage with option --end specified
Summary: Even non-ended usages shown if running oo-admin-usage with option --end speci...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Ravi Sankar
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-10 11:15 UTC by Wenjing Zheng
Modified: 2015-05-15 00:25 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-26 19:12:08 UTC


Attachments (Terms of Use)

Description Wenjing Zheng 2014-02-10 11:15:09 UTC
Description:
All usages show including ended and non-ended if running oo-admin-usage with option --end.

Version-Release number of selected component (if applicable):
devenv_4352

How reproducible:
always

steps to Reproduce:
1. Create some apps, then delete several
2. Execute oo-admin-usage -l <user> -e <end_data>, like oo-admin-usage -l wzheng@redhat.com -e 2014-02-10

Actual results:
All usages display, including ended and non-end ones, the list is the same after exectuing oo-admin-usage -l wzheng@redhat.com.
The detailed result is as below:
[root@domU-12-31-39-0A-99-EA apps]# oo-admin-usage -lwzheng@redhat.com
Usage for wzheng@redhat.com (Plan: silver)
-------------------
#1
 Usage Type: GEAR_USAGE (small)
    Gear ID: 52ff015d99e03b25cd00009c (py)
   Duration: 4 minutes and 14 seconds (2014-02-15 05:56:25 - PRESENT)
Cost (Est.): $0.00 ($0.02/hour)
#2
 Usage Type: GEAR_USAGE (small)
    Gear ID: 52f8455999e03b25cd00000c (cphp)
   Duration: 5 days and 2 hours (2014-02-10 03:20:14 - 2014-02-15 05:58:27)
Cost (Est.): $2.45 ($0.02/hour)
Note: The cost displayed is based on the usage duration and the usage rate. It does not take into account any unbilled usage by the billing provider.

[root@domU-12-31-39-0A-99-EA apps]# oo-admin-usage -lwzheng@redhat.com -e 2014-02-13
Usage for wzheng@redhat.com (Plan: silver)
-------------------
#1
 Usage Type: GEAR_USAGE (small)
    Gear ID: 52ff015d99e03b25cd00009c (py)
   Duration: 3 minutes and 25 seconds (2014-02-15 05:56:25 - PRESENT)
Cost (Est.): $0.00 ($0.02/hour)
#2
 Usage Type: GEAR_USAGE (small)
    Gear ID: 52f8455999e03b25cd00000c (cphp)
   Duration: 5 days and 2 hours (2014-02-10 03:20:14 - 2014-02-15 05:58:27)
Cost (Est.): $2.45 ($0.02/hour)
Note: The cost displayed is based on the usage duration and the usage rate. It does not take into account any unbilled usage by the billing provider.

Expected results:
It should only list the gear usage till the specified end time.

Additional info:

Comment 1 Ravi Sankar 2014-02-11 01:18:15 UTC
Fixed in https://github.com/openshift/origin-server/pull/4719

Comment 2 openshift-github-bot 2014-02-11 02:45:02 UTC
Commits pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/39c2c69a8957982e9dac3e763b7927be261e7448
Bug 1063249 - Fix end_time in oo-admin-usage

https://github.com/openshift/origin-server/commit/ffb4658669d734f60c06d8a11c2fd908402030f9
Merge pull request #4719 from pravisankar/dev/ravi/bug1063249

Merged by openshift-bot

Comment 3 Wenjing Zheng 2014-02-12 03:01:31 UTC
Verified on devenv_4363.

"--end" tabkes effects by changing end time of non-ended usages to the customized one to display.

[root@domU-12-31-39-06-84-C7 openshift]# oo-admin-usage -l wzheng@redhat.com 

Usage for wzheng@redhat.com (Plan: silver)
-------------------
#1
 Usage Type: GEAR_USAGE (small)
    Gear ID: 52fadab2ca77873f2800001e (jboassas)
   Duration: 35 minutes and 40 seconds (2014-02-12 02:22:45 - PRESENT)
Cost (Est.): $0.01 ($0.02/hour)

[root@domU-12-31-39-06-84-C7 openshift]# oo-admin-usage -l wzheng@redhat.com -e 2014-02-13
start/end time specified is greater than the current time. Defaulting to current time...

Usage for wzheng@redhat.com (Plan: silver)
-------------------
#1
 Usage Type: GEAR_USAGE (small)
    Gear ID: 52fadab2ca77873f2800001e (jboassas)
   Duration: 36 minutes and 5 seconds (2014-02-12 02:22:45 - 2014-02-12 02:58:51)
Cost (Est.): $0.01 ($0.02/hour)


Note You need to log in before you can comment on or make changes to this bug.