Bug 1006645 - Web cartridge's min gears can grow greater than max gears after enabling HA
Web cartridge's min gears can grow greater than max gears after enabling HA
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Pod (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Abhishek Gupta
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-10 22:39 EDT by Jianwei Hou
Modified: 2015-05-14 20:20 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-19 12:50:46 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jianwei Hou 2013-09-10 22:39:30 EDT
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@redhat.com: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@php1s-jhou.dev.rhcloud.com/~/git/php1s.git/
  SSH:     522fcfaad31d694e3100005a@php1s-jhou.dev.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 00:22:15 EDT
Fixed with https://github.com/openshift/origin-server/pull/3615
Comment 2 Jianwei Hou 2013-09-11 22:14:27 EDT
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@redhat.com: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.