Bug 999917

Summary: No quota warning message is given by "rhc port-forward" from command line
Product: OpenShift Online Reporter: Qiushui Zhang <qiuzhang>
Component: ocAssignee: Clayton Coleman <ccoleman>
Status: CLOSED WONTFIX QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: xtian
Target Milestone: ---Keywords: UpcomingRelease
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-22 20:44:28 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 Qiushui Zhang 2013-08-22 11:21:01 UTC
Description of problem:
In command line, "rhc port-forward" a gear whose storage is used more than 90%.
There is not warning message to show the gear quota usage.

Version-Release number of selected component (if applicable):
devenv_3686
rhc-1.13.5

How reproducible:
always

Steps to Reproduce:
1. Create an app, e.g. rhc app create rb ruby-1.9
2. SSH into the app. dd if=/dev/zero of=~/app-root/data/testfile bs=1M count=970
3. In command line, rhc port-forward -a rb -g $gear_uuid

Actual results:

[walter@dhcp-10-238 tmp]$ rhc port-forward -a rb -g 717431137558912856752128
Checking available ports ... done
Forwarding ports ...
Address already in use - bind(2) while forwarding port 8080. Trying local port 8081

To connect to a service running on OpenShift, use the Local address

Service Local               OpenShift
------- -------------- ---- ----------------
httpd   127.0.0.1:8081  =>  127.0.251.1:8080

Press CTRL-C to terminate port forwarding

Expected results:
The quota warning message should be shown.

Additional info:

On the instance, if "tailf /var/log/mcollective.log |grep quota", we can see the warning message in log:

I, [2013-08-22T06:56:15.030356 #1086]  INFO -- : openshift.rb:185:in `execute_parallel_action' execute_parallel_action call - [{:tag=>"", :gear=>"717431137558912856752128", :job=>{:cartridge=>"openshift-origin-node", :action=>"app-state-show", :args=>{"--with-app-uuid"=>"717431137558912856752128", "--with-app-name"=>"rb", "--with-container-uuid"=>"717431137558912856752128", "--with-container-name"=>"rb", "--with-namespace"=>"qiuzhang", "--with-request-id"=>"19bc2aeb3dfa932dc185bbf08c666ac4"}}, :result_stdout=>"started\nCLIENT_MESSAGE: Warning gear 717431137558912856752128 is using 94.81353759765625 of disk quota\n", :result_stderr=>"", :result_exit_code=>0}]

Comment 1 Clayton Coleman 2013-08-22 20:44:28 UTC
This is not actually a bug - RHC does not make a broker call (and hence no mcollective call) when querying for the ports to list.  It calls directly to the gear, and we expect a highly formatted list of results.  It might be nice to see a warning about quota, but it's not required.