Bug 1124306 - Fixnum to nil comparison exception raised on app scale-down when the app has multiplier set
Summary: Fixnum to nil comparison exception raised on app scale-down when the app has ...
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: 1123353
TreeView+ depends on / blocked
 
Reported: 2014-07-29 08:10 UTC by Jianwei Hou
Modified: 2015-05-15 00:29 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-10 00:49:56 UTC


Attachments (Terms of Use)
development.log (23.52 KB, text/x-log)
2014-07-29 08:10 UTC, Jianwei Hou
no flags Details

Description Jianwei Hou 2014-07-29 08:10:32 UTC
Created attachment 922059 [details]
development.log

Description of problem:
Given a scalable app has multiplier and min_gears set, when scaling down the application, an exception is raised 'Unable to complete the requested operation due to: comparison of Fixnum with nil failed\nReference ID: 4c4136d21460b7355833a0c152b4c3e4'

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

How reproducible:
Always

Steps to Reproduce:
1. Create a scalable application, set min gears to 2
rhc create-app php5s php-5.3 -s
rhc cartridge-scale -c php-5.3 -a php5s --min 2
2. Set multiplier on broker
oo-admin-ctl-app -l jhou@redhat.com -a php5s --cartridge haproxy-1.4 -c set-multiplier --multiplier 1
3. Set min gears to 1 so that app can be scaled down
rhc cartridge-scale -c php-5.3 -a php5s --min 1
4. Scale down the app via RESTAPI
curl -s -k -H 'Content-Type: Application/json' --user jhou@redhat.com:xxx https://ec2-54-81-3-234.compute-1.amazonaws.com/broker/rest/domains/jhou/applications/php5s/events -X POST -d '{"event":"scale-down"}' | json_reformat

Actual results:
After step 4:
{
    "api_version": 1.7,
    "data": null,
    "messages": [
        {
            "exit_code": 1,
            "field": null,
            "index": null,
            "severity": "error",
            "text": "Unable to complete the requested operation due to: comparison of Fixnum with nil failed\nReference ID: fd678bcd499e924ad65de65fe109a30e"
        }
    ],
    "status": "internal_server_error",
    "supported_api_versions": [
        1.0,
        1.1,
        1.2,
        1.3,
        1.4,
        1.5,
        1.6,
        1.7
    ],
    "type": null,
    "version": "1.7"
}


Expected results:
Should scale down successfully

Additional info:
development.log attached.

Comment 1 Abhishek Gupta 2014-07-29 19:28:21 UTC
Fixed with --> https://github.com/openshift/origin-server/pull/5669

Comment 2 openshift-github-bot 2014-07-29 22:11:28 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/3b749fec58521344e1977af39fbaefc3bc0b2ddb
Bug 1124306: Handling nil min/max scale values for cartridge

Comment 3 Jianwei Hou 2014-07-30 08:36:43 UTC
Verified on devenv_5028, scaling down is successful, this bug is fixed.


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