Bug 995233

Summary: OpenShift::Runtime::Node#get_quota should use oo_spawn instead of systemu
Product: OpenShift Online Reporter: Paul Morie <pmorie>
Component: ContainersAssignee: Jhon Honce <jhonce>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2.xCC: qiuzhang
Target Milestone: ---   
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-29 12:50:13 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 Paul Morie 2013-08-08 19:36:32 UTC
The Node#get_quota method makes a call to quota via systemu instead of oo_spawn.  Instead, we should call quota with oo_spawn and parse the output in ruby instead of a pipe to awk.

Comment 1 openshift-github-bot 2013-08-09 18:04:44 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/2d96281667ca3281655ed5cafade275bc2ec676e
Bug 995233 - Use oo_spawn in place of systemu

* Clean up quota interface to return results as hash

Comment 2 Qiushui Zhang 2013-08-12 08:21:43 UTC
Tested on devenv_3638.

On instance,
[root@ip-10-165-2-6 bin]# oo-get-quota -c 55dc21f2032211e3a94922000aa50206 
Quota information for uuid: 55dc21f2032211e3a94922000aa50206
Filesystem: {:device=>"/dev/xvde2", :blocks_used=>728, :blocks_quota=>0, :blocks_limit=>1048576, :inodes_used=>157, :inodes_quota=>0, :inodes_limit=>40000}
Blocks used: 
Soft limit for blocks: 
Hard limit for blocks: 
Inodes used: 
Soft limit for inodes: 
Hard limit for inodes: 

Within client, 

[walter@dhcp-10-238 tmp]$ rhc app show php1 --gear quota 
Gear                             Cartridges Used Limit
-------------------------------- ---------- ---- -----
55dc21f2032211e3a94922000aa50206 php-5.3    1 MB  1 GB


Both parts work normally. So mark the defect as verified.