Bug 975388 - Only the non-ended usages is shown if running oo-admin-usage with option --start/--end
Summary: Only the non-ended usages is shown if running oo-admin-usage with option --s...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Ravi Sankar
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-18 10:37 UTC by Liang Xia
Modified: 2015-05-15 00:18 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-06-24 14:57:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Liang Xia 2013-06-18 10:37:06 UTC
Description of problem:
Actions of the same usage type(eg, adding storage) will only show once when using oo-admin-usage with option start/end. 

Version-Release number of selected component (if applicable):
devenv_3373
rhc 1.10.2

How reproducible:
always

Steps to Reproduce:
1.create an app and add storage to it.
2.add storage to it again serveral minutes later.
3.add storage to it again serveral minutes later.
4.run oo-admin-usage with login only.
5.run oo-admin-usage with login and start/end time.

Actual results:
"Usage Type: ADDTL_FS_GB (n)" shown three times(#14,#15,#16) when run oo-admin-usage with option login only.
Only usage that's still not ended will be shown (#6) when run oo-admin-usage with option login and start/end time.

Expected results:
oo-admin-usage with option start/end time should show all the usage result to the specified time. In this case, content of #14,#15,#16 should be showed when run oo-admin-usage with option login and start/end time.

Additional info:
<===option with login only===> 
# oo-admin-usage -l lxia 

Usage for lxia (Plan: silver)
------------------------------------------
#1
 Usage Type: GEAR_USAGE (small)
    Gear ID: 51bfc9a3f910f7f848000007 (jbosseap)
   Duration: 20 minutes and 4 seconds (2013-06-17 22:44:56 - 2013-06-17 23:05:01)
Cost (Est.): $0.01 ($0.04/hour)

#2
 Usage Type: GEAR_USAGE (small)
    Gear ID: 51bfcaf9f910f7f84800002b (jbosseap)
   Duration: 14 minutes and 23 seconds (2013-06-17 22:50:37 - 2013-06-17 23:05:01)
Cost (Est.): $0.01 ($0.04/hour)

#3
 Usage Type: PREMIUM_CART (jbosseap-6.0)
    Gear ID: 51bfc9a3f910f7f848000007 (jbosseap)
   Duration: 20 minutes and 9 seconds (2013-06-17 22:44:51 - 2013-06-17 23:05:01)
Cost (Est.): $0.01 ($0.03/hour)

#4
 Usage Type: PREMIUM_CART (jbosseap-6.0)
    Gear ID: 51bfcaf9f910f7f84800002b (jbosseap)
   Duration: 14 minutes and 4 seconds (2013-06-17 22:50:56 - 2013-06-17 23:05:01)
Cost (Est.): $0.01 ($0.03/hour)

#5
 Usage Type: GEAR_USAGE (small)
    Gear ID: 51bfcc18f910f7f84800003f (jbosseap)
   Duration: 9 minutes and 36 seconds (2013-06-17 22:55:24 - 2013-06-17 23:05:01)
Cost (Est.): $0.01 ($0.04/hour)

#6
 Usage Type: GEAR_USAGE (small)
    Gear ID: 51bfd5d2f910f7f848000088 (jbosseap6)
   Duration: 2 minutes and 16 seconds (2013-06-17 23:36:54 - 2013-06-17 23:39:11)
Cost (Est.): $0.00 ($0.04/hour)

#7
 Usage Type: PREMIUM_CART (jbosseap-6.0)
    Gear ID: 51bfd5d2f910f7f848000088 (jbosseap6)
   Duration: 2 minutes and 20 seconds (2013-06-17 23:36:50 - 2013-06-17 23:39:11)
Cost (Est.): $0.00 ($0.03/hour)

#8
 Usage Type: PREMIUM_CART (jbosseap-6.0)
    Gear ID: 51bfd67bf910f7f8480000bc (jbosseap6)
   Duration: 5 hours and 46 minutes (2013-06-17 23:39:40 - PRESENT)
Cost (Est.): $0.17 ($0.03/hour)

#9
 Usage Type: GEAR_USAGE (small)
    Gear ID: 51bfd67bf910f7f8480000bc (jbosseap6)
   Duration: 5 hours and 46 minutes (2013-06-17 23:39:43 - PRESENT)
Cost (Est.): $0.23 ($0.04/hour)

#10
 Usage Type: GEAR_USAGE (small)
    Gear ID: 51bfedbaf910f7f8480000ea (jbossas)
   Duration: 4 hours and 7 minutes (2013-06-18 01:18:54 - PRESENT)
Cost (Est.): $0.17 ($0.04/hour)

#11
 Usage Type: GEAR_USAGE (small)
    Gear ID: 51bfedfff910f7f8480000ff (php)
   Duration: 4 hours and 6 minutes (2013-06-18 01:20:06 - PRESENT)
Cost (Est.): $0.16 ($0.04/hour)

#12
 Usage Type: ADDTL_FS_GB (10)
    Gear ID: 51bfedfff910f7f8480000ff (php)
   Duration: 8 minutes and 39 seconds (2013-06-18 02:40:37 - 2013-06-18 02:49:16)
Cost (Est.): $0.00 ($0.0/month)

#13
 Usage Type: GEAR_USAGE (medium)
    Gear ID: 51c00471f910f79b8700000d (ruby)
   Duration: 2 hours and 30 minutes (2013-06-18 02:55:49 - PRESENT)
Cost (Est.): $0.25 ($0.1/hour)

#14
 Usage Type: ADDTL_FS_GB (1)
    Gear ID: 51c00471f910f79b8700000d (ruby)
   Duration: 7 minutes and 19 seconds (2013-06-18 02:58:04 - 2013-06-18 03:05:24)
Cost (Est.): $0.00 ($0.0/month)

#15
 Usage Type: ADDTL_FS_GB (2)
    Gear ID: 51c00471f910f79b8700000d (ruby)
   Duration: 4 minutes and 18 seconds (2013-06-18 03:05:24 - 2013-06-18 03:09:43)
Cost (Est.): $0.00 ($0.0/month)

#16
 Usage Type: ADDTL_FS_GB (6)
    Gear ID: 51c00471f910f79b8700000d (ruby)
   Duration: 2 hours and 16 minutes (2013-06-18 03:09:43 - PRESENT)
Cost (Est.): $0.00 ($0.0/month)

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.
<===option with login only===> 

<===option with login and start/end time===> 
# oo-admin-usage -l lxia --start 2013-6-18

Usage for lxia (Plan: silver)
------------------------------------------
#1
 Usage Type: PREMIUM_CART (jbosseap-6.0)
    Gear ID: 51bfd67bf910f7f8480000bc (jbosseap6)
   Duration: 5 hours and 22 minutes (2013-06-18 00:00:00 - PRESENT)
Cost (Est.): $0.16 ($0.03/hour)

#2
 Usage Type: GEAR_USAGE (small)
    Gear ID: 51bfd67bf910f7f8480000bc (jbosseap6)
   Duration: 5 hours and 22 minutes (2013-06-18 00:00:00 - PRESENT)
Cost (Est.): $0.22 ($0.04/hour)

#3
 Usage Type: GEAR_USAGE (small)
    Gear ID: 51bfedbaf910f7f8480000ea (jbossas)
   Duration: 4 hours and 3 minutes (2013-06-18 01:18:54 - PRESENT)
Cost (Est.): $0.16 ($0.04/hour)

#4
 Usage Type: GEAR_USAGE (small)
    Gear ID: 51bfedfff910f7f8480000ff (php)
   Duration: 4 hours and 2 minutes (2013-06-18 01:20:06 - PRESENT)
Cost (Est.): $0.16 ($0.04/hour)

#5
 Usage Type: GEAR_USAGE (medium)
    Gear ID: 51c00471f910f79b8700000d (ruby)
   Duration: 2 hours and 26 minutes (2013-06-18 02:55:49 - PRESENT)
Cost (Est.): $0.24 ($0.1/hour)

#6
 Usage Type: ADDTL_FS_GB (6)
    Gear ID: 51c00471f910f79b8700000d (ruby)
   Duration: 2 hours and 12 minutes (2013-06-18 03:09:43 - PRESENT)
Cost (Est.): $0.00 ($0.0/month)

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.
<===option with login and start/end time===>

Comment 1 Ravi Sankar 2013-06-19 04:19:58 UTC
Fixed in https://github.com/openshift/origin-server/pull/2895

Comment 2 openshift-github-bot 2013-06-19 05:28:19 UTC
Commits pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/b07e3cb72065a36e4fa4051d7bf92db9f513c2bb
Bug 975388 - oo-admin-usage fixes

https://github.com/openshift/origin-server/commit/68300ff57301851c400ed4fc974718a127fe0b46
Merge pull request #2895 from pravisankar/dev/ravi/bug975388

Merged by openshift-bot

Comment 3 Jianwei Hou 2013-06-19 12:25:22 UTC
Verified on devenv_3384
The deleted app can be displayed as well when oo-admin-usage is used in combination with --start option

[root@ip-10-138-32-14 ~]# oo-admin-usage -l jhou --start 2013-6-19

Usage for jhou (Plan: free)
------------------------------------------
#1
 Usage Type: PREMIUM_CART (jbosseap-6.0)
    Gear ID: 51c19d645a6275f7c300001c (scaleapp)
   Duration: 22 minutes and 36 seconds (2013-06-19 12:00:37 - PRESENT)

#2
 Usage Type: GEAR_USAGE (small)
    Gear ID: 51c19d645a6275f7c300001f (scaleapp)
   Duration: 22 minutes and 28 seconds (2013-06-19 12:00:44 - PRESENT)

#3
 Usage Type: GEAR_USAGE (small)
    Gear ID: 51c19d645a6275f7c300001c (scaleapp)
   Duration: 22 minutes and 24 seconds (2013-06-19 12:00:48 - PRESENT)

#4
 Usage Type: ADDTL_FS_GB (3)
    Gear ID: 51c19d645a6275f7c300001c (scaleapp)
   Duration: 17 minutes and 34 seconds (2013-06-19 12:05:38 - PRESENT)

#5
 Usage Type: GEAR_USAGE (small)
    Gear ID: 51c1a06c5a6275f7c3000059 (py26)
   Duration: 9 minutes and 36 seconds (2013-06-19 12:13:37 - PRESENT)

#6
 Usage Type: ADDTL_FS_GB (3)
    Gear ID: 51c1a06c5a6275f7c3000059 (py26)
   Duration: 9 minutes and 17 seconds (2013-06-19 12:13:55 - PRESENT)

#7
 Usage Type: PREMIUM_CART (jbosseap-6.0)
    Gear ID: 51c1a0fc5a6275f7c3000075 (e1)
   Duration: 7 minutes and 16 seconds (2013-06-19 12:15:56 - PRESENT)

#8
 Usage Type: GEAR_USAGE (small)
    Gear ID: 51c1a0fc5a6275f7c3000075 (e1)
   Duration: 7 minutes and 12 seconds (2013-06-19 12:16:00 - PRESENT)

#9
 Usage Type: ADDTL_FS_GB (5)
    Gear ID: 51c1a0fc5a6275f7c3000075 (e1)
   Duration: 6 minutes and 41 seconds (2013-06-19 12:16:31 - PRESENT)

#10
 Usage Type: GEAR_USAGE (small)
    Gear ID: 51c19bf45a6275f7c3000006 (r19)
   Duration: 23 minutes and 26 seconds (2013-06-19 11:54:33 - 2013-06-19 12:18:00)

#11
 Usage Type: GEAR_USAGE (small)
    Gear ID: 51c1a21e5a6275f7c30000a1 (d1)
   Duration: 1 minutes and 54 seconds (2013-06-19 12:20:50 - 2013-06-19 12:22:44)


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