Bug 849098 - [REST API] unable to set quota to gear_group of sclable app for more than one time
[REST API] unable to set quota to gear_group of sclable app for more than one...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Master (Show other bugs)
2.x
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: Abhishek Gupta
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-17 06:15 EDT by Johnny Liu
Modified: 2015-05-14 20:51 EDT (History)
2 users (show)

See Also:
Fixed In Version: devenv_2022
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-09-17 17:29:49 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 Johnny Liu 2012-08-17 06:15:06 EDT
Description of problem:
When set quota to one gear_group twice, the following error is seen:
$ curl -k -X PUT -H 'Accept: application/xml' --user jialiu@redhat.com:214214 -d storage=2 https://ec2-23-22-81-39.compute-1.amazonaws.com/broker/rest/domains/jialiu/applications/myapp/gear_groups/9326b9c7bfc24a9e9ba9ca4383db7e85/resources
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <version>1.1</version>
  <supported-api-versions>
    <supported-api-version>1.0</supported-api-version>
    <supported-api-version>1.1</supported-api-version>
  </supported-api-versions>
  <type nil="true"></type>
  <messages>
    <message>
      <text>Gear group not found.</text>
      <exit-code>163</exit-code>
      <severity>error</severity>
      <field nil="true"></field>
    </message>
  </messages>
  <status>not_found</status>
  <data>
    <datum nil="true"></datum>
  </data>
</response>


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

How reproducible:
Always

Steps to Reproduce:
1.Create a scable app
2.Set quota to one gear group of this app successfully
$ curl -k -X PUT -H 'Accept: application/xml' --user jialiu@redhat.com:214214 -d storage=2 https://ec2-23-22-81-39.compute-1.amazonaws.com/broker/rest/domains/jialiu/applications/myapp/gear_groups/9326b9c7bfc24a9e9ba9ca4383db7e85/resources
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <version>1.1</version>
  <supported-api-versions>
    <supported-api-version>1.0</supported-api-version>
    <supported-api-version>1.1</supported-api-version>
  </supported-api-versions>
  <type>resources</type>
  <messages/>
  <status>ok</status>
  <data>
    <resources>
      <storage>2</storage>
      <uuid>9326b9c7bfc24a9e9ba9ca4383db7e85</uuid>
    </resources>
  </data>
</response>

3.Set quota one more time


  
Actual results:
"Gear group not found" error is seen.
$ curl -k -X PUT -H 'Accept: application/xml' --user jialiu@redhat.com:214214 -d storage=3 https://ec2-23-22-81-39.compute-1.amazonaws.com/broker/rest/domains/jialiu/applications/myapp/gear_groups/9326b9c7bfc24a9e9ba9ca4383db7e85/resources
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <version>1.1</version>
  <supported-api-versions>
    <supported-api-version>1.0</supported-api-version>
    <supported-api-version>1.1</supported-api-version>
  </supported-api-versions>
  <type nil="true"></type>
  <messages>
    <message>
      <text>Gear group not found.</text>
      <exit-code>163</exit-code>
      <severity>error</severity>
      <field nil="true"></field>
    </message>
  </messages>
  <status>not_found</status>
  <data>
    <datum nil="true"></datum>
  </data>
</response>

Expected results:
Should succeed

Additional info:
For a non-scalable app, set quota for one same geare group more than one time successfully.
Comment 1 Abhishek Gupta 2012-08-17 14:31:21 EDT
https://github.com/openshift/crankcase/pull/399
Comment 2 Johnny Liu 2012-08-19 22:53:07 EDT
Verified this bug with devenv_2029, and PASS.

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