Bug 1004297 - [fork][origin_ui_58] Set GEAR_EXPECTED_ACTIVE_PERCENT to 1 in openshift-origin-admin-console-dev.conf will show unexpected type Capacity::Add::District in admin console.
[fork][origin_ui_58] Set GEAR_EXPECTED_ACTIVE_PERCENT to 1 in openshift-origi...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Website (Show other bugs)
2.x
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Luke Meyer
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-04 07:06 EDT by Liang Xia
Modified: 2015-05-14 21:23 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-19 12:46:26 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 Liang Xia 2013-09-04 07:06:33 EDT
Description of problem:
Set GEAR_EXPECTED_ACTIVE_PERCENT to 1 in openshift-origin-admin-console-dev.conf will show following messages in admin console:
Capacity::Add::District
A suggestion of unexpected type Capacity::Add::District was generated. Only raw details are available.
This may be a suggestion type that is under development. If so, developers should also add a view mapping and partial for this type.

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

How reproducible:
always

Steps to Reproduce:
1.Set GEAR_EXPECTED_ACTIVE_PERCENT to 1 in openshift-origin-admin-console-dev.conf
2.restart rhc-broker
3.check suggestions page in admin console

Actual results:
Capacity::Add::District
A suggestion of unexpected type Capacity::Add::District was generated. Only raw details are available.
This may be a suggestion type that is under development. If so, developers should also add a view mapping and partial for this type.
The suggestion contains the following raw values:
#<Admin::Suggestion::Capacity::Add::District:0x000000051fb3f0
   @active_gear_pct=1,
   @available_gears=40,
   @contents=
    [#<Admin::Suggestion::Capacity::Add::District:0x000000051fb3f0 ...>,
     #<Admin::Suggestion::Capacity::Add::Node:0x000000051fb1e8
      @active_gear_pct=1,
      @available_gears=40,
      @district_name="disctrict44",
      @district_uuid="5226bd193786d4187e000001",
      @gears_needed=160,
      @max_active_gears=40,
      @node_quantity=1,
      @nodes_creatable=3,
      @nodes_needed=4,
      @profile="medium",
      @scope="district",
      @threshold=200>,
     #<Admin::Suggestion::Capacity::Add::Node:0x000000051fb198
      @active_gear_pct=1,
      @available_gears=40,
      @district_name="(NONE)",
      @district_uuid="NONE profile=medium",
      @gears_needed=160,
      @max_active_gears=40,
      @node_quantity=1,
      @nodes_creatable=3,
      @nodes_needed=4,
      @profile="medium",
      @scope="district",
      @threshold=200>],
   @district_nodes_target=2,
   @district_quantity=1,
   @gears_needed=160,
   @max_active_gears=40,
   @node_quantity=2,
   @nodes_creatable=3,
   @nodes_needed=4,
   @nodes_per_district=2,
   @profile="medium",
   @scope="profile",
   @threshold=200>

Expected results:
Proper suggestion show if neccessary.

Additional info:
Also show this suggestion if set GEAR_EXPECTED_ACTIVE_PERCENT to 0 though 0 is not a valid value.
Comment 1 Luke Meyer 2013-09-04 09:43:09 EDT
Should be wrapped in an Admin::Suggestion::Capacity. Good catch, thanks!
Comment 2 Luke Meyer 2013-09-04 14:03:44 EDT
Should be fixed with fork_ami_origin_ui_58_818
Comment 3 zhaozhanqi 2013-09-05 05:35:18 EDT
Tested this bug on fork_ami_origin_ui_81_821, it has been fixed

according to the steps above will show suggestion:
Add capacity for small gear profile
Comment 4 openshift-github-bot 2013-09-09 16:19:01 EDT
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/02e6645c6efb0be988cb8194e05c2cf1b3e32c7d
<admin suggestions> fix bug 1004297

https://bugzilla.redhat.com/show_bug.cgi?id=1004297
unexpected type Capacity::Add::District in admin console

When suggesting the addition of a district, that suggestion accidentally
overwrote the wrapper suggestion; since it's a subclass, the difference
was not noticed immediately.

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