Bug 1006645 - Web cartridge's min gears can grow greater than max gears after enabling HA
Summary: Web cartridge's min gears can grow greater than max gears after enabling HA
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Abhishek Gupta
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-11 02:39 UTC by Jianwei Hou
Modified: 2015-05-15 00:20 UTC (History)
1 user (show)

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


Attachments (Terms of Use)

Description Jianwei Hou 2013-09-11 02:39:30 UTC
Description of problem:
Setting a scalable app's both min and max gears to 1, then enable HA, the min grows to 2, and max remains 1.

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

How reproducible:
Always

Steps to Reproduce:
1. Enable HA in OpenShift config, and grant user with ha capability 
2. Create a scalable php application, set min/max gears to 1
rhc create-app php1s php-5.3 -s
rhc cartridge-scale php-5.3 -a php1s --min 1 --max 1
3. Enable HA
curl -s -k -H 'Content-Type: Application/json' --user jhou:xx https://ec2-54-224-30-93.compute-1.amazonaws.com/broker/rest/domains/jhou/applications//events -X POST -d '{"event":"make-ha"}'

Actual results:
Got response
<snip>
"messages": [
        {
            "exit_code": 0,
            "field": null,
            "severity": "info",
            "text": "Application php1s is now ha"
        }
</snip>

0 % rhc app-show php1s
Please sign in to start a new session to ec2-54-224-30-93.compute-1.amazonaws.com.
Password: 

php1s @ http://php1s-jhou.dev.rhcloud.com/ (uuid: 522fcfaad31d694e3100005a)
---------------------------------------------------------------------------
  Domain:  jhou
  Created: 10:04 AM
  Gears:   2 (defaults to small)
  Git URL: ssh://522fcfaad31d694e3100005a.rhcloud.com/~/git/php1s.git/
  SSH:     522fcfaad31d694e3100005a.rhcloud.com

  php-5.3 (PHP 5.3)
  -----------------
    Scaling: x2 (minimum: 2, maximum: 1) on small gears

  haproxy-1.4 (OpenShift Web Balancer)
  ------------------------------------
    Gears: Located with php-5.3


Expected results:
Should disallow setting ha

Additional info:

Comment 1 Rajat Chopra 2013-09-11 04:22:15 UTC
Fixed with https://github.com/openshift/origin-server/pull/3615

Comment 2 Jianwei Hou 2013-09-12 02:14:27 UTC
Verified on devenv_3776

1. Enable HA in OpenShift config, and grant user with ha capability 
2. Create a scalable php application, set min/max gears to 1
rhc create-app php1s php-5.3 -s
rhc cartridge-scale php-5.3 -a php1s --min 1 --max 1
3. Enable HA
curl -s -k -H 'Content-Type: Application/json' --user openshift+migration1:XXX https://ec2-54-243-9-104.compute-1.amazonaws.com/broker/rest/domains/jhou/applications/php1s/events -X POST -d '{"event":"make-ha"}'

Result:
{
    "api_version": 1.6,
    "data": null,
    "messages": [
        {
            "exit_code": null,
            "field": null,
            "severity": "error",
            "text": "Cannot make the application HA because the web cartridge's max gear limit is '1'"
        }
    ],
    "status": "unprocessable_entity",
    "supported_api_versions": [
        1.0,
        1.1,
        1.2,
        1.3,
        1.4,
        1.5,
        1.6
    ],
    "type": null,
    "version": "1.6"
}


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