Bug 869951
Summary: | Rest api returns incorrect gear limit when app tries to scale beyond maximum gear range | ||||||
---|---|---|---|---|---|---|---|
Product: | OKD | Reporter: | Jianwei Hou <jhou> | ||||
Component: | Master | Assignee: | Rajat Chopra <rchopra> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | libra bugs <libra-bugs> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 2.x | CC: | rpenta, wsun | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2012-11-06 18:50:32 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Jianwei Hou
2012-10-25 08:24:13 UTC
Fix upshot - The messaging is being changed not to tell the gear limit in number. The new message will look like : <text>Cannot scale up beyond maximum gear limit in app es</text> Fix explanation - What the REST call is returning is the maximum gear limit of the gear_group that the application's framework cartridge belongs to. The total limit is '1' more because of the component that resides in the haproxy group. Now it may be easy to ask that we report the max gear limit as the total of all groups for the framework cartridge, but the reason I would suggest refraining from reporting that is that scale_up today scales the 'web' group and not the 'framework' cartridge. We should not hardcode the return message with framework cartridge's limits, because another cartridge collocating with the 'web' group will confuse the matter. Fix tracker - https://github.com/openshift/origin-server/pull/760 rev#77cba70 Test this bug on devenv_2384, it's not pulled on devenv_2384. Follow this : https://github.com/openshift/origin-server/pull/760 ,change some code,find this bug is fixed.Will verify it after having new devenv. Result: [sunwei@dhcp-8-229 es]$ curl -k -H 'Accept: application/xml' --user wsun:redhat https://ec2-50-17-161-147.compute-1.amazonaws.com/broker/rest/domains/wsundevb26/applications/es/events -X POST -d event=scale-up <?xml version="1.0" encoding="UTF-8"?> <response> <supported-api-versions> <supported-api-version>1.0</supported-api-version> <supported-api-version>1.1</supported-api-version> <supported-api-version>1.2</supported-api-version> </supported-api-versions> <status>unprocessable_entity</status> <version>1.2</version> <data> <datum nil="true"></datum> </data> <type nil="true"></type> <messages> <message> <severity>error</severity> <text>Cannot scale up beyond maximum gear limit in app es.</text> <exit-code>104</exit-code> <field nil="true"></field> </message> </messages> </response> verified on devenv_2385 Steps: 1. Create a scalable app, set scales_from=3/scales_to=4 for this app via rest api 2. Call rest api to scale up this app twice 3. Try to scale up this app beyond maximum gear limit Result: [sunwei@dhcp-8-229 eapscaletest]$ curl -k --user wsun:redhat https://ec2-54-242-145-85.compute-1.amazonaws.com/broker/rest/domains/wsundev26/applications/eapscaletest/events -X POST -d event=scale-up|python -mjson.tool % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 261 0 247 100 14 193 10 0:00:01 0:00:01 --:--:-- 249 { "data": null, "messages": [ { "exit_code": 104, "field": null, "severity": "error", "text": "Cannot scale up beyond maximum gear limit in app eapscaletest." } ], "status": "unprocessable_entity", "supported_api_versions": [ 1.0, 1.1, 1.2 ], "type": null, "version": "1.2" } |