Bug 829452
Summary: | Error when creating an application if git repo doesn't exist | ||||||
---|---|---|---|---|---|---|---|
Product: | OKD | Reporter: | Fotios Lindiakos <fotios> | ||||
Component: | Containers | Assignee: | Rob Millner <rmillner> | ||||
Status: | CLOSED DUPLICATE | QA Contact: | libra bugs <libra-bugs> | ||||
Severity: | low | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 2.x | CC: | jkeck, mfisher, qgong, xtian, yujzhang | ||||
Target Milestone: | --- | Keywords: | Triaged | ||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2013-01-22 19:54:38 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: | |||||||
Attachments: |
|
Description
Fotios Lindiakos
2012-06-06 19:26:23 UTC
An early test should be done to validate the git repo is reachable and valid before any creation starts. Added verification to the remote cloning command to stop and print a helpful error message if the remote clone fails. Crankcase commit 21d8924bd9. Waiting on pull request #123. Moved to pull request #126. Tested this on devenv_1850 with the following steps, it still failed with Node execution failure. 1. Create an template with wrong git url like: #rhc-admin-ctl-template -c add -d /tmp/des.yaml -g git://github.com/openshift/wordpress-example1.git -t testword --cost 1 -m '{"name1":"me"}' return: 4ba9919e4a0440a3a9b1d2c82cef882a 2. Create an app with the template: curl -k -X POST -H "Accept: application/xml" -H "Content-type: application/json" -d '{name:"myapp1", template: 4ba9919e4a0440a3a9b1d2c82cef882a}' --user xtian+t100:xx https://ec2-23-22-75-68.compute-1.amazonaws.com/broker/rest/domains/domainxdev02/applications Error shown in the response of RESTAPI: <severity>error</severity> <field nil="true"></field> <text>Failed to create application myapp1 due to:Node execution failure (invalid exit code from node). If the problem persists please contact Red Hat support.</text> <exit-code>143</exit-code> Error in broker log: DEBUG: server results: Cloning git repository from remote 'git://github.com/openshift/wordpress-example1.git'. DEBUG: server results: fatal: remote error: DEBUG: server results: Repository not found. DEBUG: server results: Initialized empty Git repository in /var/lib/stickshift/1bcb9fd6445b454087ac34db7df2b941/git/myapp1.git/ DEBUG: Cartridge command php-5.3::configure exitcode = 128 Node execution failure (invalid exit code from node). If the problem persists please contact Red Hat support. #<StickShift::NodeException: Node execution failure (invalid exit code from node). If the problem persists please contact Red Hat support.> Ok, I see the problem. The error message is being suppressed both because the calling hook runs with "set -e" to exit on the first error and because the exception in broker isn't designed to bring better information to the surface. Taking this ticket out of being a release blocker. It only affects administrators creating new templates. And we need to work out the changes needed to bring better mcollective error reporting up through the broker. Tested this bug on devenv_2640 today with the following steps: 1.Go to openshift website and login 2.Try to create an application with invalid input of source code field like "asdfasdf" Actual results: Caught server error like "We appear to be having technical difficulties.". The log of site is as following: 2013-01-08 00:43:31.534 [DEBUG] OpenShift API (7153.9ms) post https://localhost:443/broker/rest/domains/aaaa3434/applications.json [ code: 500 ] (pid:4024) 2013-01-08 00:43:31.538 [DEBUG] Server error: : #128: (pid:4024) 2013-01-08 00:43:31.539 [DEBUG] Found errors on the response object: {} (pid:4024) 2013-01-08 00:43:31.628 [ERROR] Unhandled exception reference #aad43ac456900be13ad68bdde7bcd410: Failed. Response code = 500. Response message = Internal Server Error. /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-console-1.3.2/lib/active_resource/persistent_connection.rb:209:in `handle_response' /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-console-1.3.2/lib/active_resource/persistent_connection.rb:172:in `request' /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-console-1.3.2/lib/active_resource/persistent_connection.rb:127:in `block in post' /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-console-1.3.2/lib/active_resource/persistent_connection.rb:275:in `with_auth' /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-console-1.3.2/lib/active_resource/persistent_connection.rb:127:in `post' /opt/rh/ruby193/root/usr/share/gems/gems/activeresource-3.2.8/lib/active_resource/base.rb:1360:in `create' Created attachment 674514 [details]
The broker log
*** This bug has been marked as a duplicate of bug 896364 *** |