Bug 869226 - Got error when add cartridge to scalable app or scale it up after setting its min gear size to "16".
Summary: Got error when add cartridge to scalable app or scale it up after setting it...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Master
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Rajat Chopra
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-23 10:27 UTC by Mengjiao Gao
Modified: 2015-05-15 00:52 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-11-06 18:49:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
The error page when add cartridge in step 5. (123.07 KB, image/png)
2012-10-23 10:27 UTC, Mengjiao Gao
no flags Details
error page when add cartridges in step 6. (167.87 KB, image/png)
2012-10-23 10:29 UTC, Mengjiao Gao
no flags Details
The app detail page after step 6. (179.92 KB, image/png)
2012-10-23 10:30 UTC, Mengjiao Gao
no flags Details

Description Mengjiao Gao 2012-10-23 10:27:14 UTC
Created attachment 632017 [details]
The error page when add cartridge in step 5.

Description of problem:
If I created a scalable app, and directely changed its min gear size as 16, I would get error when I tried to add cartridge to it or scaled up it.

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

How reproducible:
always

Steps to Reproduce:
1.Go to website and login.
2.Update the account to MegaShift
3.Created a scalable app used CLI :
   $rhc app create -s -a s490 -t php-5.3 -p redhat -l mgao+dev22 -p redhat
4.Set its minimum gear size as 16.
5.Try to add cartridge to it.
6.Try to add cartridge again.
6.Try to scale up it use REST API:
    curl -k -X POST -H 'Accept: application/xml' -d event=scale-up --user mgao+dev22:redhat https://ec2-107-22-93-180.compute-1.amazonaws.com/broker/rest/domains/do1122/applications/s490/events


Actual results:
Error page in step 5 is shown as attachment #1 [details], and cartridges cannot be added successfully.
In Step 6, the cartridge still cannot added, but the error message said that:"You have reached the maximum allowed gears and cannot create another. You must scale down an application or remove an application or cartridge to continue." as attachment #2 [details] shown.
But I have checked the app detail page, the gear number in this page shown is "2" as attachment #3 [details] shown . 
Error message in step 7 as below:
**********************************************************************
  <messages>
    <message>
      <exit-code>104</exit-code>
      <severity>error</severity>
      <field nil="true"></field>
      <text>mgao+dev22 has a gear limit of 16 and this app requires 13 more gears. Check the 'scales_from' limit of all cartridges of the app?</text>
    </message>
  </messages>
**********************************************************************


Expected results:
The cartridge should added successfully in step 5, and with this operation, the gear number of the app should be "16".

Additional info:
I think we should change a little in the scale your app page.User should not set the min gear size bigger than the app's real gear number.
Or when user set its min gear size bigger than the app's real gear number, the broker should scale up the app automaticly.

Comment 1 Mengjiao Gao 2012-10-23 10:29:08 UTC
Created attachment 632018 [details]
error page when add cartridges in step 6.

Comment 2 Mengjiao Gao 2012-10-23 10:30:02 UTC
Created attachment 632019 [details]
The app detail page after step 6.

Comment 3 Rajat Chopra 2012-10-29 16:53:08 UTC
Fixed with rev#9232307bf7cd12783692552d3aad33ae2c023d84

Comment 4 Rajat Chopra 2012-10-29 16:56:22 UTC
Yes, we want to have the broker scale up the app automatically, but that is not done yet and will be part of some user story in the future.

As of this fix, an appropriate message will guide the user about whats going on with gear additions and limits.

Comment 5 Mengjiao Gao 2012-10-30 06:17:10 UTC
Tested this issue on devenv_2403.
    Firstly, I set a scalable app's min gear size bigger than its available gear number. 
    Then I tried to add cartridge to the app, and I would get error message as this :"You have reached the maximum allowed gears and cannot create another. You must scale down an application or remove an application or cartridge to continue.".
    And when I tried to scale up it with RESTAPI, I will get message as below:
"
  <messages>
    <message>
      <text>rr has a gear limit of 19 and this app requires 3 more gears. Check the 'scales_from' limit of all cartridges of the app?</text>
      <field nil="true"></field>
      <severity>error</severity>
      <exit-code>104</exit-code>
    </message>
  </messages>
"

Since I think this are appropriate messages for user, so  I will put this issue to verified. Looking forward your later improvement to scale up the app automatically, thanks!


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