Bug 808037 - Scale application could be created successfully while specify parameter 'scale' to illegal value
Scale application could be created successfully while specify parameter 'scal...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Pod (Show other bugs)
2.x
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Lili Nader
libra bugs
: Triaged
: 809277 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-29 08:08 EDT by bzhao
Modified: 2015-05-14 21:49 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-04-13 14:33:59 EDT
Type: ---
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 bzhao 2012-03-29 08:08:28 EDT
Description of problem:
Scale application could be created successfully while not specify parameter 'scale' or specify parameter 'scale' value to illegal value, for example scale=truxxxx

Version-Release number of selected component (if applicable):
rhc-broker-0.89.6-1.el6_2.noarch
rhc-cartridge-haproxy-1.4-0.7.4-1.el6_2.noarch

How reproducible:
Always

Steps to Reproduce:
1. Not specify parameter 'scale' to creating a scale application
# curl -k -H "Accept: application/xml" --user "bzhao2:xx"  https://ec2-107-22-22-164.compute-1.amazonaws.com/broker/rest/domains/bzhao2/applications -X POST -d name=perlScale -d cartridge=perl-5.10
2.specify parameter 'scale' value to Illegal value to creating a scale application
curl -k -H "Accept: application/xml" --user "bzhao2:xx"  https://ec2-107-22-22-164.compute-1.amazonaws.com/broker/rest/domains/bzhao2/applications -X POST -d name=diyScale -d cartridge=perl-5.10 -d scale=truxx

  
Actual results:
In accordance with the above any way, the scale application will be created successfully

Expected results:
It should return "missing parameter 'scale' or the others"

Additional info:
Debug info of haproxy_ctld:
<scale_events.log>

# tailf logs/scale_events.log
D, [2012-03-29T08:05:46.582703 #26308] DEBUG -- : GEAR_INFO - capacity: 0.0% gear_count: 1 sessions: 0 up/remove_thresh: 90.0%/49.9% sec_left_til_remove: 0 gear_remove_thresh: 0/20
D, [2012-03-29T08:05:49.591497 #26308] DEBUG -- : GEAR_INFO - capacity: 0.0% gear_count: 1 sessions: 0 up/remove_thresh: 90.0%/49.9% sec_left_til_remove: 0 gear_remove_thresh: 0/20
D, [2012-03-29T08:05:52.598520 #26308] DEBUG -- : GEAR_INFO - capacity: 0.0% gear_count: 1 sessions: 0 up/remove_thresh: 90.0%/49.9% sec_left_til_remove: 0 gear_remove_thresh: 0/20
D, [2012-03-29T08:05:55.604904 #26308] DEBUG -- : GEAR_INFO - capacity: 0.0% gear_count: 1 sessions: 0 up/remove_thresh: 90.0%/49.9% sec_left_til_remove: 0 gear_remove_thresh: 0/20
D, [2012-03-29T08:05:58.611023 #26308] DEBUG -- : GEAR_INFO - capacity: 0.0% gear_count: 1 sessions: 0 up/remove_thresh: 90.0%/49.9% sec_left_til_remove: 0 gear_remove_thresh: 0/20
D, [2012-03-29T08:06:01.617164 #26308] DEBUG -- : GEAR_INFO - capacity: 0.0% gear_count: 1 sessions: 0 up/remove_thresh: 90.0%/49.9% sec_left_til_remove: 0 gear_remove_thresh: 0/20
D, [2012-03-29T08:06:04.624230 #26308] DEBUG -- : GEAR_INFO - capacity: 0.0% gear_count: 1 sessions: 0 up/remove_thresh: 90.0%/49.9% sec_left_til_remove: 0 gear_remove_thresh: 0/20
D, [2012-03-29T08:06:07.633467 #26308] DEBUG -- : GEAR_INFO - capacity: 0.0% gear_count: 1 sessions: 0 up/remove_thresh: 90.0%/49.9% sec_left_til_remove: 0 gear_remove_thresh: 0/20
D, [2012-03-29T08:06:10.654425 #26308] DEBUG -- : GEAR_INFO - capacity: 0.0% gear_count: 1 sessions: 0 up/remove_thresh: 90.0%/49.9% sec_left_til_remove: 0 gear_remove_thresh: 0/20
D, [2012-03-29T08:06:13.661176 #26308] DEBUG -- : GEAR_INFO - capacity: 0.0% gear_count: 1 sessions: 0 up/remove_thresh: 90.0%/49.9% sec_left_til_remove: 0 gear_remove_thresh: 0/20
D, [2012-03-29T08:06:16.668622 #26308] DEBUG -- : GEAR_INFO - capacity: 0.0% gear_count: 1 sessions: 0 up/remove_thresh: 90.0%/49.9% sec_left_til_remove: 0 gear_remove_thresh: 0/20
D, [2012-03-29T08:06:19.685859 #26308] DEBUG -- : GEAR_INFO - capacity: 0.0% gear_count: 1 sessions: 0 up/remove_thresh: 90.0%/49.9% sec_left_til_remove: 0 gear_remove_thresh: 0/20
D, [2012-03-29T08:06:22.692003 #26308] DEBUG -- : GEAR_INFO - capacity: 0.0% gear_count: 1 sessions: 0 up/remove_thresh: 90.0%/49.9% sec_left_til_remove: 0 gear_remove_thresh: 0/20
D, [2012-03-29T08:06:25.704383 #26308] DEBUG -- : GEAR_INFO - capacity: 0.0% gear_count: 1 sessions: 0 up/remove_thresh: 90.0%/49.9% sec_left_til_remove: 0 gear_remove_thresh: 0/20
Comment 1 Xiaoli Tian 2012-04-04 00:48:37 EDT
*** Bug 809277 has been marked as a duplicate of this bug. ***
Comment 2 bzhao 2012-04-10 04:50:33 EDT
It has still the issue on devenv_1705, i think this parameter 'scale' is used to determine whether you need to creating a scale type of application, if we specified parameter 'scale' to illegal value and the app could also created successfully, So the parameters will not have any significance.
Comment 3 bzhao 2012-04-11 07:10:02 EDT
It will create non scale application when i specified the parameter 'scale' to illegal value, its behavior is correct, but its return values is incorrect..

Part of the return messages are listed below.
<creation-time>2012-04-11T06:59:08-04:00</creation-time>
      <name>phpScaleFalse</name>
      <gear-profile>small</gear-profile>
      <uuid>42210d2201e7423b8e173d1c4384443c</uuid>
      <scalable nil="true"></scalable>

it created a non scale application, so scalable nil's value should be false..
Comment 4 bzhao 2012-04-12 06:31:34 EDT
Passed verification on devenv-stage_166

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