Bug 812802 - cannot estimate correct gear consumption for scalable app
Summary: cannot estimate correct gear consumption for scalable app
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Pod
Version: 1.x
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Ravi Sankar
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-16 09:32 UTC by Meng Bo
Modified: 2012-07-13 23:43 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-13 23:43:32 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Meng Bo 2012-04-16 09:32:50 UTC
Description of problem:
estimate the gear consumption of scalable app, will not get the correct gear number.

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

How reproducible:
always

Steps to Reproduce:
1.curl  -k -X GET -H 'Accept: application/xml' --user <user>:<password> -d descriptor="Name: aa\nRequires: \n- php-5.3\nScalable: true\n" https://<instance_ip>/broker/rest/estimates/application
2.
3.
  
Actual results:
there is only one gear can be recognized, php-5.3

Expected results:
it should have two gears in total. php-5.3 and haproxy-1.4


Additional info:

Comment 1 Ravi Sankar 2012-07-04 00:00:08 UTC
'Scalable' param is NOT part of the application descriptor. Current code ONLY estimates non-scalable apps and eventually we want to make this work for scalable apps as well.
Note: Unknown params to application descriptor will be ignored. In this case, 'Scalable' param will be ignored.
Cleanup is done in git rev c5abbc5b853.

Comment 2 Rony Gong 🔥 2012-07-04 02:48:28 UTC
Verified on devenv_1874
non-scalable:
[root@localhost qnodejs]# curl  -k -X GET -H 'Accept: application/xml' --user qgong:xx -d descriptor="Name: q1ruby19dd\nRequires: \n- ruby-1.9\n  \n- mysql-5.1\n" https://ec2-107-21-180-244.compute-1.amazonaws.com/broker/rest/estimates/application
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <supported-api-versions>
    <supported-api-version>1.0</supported-api-version>
  </supported-api-versions>
  <data>
    <gear>
      <components>
        <component>
          <Name>ruby-1.9</Name>
        </component>
        <component>
          <Name>mysql-5.1</Name>
        </component>
      </components>
    </gear>
  </data>
  <messages/>
  <status>ok</status>
  <type>application_estimates</type>
  <version>1.0</version>
</response>



scalable:
[root@localhost qnodejs]# curl  -k -X GET -H 'Accept: application/xml' --user qgong:xx -d descriptor="Name: qs1ruby19\nRequires: \n- ruby-1.9\n \n- mysql-5.1\nScalable: true\n" https://ec2-107-21-180-244.compute-1.amazonaws.com/broker/rest/estimates/application
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <supported-api-versions>
    <supported-api-version>1.0</supported-api-version>
  </supported-api-versions>
  <data>
    <gear>
      <components>
        <component>
          <Name>mysql-5.1</Name>
        </component>
      </components>
    </gear>
    <gear>
      <components>
        <component>
          <Name>ruby-1.9</Name>
        </component>
      </components>
    </gear>
  </data>
  <messages/>
  <status>ok</status>
  <type>application_estimates</type>
  <version>1.0</version>
</response>


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