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.
Summary: [fork][origin_ui_58] Set GEAR_EXPECTED_ACTIVE_PERCENT to 1 in openshift-origi...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Website
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Luke Meyer
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-04 11:06 UTC by Liang Xia
Modified: 2015-05-15 01:23 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-19 16:46:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Liang Xia 2013-09-04 11:06:33 UTC
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 13:43:09 UTC
Should be wrapped in an Admin::Suggestion::Capacity. Good catch, thanks!

Comment 2 Luke Meyer 2013-09-04 18:03:44 UTC
Should be fixed with fork_ami_origin_ui_58_818

Comment 3 zhaozhanqi 2013-09-05 09:35:18 UTC
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 20:19:01 UTC
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.