Bug 843824
| Summary: | The error message is unexpected after create an app and add the wrong template to the app | ||
|---|---|---|---|
| Product: | OKD | Reporter: | xjia <xjia> |
| Component: | Pod | Assignee: | Krishna Raman <kraman> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | libra bugs <libra-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 2.x | CC: | mfisher, xjia, xtian |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-08-07 20:42:44 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
1. Create a quickstart template - /tmp/foo.yaml with wrong packages
[root@ip-10-86-205-90 ~]# cat /tmp/foo.yaml
Vendor: unknown
Requires:
- php-xx
Architecture: noarch
Description:
License: unknown
Subscribes:
doc-root:
Required: false
Type: FILESYSTEM:doc-root
Version: 0.0
You have new mail in /var/spool/mail/root
2. Add a template
[root@ip-10-86-205-90 ~]# rhc-admin-ctl-template -c add -n wordpress -d /tmp/foo.yaml -g git://github.com/openshift/wordpress-example.git -t wordpress --cost 1 -m '{"a":"b"}'
Template 56a7ac7173414f0ba83073ef35a31e74 created
3.Create an app and add the template to the app
[root@jasontest test]# curl -k -X POST -H "Accept: application/xml" -H "Content-type: application/json" -d '{name:"myapp1", template: 56a7ac7173414f0ba83073ef35a31e74}' --user zizi:dd https://ec2-23-20-58-243.compute-1.amazonaws.com/broker/rest/domains/zizi/applications
<?xml version="1.0" encoding="UTF-8"?>
<response>
<messages>
<message>
<text>Failed to create application myapp1 due to: Invalid cartridge specified: php-xx</text>
<exit-code>1</exit-code>
<severity>error</severity>
<field nil="true"></field>
</message>
</messages>
<supported-api-versions>
<supported-api-version>1.0</supported-api-version>
<supported-api-version>1.1</supported-api-version>
</supported-api-versions>
<status>unprocessable_entity</status>
<type nil="true"></type>
<version>1.1</version>
<data>
<datum nil="true"></datum>
</data>
</response>
The bug has been fixed.
|
Description of problem: Create a quickstart template /tmp/foo.yaml with wrong packages, then add a wordpress template. When create an app and add the template to the app ,the error message is unexpected. Version-Release number of selected component (if applicable): ON denenv_1916 How reproducible: always Steps to Reproduce: 1.Create a quickstart template - /tmp/foo.yaml with wrong packages --- Vendor: unknown Requires: - php-xx Architecture: noarch Description: License: unknown Subscribes: doc-root: Required: false Type: FILESYSTEM:doc-root Version: 0.0 2.Add a template [root@ip-10-4-87-157 ~]# rhc-admin-ctl-template -c add -n wordpress -d /tmp/foo.yaml -g git://github.com/openshift/wordpress-example.git -t wordpress --cost 1 -m '{"a":"b"}' It will show that: Template 48e582e5b79b43c4a4dbd99d543c8fa4 created 3.Create an app and add the template to the app [root@jason ~]# curl -k -X POST -H "Accept: application/xml" -H "Content-type: application/json" -d '{name:"myapp1", template: 48e582e5b79b43c4a4dbd99d543c8fa4}' --user xuan:dd https://ec2-23-22-110-87.compute-1.amazonaws.com/broker/rest/domains/xuan11/applications Actual results: <h1> NoMethodError in ApplicationsController#create </h1> <pre>You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.reverse</pre> Expected results: <?xml version="1.0" encoding="UTF-8"?> <response> <version>1.0</version> <type nil="true"></type> <messages> <message> <field nil="true"></field> <exit-code nil="true"></exit-code> <severity>error</severity> <text>Failed to create application myapp1 due to:Invalid cartridge specified: php-xx</text> </message> </messages> <status>internal_server_error</status> <data nil="true"></data> </response> Additional info: