Bug 833697 - Improper error if reach gear limit
Improper error if reach gear limit
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Pod (Show other bugs)
2.x
Unspecified Unspecified
high Severity medium
: ---
: ---
Assigned To: Dan McPherson
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-20 03:17 EDT by Rony Gong
Modified: 2015-05-14 21:58 EDT (History)
2 users (show)

See Also:
Fixed In Version: devenv-stage_219
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-25 14:26:45 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 03:17:44 EDT
Description of problem:


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

How reproducible:
always

Steps to Reproduce:
1.my account's maxgears is 3
2.create scalable app  and create jenkins server
3.embed mongdb/mysql to this scalable app.
  
Actual results:
[root@localhost ~]# rhc-ctl-app -a qsphp -e add-mongodb-2.0 -p 111111

Problem reported from server. Response code was 400.

Re-run with -d for more information.



RESULT:

Query condition failed to update application 'qsphp' for 'qgong+2@redhat.com'


Expected results:
should prompt message like the gears/app is limited.


Additional info:
Comment 1 Rob Millner 2012-06-20 14:07:33 EDT
Broker raises a "Query condition failed to update application" internally and returns code 400.

StickShift::MongoDataStore.put_app specifies a condition for updating the application information that includes:

 "_id" => user_id
 "apps.name" => id, 
 "$where" => "(this.consumed_gears + #{ngears}) <= this.max_gears"

It seems like the filter on gear count effectively returns the same error if the application doesn't exist, if mongodb has a temporary hiccup, and if the user has consumed all their gears.  Would this check be better done higher up?
Comment 2 Dan McPherson 2012-06-20 16:10:42 EDT
Fixed for Web and CLI.
Comment 3 Rony Gong 2012-06-20 22:59:39 EDT
retest on the newest int server(devenv_1860), CLI and Web fixed
[root@localhost ~]# rhc-ctl-app  -a  qsjboss -e add-mysql-5.1
Password: ******

Problem reported from server. Response code was 400.
Re-run with -d for more information.

RESULT:
qgong+2@redhat.com has already reached the gear limit of 3

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