Bug 833697 - Improper error if reach gear limit
Summary: Improper error if reach gear limit
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: Dan McPherson
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-20 07:17 UTC by Rony Gong 🔥
Modified: 2015-05-15 01:58 UTC (History)
2 users (show)

Fixed In Version: devenv-stage_219
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-25 18:26:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Rony Gong 🔥 2012-06-20 07:17:44 UTC
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'


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


Additional info:

Comment 1 Rob Millner 2012-06-20 18:07:33 UTC
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 20:10:42 UTC
Fixed for Web and CLI.

Comment 3 Rony Gong 🔥 2012-06-21 02:59:39 UTC
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 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.