Bug 830644 - The count number method for gears in file libra.rb is wrong
The count number method for gears in file libra.rb is wrong
Status: CLOSED NOTABUG
Product: OpenShift Origin
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Jhon Honce
libra bugs
: Triaged
: 831633 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-11 01:18 EDT by Rony Gong
Modified: 2015-05-14 18:55 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-12 21:33:52 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Rony Gong 2012-06-11 01:18:30 EDT
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 11:44:33 EDT
The double '*' won't count gears with dashes in their name so it fails to report scaled gears.
Comment 2 Jhon Honce 2012-06-12 20:43:40 EDT
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 09:48:41 EDT
*** Bug 831633 has been marked as a duplicate of this bug. ***
Comment 4 Rony Gong 2012-06-14 03:37:24 EDT
> 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.

Note You need to log in before you can comment on or make changes to this bug.