Bug 895026 - [fork][model refactor] The consumed gears will be increased incorrectly according to minimum gears set by user even if the app is not scaled-up
Summary: [fork][model refactor] The consumed gears will be increased incorrectly accor...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Rajat Chopra
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-14 10:23 UTC by joycezhang
Modified: 2015-05-15 02:12 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-13 23:46:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
scale event (17.14 KB, text/x-log)
2013-01-15 08:26 UTC, joycezhang
no flags Details

Description joycezhang 2013-01-14 10:23:28 UTC
Description of problem:
If try to set minimum gears with the number larger than 1 for a scalable app, the consumed gears would be increased according to the changes of minimum gears which is not the actual consumed gears.

Version-Release number of selected component (if applicable):
fork_ami_refctr1_404
rhc-1.3.3-1.el6_3.noarch

How reproducible:
always

Steps to Reproduce:
1.Create a scalable app
2.Check the consumed gears by rest api
curl -k -H 'Accept: application/xml' --user jinzhang+3:redhat https://ec2-184-72-175-110.compute-1.amazonaws.com/broker/rest/user
3.Set the minmum gears for this scalable with large number
#rhc cartridge scale ruby-1.9 -a ruby19s --min 3 -l jinzhang+3
4. Repeat step2 to check the consumed gears again.
  
Actual results:
To step2: The consumed gears are 1 by default.
To step4: The consumed gears are changed to 3 according to the changed minimum gears.

Expected results:
To step4: The consumed gears should still be 1 as the app is not scaled-up.

Additional info:

Comment 1 Rajat Chopra 2013-01-15 00:22:48 UTC
Could you check and confirm if the app did not scale-up? The model-refactor code is different in the way that it would cause auto-scaleup to take effect.

Comment 2 joycezhang 2013-01-15 08:25:45 UTC
Here's the details for your reference:

1.Create a scalable app
2.Set the minmum gears for this scalable with large number
#rhc cartridge scale nodejs-0.6 -a myapp1 --min 3 
3.Check app gears:

  app infor via rhc client:

  myapp1 @ http://myapp1-test1.dev.rhcloud.com/ (uuid: 50f4eaf1fa2de2710800006c)
  ==============================================================================
    Created: 5:36 AM
    Git URL: ssh://50f4eaf1fa2de2710800006c.rhcloud.com/~/git/myapp1.git/
    SSH:     50f4eaf1fa2de2710800006c.rhcloud.com

    nodejs-0.6 (Node.js 0.6)
    ========================
      Scaling: x3 (minimum: 3, maximum: available) on small gears

    haproxy-1.4 (HAProxy 1.4)
    =========================
  
   gears infor via rest api:

<gear-group>
      <uuid>50f4eaf1fa2de2710800007f</uuid>
      <name>50f4eaf1fa2de2710800007f</name>
      <gear-profile>small</gear-profile>
      <gears>
        <gear>
          <id>50f4eaf1fa2de2710800006c</id>
          <state>started</state>
        </gear>
        <gear>
          <id>50f5075bfa2de27108000093</id>
          <state>started</state>
        </gear>
        <gear>
          <id>50f5075bfa2de27108000094</id>
          <state>started</state>
        </gear>
      </gears>

Comment 3 joycezhang 2013-01-15 08:26:53 UTC
Created attachment 678670 [details]
scale event

Comment 4 Rajat Chopra 2013-01-15 19:13:39 UTC
So the app has scaled to 3 gears, and consumed gears is showing '3', right?
What is wrong?

Comment 5 joycezhang 2013-01-17 07:03:42 UTC
So it should work as design. Move to Verified for closing is as NOT A BUG. Thanks.


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