Bug 807527 - Error message is not clear when trying to embed cartridges except mysql/jenkins-client to a scalable app
Summary: Error message is not clear when trying to embed cartridges except mysql/jenki...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Pod
Version: 1.x
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Abhishek Gupta
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-28 04:30 UTC by Johnny Liu
Modified: 2012-06-08 17:59 UTC (History)
2 users (show)

Fixed In Version: devenv_1814
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-08 17:59:31 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Johnny Liu 2012-03-28 04:30:17 UTC
Description of problem:
"text" field in error message is not clear when trying to embed cartridges except mysql/jenkins-client to a scalable app.

$ curl -k -X POST -H 'Accept: application/xml' -d cartridge=postgresql-8.4
--user jialiu@redhat.com:xx
https://ec2-50-17-96-240.compute-1.amazonaws.com/broker/rest/domains/jialiu/applications/myapp/cartridges
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>internal_server_error</status>
  <messages>
    <message>
      <text>Failed to add postgresql-8.4 to application myapp. Details : 
</text>
      <field nil="true"></field>
      <exit-code>108</exit-code>
      <severity>error</severity>
    </message>
  </messages>
  <data nil="true"></data>
  <type nil="true"></type>
  <version>1.0</version>
</response>

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

How reproducible:
Always

Steps to Reproduce:
1.
2.
3.
  
Actual results:
error message is not clear:
      <text>Failed to add postgresql-8.4 to application myapp. Details : 
</text>

Expected results:
error message should be:
<text>
Failed to add postgresql-8.4 to application myapp. Details :
postgresql-8.4 cannot be embedded in scalable app 'myapp'. Allowed cartridges:
mysql-5.1, jenkins-client-1.4
Additional info:

Comment 1 Abhishek Gupta 2012-06-04 21:17:08 UTC
Seems like this is already fixed. Tested on the latest devenv.


[root@ip-10-72-79-0 ~]# curl -k -u 'agupta:p' -d 'cartridge=postgresql-8.4' https://localhost/broker/rest/domains/agupta110/applications/app3/cartridges

{"data":null,"version":"1.0","messages":[{"text":"Failed to add postgresql-8.4 to application app3 : postgresql-8.4 cannot be embedded in scalable app 'app3'. Allowed cartridges: mysql-5.1,mongodb-2.0,jenkins-client-1.4","field":null,"severity":"error","exit_code":108}],"supported_api_versions":["1.0"],"type":null,"status":"internal_server_error"}



[root@ip-10-72-79-0 ~]# curl -k -u 'agupta:p' -d 'cartridge=postgresql-8.4' https://localhost/broker/rest/domains/agupta110/applications/app3/cartridges.xml

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <data>
    <datum nil="true"></datum>
  </data>
  <version>1.0</version>
  <messages>
    <message>
      <text>Failed to add postgresql-8.4 to application app3 : postgresql-8.4 cannot be embedded in scalable app 'app3'. Allowed cartridges: mysql-5.1,mongodb-2.0,jenkins-client-1.4</text>
      <field nil="true"></field>
      <severity>error</severity>
      <exit-code>108</exit-code>
    </message>
  </messages>
  <supported-api-versions>
    <supported-api-version>1.0</supported-api-version>
  </supported-api-versions>
  <status>internal_server_error</status>
  <type nil="true"></type>
</response>

Comment 2 Johnny Liu 2012-06-05 05:41:49 UTC
Verified this bug on devenv_1815, and PASS.

$ rhc-ctl-app -a myapp -e add-postgresql-8.4 -p xx
Problem reported from server. Response code was 400.
Re-run with -d for more information.

RESULT:
postgresql-8.4 cannot be embedded in scalable app 'myapp'. Allowed cartridges: mysql-5.1,mongodb-2.0,jenkins-client-1.4


$ curl -k -X POST -H 'Accept: application/xml' -d cartridge=postgresql-8.4 --user jialiu@redhat.com:214214 https://ec2-174-129-67-35.compute-1.amazonaws.com/broker/rest/domains/jialiu/applications/myapp/cartridges
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <version>1.0</version>
  <supported-api-versions>
    <supported-api-version>1.0</supported-api-version>
  </supported-api-versions>
  <messages>
    <message>
      <field nil="true"></field>
      <exit-code>108</exit-code>
      <severity>error</severity>
      <text>Failed to add postgresql-8.4 to application myapp : postgresql-8.4 cannot be embedded in scalable app 'myapp'. Allowed cartridges: mysql-5.1,mongodb-2.0,jenkins-client-1.4</text>
    </message>
  </messages>
  <status>internal_server_error</status>
  <type nil="true"></type>
  <data>
    <datum nil="true"></datum>
  </data>
</response>


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