Bug 863973 - Routing error is shown if set quota using rest API
Routing error is shown if set quota using rest API
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Master (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Ravi Sankar
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-08 04:31 EDT by joycezhang
Modified: 2015-05-14 20:52 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-11-06 13:50:25 EST
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 joycezhang 2012-10-08 04:31:20 EDT
Description of problem:
It's failed to set quota correcty while using rest API, following error is shown:

<h1>Routing Error</h1>
<p><pre>No route matches &quot;/rest/domains/joycedev4/applications/myapp1/gear_groups/deaaf23629c349feaff4cc880dc52255&quot;</pre></p>



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

How reproducible:
always

Steps to Reproduce:
1. Create an app with a megashift account
2. Get the gear_groups info and gears info:
curl -k  -H 'Accept: application/xml' --user "jinzhang+6@redhat.com:redhat" https://ec2-54-242-55-133.compute-1.amazonaws.com/broker/rest/domains/joycedev4/applications/php1/gear_groups/

curl -k  -H 'Accept: application/xml' --user "jinzhang+6@redhat.com:redhat" https://ec2-54-242-55-133.compute-1.amazonaws.com/broker/rest/domains/joycedev4/applications/php1/gear_groups/7f6222b1ccc945999af258b6145261de

3. Set quota for the gear:
curl -k  -X PUT -H 'Accept: application/xml' -d storage=2  --user "jinzhang+6@redhat.com:redhat" https://ec2-54-242-55-133.compute-1.amazonaws.com/broker/rest/domains/joycedev4/applications/php1/gear_groups/7f6222b1ccc945999af258b6145261de

Actual results:
It's failed to set quota and message is shown as below:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>Action Controller: Exception caught</title>
  <style>
    body { background-color: #fff; color: #333; }

    body, p, ol, ul, td {
      font-family: verdana, arial, helvetica, sans-serif;
      font-size:   13px;
      line-height: 18px;
    }

    pre {
      background-color: #eee;
      padding: 10px;
      font-size: 11px;
    }

    a { color: #000; }
    a:visited { color: #666; }
    a:hover { color: #fff; background-color:#000; }
  </style>
</head>
<body>

<h1>Routing Error</h1>
<p><pre>No route matches &quot;/rest/domains/joycedev4/applications/php1/gear_groups/7f6222b1ccc945999af258b6145261de&quot;</pre></p>



</body>
</html>


Expected results:
It can set quota correctly.

Additional info:
Comment 1 Rajat Chopra 2012-10-11 08:21:13 EDT
New design decision here - set quota through gear_groups is also deprecated.
The new method is through cartridges. Decision taken for on-prem release.

new uri : /broker/rest/domains/<id>/applications/<id>/cartridges/<id> -X PUT -d "additional_storage=<value>"
Comment 2 Ravi Sankar 2012-10-11 12:59:13 EDT
There is a bug in the gear_groups cleanup during old to new design transition. I submitted a pull request https://github.com/openshift/origin-server/pull/636, waiting for it to be merged.
Comment 3 Xiaoli Tian 2012-10-12 03:44:31 EDT
(In reply to comment #2)
> There is a bug in the gear_groups cleanup during old to new design
> transition. I submitted a pull request
> https://github.com/openshift/origin-server/pull/636, waiting for it to be
> merged.

Move this to ON_QA, since it has been merged since devenv_2317
Comment 4 Rony Gong 2012-10-12 03:54:35 EDT
Reopen this bug on devenv_2317, same error still exist.
Comment 5 joycezhang 2012-10-12 05:35:51 EDT
Move it to ON_QA to verify on devenv_2318.
Comment 6 joycezhang 2012-10-12 05:37:26 EDT
It's fixed with following new uri on devenv_2318. Additional storage can be added succesfully by this way. Thanks.

 curl -k  -H 'Accept: application/xml' --user "jinzhang+1@redhat.com:redhat" https://ec2-50-19-18-203.compute-1.amazonaws.com/broker/rest/domains/joycedev1/applications/app1/cartridges/jbosseap-6.0  -X PUT -d "additional_storage=2"

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