Bug 1004671 - [fork][origin_ui_58] The count of left node is incorrect for suggestions when we have multi districts
[fork][origin_ui_58] The count of left node is incorrect for suggestions when...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Website (Show other bugs)
2.x
All All
medium Severity medium
: ---
: ---
Assigned To: Luke Meyer
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-05 03:52 EDT by zhaozhanqi
Modified: 2015-05-14 21:23 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-19 12:46:28 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 zhaozhanqi 2013-09-05 03:52:15 EDT
Description of problem:
If node_needed > suggest_node_per_distrct,then need to suggestions to add nodes to district, like this suggestion:"Add 4 nodes to district dist1, which according to an active gear percent of 10% has room for 22 more nodes."  here 22 is incorrect, It  should be the count of the left nodes of every district, not district*count - node_exist

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

How reproducible:
always

Steps to Reproduce:
1. create four small districts and add two nodes to one district(dist1)
2. set "GEAR_EXPECTED_ACTIVE_PERCENT=10" and "GEAR_UP_THRESHOLD=1000, small: 1980, large: 750

node_needed=1980/90=22 -2=20
suggest_node_per_district=6000*10/90*100=6

3.login on admin-console

Actual results:
suggestion:"Add 4 nodes to district dist1, which according to an active gear percent of 10% has room for 22 more nodes.

22=district_count*suggest_node_per_district- node_exist=6*4-2=22

Expected results:
suggestion:"Add 4 nodes to district dist1, which according to an active gear percent of 10% has room for 4 more nodes.

suggest_node_per_district-node_exist=6-2=4.

Additional info:
Comment 1 Luke Meyer 2013-09-05 17:47:03 EDT
Awesome catch. You are really paying close attention.

I think that number is meant to be the total that can be created in all districts, so it's being misrepresented. But it needs to be fixed regardless.
Comment 2 Luke Meyer 2013-09-05 18:27:36 EDT
Should be fixed in fork_ami origin_ui_81 #824
Comment 3 zhaozhanqi 2013-09-08 22:16:36 EDT
Tested this bug on fork_ami origin_ui_81_825

Add 3 nodes to district d1, which according to an active gear percent of 5% has room for 3 more nodes.

oo-admin-ctl-district -c add-node -n 'd1' -i <server_identity>
Add 3 nodes to district d2, which according to an active gear percent of 5% has room for 3 more nodes.

oo-admin-ctl-district -c add-node -n 'd2' -i <server_identity>
Comment 4 openshift-github-bot 2013-09-09 16:19:06 EDT
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/2625a6adca69006d1cfd47ca9992a02bc5b5831f
<admin suggestions> fix bug 1004671

https://bugzilla.redhat.com/show_bug.cgi?id=1004671
The count of nodes left is incorrect for suggestions when we have
multiple districts

The total nodes that could be created in all existing districts was
given, rather than how many could be created in a particular district.
Should correctly show per-district space for nodes now.

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