Bug 830644

Summary: The count number method for gears in file libra.rb is wrong
Product: OKD Reporter: Rony Gong 🔥 <qgong>
Component: ContainersAssignee: Jhon Honce <jhonce>
Status: CLOSED NOTABUG QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: medium    
Version: 2.xCC: jialiu, rmillner
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-13 01:33:52 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 Rony Gong 🔥 2012-06-11 05:18:30 UTC
Description of problem:
in instance, the gears number count is wrong for below method

Facter.add(:git_repos) do
    git_repos_count = Dir.glob("/var/lib/stickshift/*/git/*.git").count
    setcode { git_repos_count }
end

I suggest change it to
Facter.add(:git_repos) do
    git_repos_count = Dir.glob("/var/lib/stickshift/**/git/*.git").count
    setcode { git_repos_count }
end
  

Version-Release number of selected component (if applicable):
devenv_1827

How reproducible:
always


Steps to Reproduce:
1.I create 3 apps 
2.In the file '/etc/libra/resource_limits.conf' change the value 'max_apps' to 3
3.run: facter capacity
  
Actual results:
200

Expected results:
100


Additional info:

Comment 1 Jhon Honce 2012-06-11 15:44:33 UTC
The double '*' won't count gears with dashes in their name so it fails to report scaled gears.

Comment 2 Jhon Honce 2012-06-13 00:43:40 UTC
For testing emulate Production by setting CREATE_APP_SYMLINKS to 0 in stickshift-node.conf before creating any applications.

Capacity then works as expected, assuming apps means gears in this context.

Comment 3 Johnny Liu 2012-06-13 13:48:41 UTC
*** Bug 831633 has been marked as a duplicate of this bug. ***

Comment 4 Rony Gong 🔥 2012-06-14 07:37:24 UTC
> The double '*' won't count gears with dashes in their name so it fails to
> report scaled gears.

why the scalable app uuid name contains dashes "-"? I didn't see the scalable app uuid name contains dashes "-"in my devenv instance.