Hide Forgot
Description of problem: Version-Release number of selected component (if applicable): devenv_1642 How reproducible: Always Steps to Reproduce: 1. Create a yaml file requiring some no-existing package: e.g: # cat badfoo.yaml Vendor: unknown Requires: - php-5.3 - mysql-5.1 - rhc-aa Architecture: noarch Description: License: unknown Subscribes: doc-root: Required: false Type: FILESYSTEM:doc-root Version: 0.0 2. Add a template # rhc-admin-add-template -n badfoo -d ~/badfoo.yaml -g git://github.com/openshift/wordpress-example1.git -t mytag -c 1 -m '{"a":"b"}' 3. Call REST API to try to create app from quickstart template Actual results: Fail to create app, but the app info is shown in the rhc-domain-info's output, user even can not destroy this app. # curl -k -X POST -H "Accept: application/xml" -H "Content-type: application/json" -d '{name:"myapp1", template: 1cec7d8d758b491c927a78b4efb9eecb}' --user jialiu:xx https://ec2-184-73-110-196.compute-1.amazonaws.com/broker/rest/domains/jialiu/applications <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Action Controller: Exception caught</title> <--snip--> </head> <body> <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.each</pre> <p><code>Rails.root: /var/www/libra/broker</code></p> <--snip--> $ rhc-ctl-app -a myapp1 -c destroy -p xx -b Problem reported from server. Response code was 500. Re-run with -d for more information. RESULT: 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.each Expected results: When app failed to configure, server side should roll back to keep a clean user info. Additional info:
Fixed in 2af7b9d6fcdff0e55deb93dc0d5f40864a2aca71
proper error message shows on devenv_1648, and no application created. <?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 wordpress1 due to:Invalid cartridge specified: rhc-xx</text> </message> </messages> <status>internal_server_error</status> <data nil="true"></data> </response>