Bug 830644 - The count number method for gears in file libra.rb is wrong
Summary: The count number method for gears in file libra.rb is wrong
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OKD
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Jhon Honce
QA Contact: libra bugs
URL:
Whiteboard:
: 831633 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-11 05:18 UTC by Rony Gong 🔥
Modified: 2015-05-14 22:55 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-13 01:33:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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.


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