Bug 1056483 - Should return meaningful error message when scale-up/down failed via haproxy_ctld in rhcsh
Summary: Should return meaningful error message when scale-up/down failed via haproxy_...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Image
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Dan McPherson
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-22 09:47 UTC by Meng Bo
Modified: 2015-05-15 00:37 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-26 19:10:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Meng Bo 2014-01-22 09:47:20 UTC
Description of problem:
Scale-up/down app via haproxy_ctld in rhcsh, will not return any exception if the operation failed.

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

How reproducible:
always

Steps to Reproduce:
1.Create scalable app
2.Set the scale_to and scale_from to same value, eg, 2
$ rhc cartridge-scale python -a py33s --min 2 --max 2
3.Try to scale-up/down the app in rhcsh

Actual results:
[py33s-bmengdev.dev.rhcloud.com 52df8bca380ea23b4c000108]\> haproxy_ctld -d
[py33s-bmengdev.dev.rhcloud.com 52df8bca380ea23b4c000108]\> echo $?
0
[py33s-bmengdev.dev.rhcloud.com 52df8bca380ea23b4c000108]\> haproxy_ctld -u
[py33s-bmengdev.dev.rhcloud.com 52df8bca380ea23b4c000108]\> echo $?
0


Expected results:
Should return the error message about the scale-up/down failed due to the gear number limits.

Additional info:

Comment 1 Dan McPherson 2014-01-22 16:14:56 UTC
https://github.com/openshift/origin-server/pull/4553

Comment 2 openshift-github-bot 2014-01-22 17:11:16 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/8dd6002c5578930efce2d19a0fe486f8d309940a
Bug 1056483 - Better error messaging with direct usage of haproxy_ctld

Comment 3 chunchen 2014-01-23 03:08:58 UTC
It's fixed, verified on devenv_4261, please refer to the following results:

1.Create scalable app
rhc app create ceap6s jbosseap-6 -s --no-git
2.Set the scale_to and scale_from to same value, eg, 2
$ rhc cartridge-scale jbosseap-6 -a ceap6s --min 2 --max 2
3.Try to scale-up/down the app in rhcsh

Results:
[ceap6s-cdm.dev.rhcloud.com 52e08575cd9bea0aa7000055]\> haproxy_ctld -u
Cannot add gear because max limit '2' reached.
[ceap6s-cdm.dev.rhcloud.com 52e08575cd9bea0aa7000055]\> echo $?
1
[ceap6s-cdm.dev.rhcloud.com 52e08575cd9bea0aa7000055]\> haproxy_ctld -d
Cannot remove gear because min limit '2' reached.
[ceap6s-cdm.dev.rhcloud.com 52e08575cd9bea0aa7000055]\> echo $?
1


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