Bug 958992
| Summary: | oo-admin-usage refers to usage costs / rates / billing | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Alex Dellapenta <adellape> |
| Component: | Node | Assignee: | chris alfonso <calfonso> |
| Status: | CLOSED ERRATA | QA Contact: | libra bugs <libra-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 1.2.0 | CC: | bleanhar, calfonso, gpei, hbrock, libra-onpremise-devel, mmasters |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
The output for the oo-admin-usage command included information about a user's plan, regardless of whether plans were enabled for that user (which they are not, by default). This was confusing for users because plans are not currently featured in OpenShift Enterprise. With this fix, the oo-admin-usage command has been updated to ignore reporting plan information if that feature is not enabled for a given user. The oo-admin-usage command man page has also been updated to describe the ENABLE_USAGE_TRACKING_DATASTORE setting in /etc/openshift/broker.conf and include examples for all available options.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-08-05 17:16:09 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Alex Dellapenta
2013-05-02 22:11:01 UTC
For the record, after setting ENABLE_USAGE_TRACKING_DATASTORE="true" in /etc/openshift/broker.conf and adding tracked storage to some apps, I'm getting usage data with this script:
======
[root@broker ~]# oo-admin-usage -l alexd
Usage for alexd (Plan: )
------------------------------------------
#1
Usage Type: GEAR_USAGE (small)
Gear ID: 518bcaa26892dfcb74000001 (MyApp1)
Duration: 1 days and 4 hours (2013-05-09 12:11:23 - PRESENT)
#2
Usage Type: GEAR_USAGE (small)
Gear ID: 518bcb876892dfcb74000017 (MyApp2)
Duration: 1 days and 4 hours (2013-05-09 12:15:10 - PRESENT)
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.
======
The only outstanding weirdness is showing "(Plan: )" after the user name and the "Note:" at the bottom. Looks like the Cost line doesn't show up at all if there's nothing to calculate (versus when there is, as seen in https://tcms.engineering.redhat.com/case/241841/). Could maybe the "(Plan: )" and "Note:" bits be omitted if either Plan is blank or costs aren't displayed, respectively?
Also just for fun, here's the output I'm getting from oo-admin-ctl-usage:
======
[root@broker ~]# oo-admin-ctl-usage --list
Errors/Warnings will be logged to terminal
2013-05-10 16:48:52 -0400 INFO::
---------- STARTED ----------
User: alexd
Gear: 518bcaa26892dfcb74000001, UsageType: GEAR_USAGE, Usage: 2.388422262765278
Gear: 518bcb876892dfcb74000017, UsageType: GEAR_USAGE, Usage: 2.388422262765278
2013-05-10 16:48:52 -0400 INFO::
---------- ENDED, #Errors: 0, #Warnings: 0 ----------
My vote is to fix this post 1.2. The only current issue I see is that "Plan" is confusing. We'll likely have some cosmetic and OSE feature requests for usage monitoring so we can fix it up at that time. Let's add some examples here. People are asking how to use this and we need to improve the documentation. Just to summarize what's needed here: 1. don't show Plan or the Note if the user isn't in a plan 2. add a man page reference for the ENABLE_USAGE_TRACKING_DATASTORE setting in the broker.conf 3. add man page usage examples for other switches https://github.com/openshift/enterprise-server/pull/111 No further examples are needed in the man page since each argument is demonstrated. If you can think of a different example that's needed, please let me know and we can add it. Verify this bug on puddle: 1.2/2013-07-19.1
Checked the man page of oo-admin-usage, "Usage statistics will only be collected if the ENABLE_USAGE_TRACKING_DATASTORE setting in /etc/openshift/broker.conf is set to true." was added to the DESCRIPTION.
When I show user's usage by oo-admin-usage, it doesn't contain Plan anymore:
[root@broker ~]# oo-admin-usage -l jialiu
Usage for jialiu
------------------------------------------
#1
Usage Type: GEAR_USAGE (small)
Gear ID: 51eca8499f13737226000267 (phpapp)
Duration: 5 hours and 33 minutes (2013-07-21 20:34:42 - PRESENT)
#2
Usage Type: GEAR_USAGE (small)
Gear ID: 51ecd1639f1373ae690008cf (ruby19app)
Duration: 2 hours and 37 minutes (2013-07-21 23:30:05 - PRESENT)
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.
"Confusing UI for users." "This was confusing for users [...]." Would users ever have seen the confusing output? oo-admin-usage is a tool for administrators. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-1138.html |