Bug 1295850

Summary: [RFE] Ability to determine total disk usage of a gear
Product: OpenShift Online Reporter: Eric Jones <erjones>
Component: ocAssignee: Timothy Williams <tiwillia>
Status: CLOSED WORKSFORME QA Contact: Wei Sun <wsun>
Severity: low Docs Contact:
Priority: unspecified    
Version: 2.xCC: aos-bugs, jokerman, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
OpenShift Online
Last Closed: 2016-04-18 19:36:18 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 Eric Jones 2016-01-05 15:38:01 UTC
- What is the nature and description of the request?
As an admin I need the ability to know how much space is left on each of my gears, ideally across several gears at a time. 

- Why does the customer need this? (List the business requirements here)
Customer is attempting to create some tooling that will allow him to manage their disk quotas and is trying to get a spreadsheet of all the available (used and unused) space on each gear and they need more specific information than what can be provided by common rhc commands. The only way, after discussing with Operations, to currently find out the exact numbers being used by each gear, is to ssh into the gear and run `du -shc *` and to find total usage per gear that command needs to be modified to `du -shc * | grep total | awk '{print $1}'`.

- How would the customer like to achieve this? (List the functional requirements here) 
Create a new rhc command (therefore a command that can be run without sshing into each gear) that provides the accurate total disk usage of each gear. Potentially also include a part that determines the total allotted disk space (so you know how much disk space is left).

- Is there already an existing RFE upstream or in Red Hat Bugzilla?
Not that I could find.

- List any affected packages or componenets.
OpenShift Online
rhc

- Additional Information
Potentially related to [0] as `rhc app-show --gear quota` does yield a different number than `du -shc *`. Sorry if this is considered a duplicate of that Bug, however that bug is also well over a year and a half old.

https://bugzilla.redhat.com/show_bug.cgi?id=1109935

Comment 4 Timothy Williams 2016-01-08 21:34:25 UTC
After review, this bug is low priority with a high amount of work needed for implementation. A new RHC sub-command, new api endpoint, new messaging between broker/node, and new mcollective actions on the node will have to be created. 

Additionally, the storage used by a gear can be obtained on each gear in an application through rhc. There is another bug open, as the reporter mentioned, on the results from rhc not being exact. We will raise the attention on that bug.

Would this rfe be satisfied by resolving the issue with `rhc app-show <app-name> --gear quota`? That command should show current disk usage for all gears within an application.

For now, lowering the priority on this bug.

Comment 8 Timothy Williams 2016-04-18 19:36:18 UTC
Since the customer case attached is closed and we have an easy workaround `rhc app-show <app-name> --gear quota`, closing this WORKSFORME