Bug 834151 - Improper error if reach gear limit for scale-up
Improper error if reach gear limit for scale-up
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Master (Show other bugs)
2.x
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Ravi Sankar
libra bugs
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-20 23:12 EDT by Rony Gong
Modified: 2015-05-14 20:51 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-07-13 19:43:34 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 Rony Gong 2012-06-20 23:12:37 EDT
Description of problem:


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

How reproducible:
always

Steps to Reproduce:
1.my account gear limits is 3
2.create scalable jboss app and embed mongodb
3.the scale up this app by restapi
4.use another way to scale-up(ssh to the instanc): 
ssh 62053f95e217449bb83508c468038257@qsjboss-qgong2.int.rhcloud.com
haproxy_ctld -u

  
Actual results:
[root@localhost ~]# curl -k -X POST -H 'Accept: application/xml' --user qgong+2@redhat.com:111111 https://int.openshift.redhat.com/broker/rest/domains/qgong2/applications/qsjboss/events -d event=scale-up
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>unprocessable_entity</status>
  <messages>
    <message>
      <severity>error</severity>
      <text>Failed to add event scale-up to application qsjboss due to: Query condition failed to update application 'qsjboss' for 'qgong+2@redhat.com'</text>
      <exit-code>1</exit-code>
      <field nil="true"></field>
    </message>
  </messages>
  <data>
    <datum nil="true"></datum>
  </data>
  <supported-api-versions>
    <supported-api-version>1.0</supported-api-version>
  </supported-api-versions>
  <version>1.0</version>
  <type nil="true"></type>
</response>


for the second way scale-up: always timeout
[qsjboss-qgong2.int.rhcloud.com ~]\> haproxy_ctld -u
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:174:in `transmit': Request Timeout (RestClient::RequestTimeout)
	from /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:60:in `execute'
	from /usr/libexec/stickshift/cartridges/embedded/haproxy-1.4/info/bin/add-gear:46:in `initialize'
	from /usr/libexec/stickshift/cartridges/embedded/haproxy-1.4/info/bin/add-gear:169:in `new'
	from /usr/libexec/stickshift/cartridges/embedded/haproxy-1.4/info/bin/add-gear:169



Expected results:
show gear limits notice


Additional info:
Comment 1 Rony Gong 2012-06-21 06:17:23 EDT
this issue also exist on devenv_1861
Comment 2 Ravi Sankar 2012-07-03 13:24:23 EDT
Fixed in git rev c218b284c4c53a61.
Comment 3 Rony Gong 2012-07-03 22:56:31 EDT
Retest on devenv_1874, parts of errors fixed:
fixed:
[root@localhost qnodejs]# curl -k -H "Accept: application/xml" --user "qgong@redhat.com:xx" https://ec2-107-21-180-244.compute-1.amazonaws.com/broker/rest/domains/qgong5/applications/qs1ruby19/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-versions>
  <data>
    <datum nil="true"></datum>
  </data>
  <messages>
    <message>
      <text>qgong@redhat.com has already reached the gear limit of 3</text>
      <severity>error</severity>
      <exit-code>104</exit-code>
      <field nil="true"></field>
    </message>
  </messages>
  <status>unprocessable_entity</status>
  <type nil="true"></type>
  <version>1.0</version>
</response>


here fixed bad, mabye the limit? need be changed to a number(user_max_gears)
[qs1ruby19-qgong5.dev.rhcloud.com ~]\> haproxy_ctld -u
The add-gear request could not be processed by the broker. Already at the limit?
Comment 4 Rony Gong 2012-07-03 23:03:47 EDT
let bug https://bugzilla.redhat.com/show_bug.cgi?id=835157 to track the haproxy_ctld -u  , so verified this bug.

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