Bug 807527 - Error message is not clear when trying to embed cartridges except mysql/jenkins-client to a scalable app
Error message is not clear when trying to embed cartridges except mysql/jenki...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Pod (Show other bugs)
1.x
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Abhishek Gupta
libra bugs
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-28 00:30 EDT by Johnny Liu
Modified: 2012-06-08 13:59 EDT (History)
2 users (show)

See Also:
Fixed In Version: devenv_1814
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-08 13:59:31 EDT
Type: ---
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-03-28 00:30:17 EDT
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 17:17:08 EDT
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 01:41:49 EDT
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.