Bug 863973 - Routing error is shown if set quota using rest API
Summary: Routing error is shown if set quota using rest API
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Master
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Ravi Sankar
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-10-08 08:31 UTC by joycezhang
Modified: 2015-05-15 00:52 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-11-06 18:50:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description joycezhang 2012-10-08 08:31:20 UTC
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" 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" 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" 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 12:21:13 UTC
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 16:59:13 UTC
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 07:44:31 UTC
(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 07:54:35 UTC
Reopen this bug on devenv_2317, same error still exist.

Comment 5 joycezhang 2012-10-12 09:35:51 UTC
Move it to ON_QA to verify on devenv_2318.

Comment 6 joycezhang 2012-10-12 09:37:26 UTC
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" 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.