Bug 1038577 - deployment fails on initial git push
Summary: deployment fails on initial git push
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Jhon Honce
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-05 11:45 UTC by Chris Ryan
Modified: 2015-05-14 23:33 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-05 14:22:30 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Chris Ryan 2013-12-05 11:45:29 UTC
Description of problem:
When doing an initial git push from an empty application, the code will be git pushed correctly, but the deployment will fail.

Version-Release number of selected component (if applicable):
devenv_4099 (ami-f7bf9d9e)

How reproducible:
Always

Steps to Reproduce:
1. Create a scalable app from an empty code repo
rhc create-app foo php-5 -s --from-code="empty"

2. Add a testfile to the repo
touch testfile.php
echo '<?php echo "test."; ?>' > testfile.php

3. Git commit and git push the app
git add . && git commit -m "test." && git push origin master

Actual results:
The git ref is pushed, but the deploy fails:

[master (root-commit) a9f6251] test.
 1 file changed, 1 insertion(+)
 create mode 100644 testfile.php
Counting objects: 3, done.
Writing objects: 100% (3/3), 236 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: Stopping PHP cartridge
remote: Syntax error on line 2 of /var/lib/openshift/52a0647aaed7d464ad000299/php/configuration/etc/conf.d/openshift.conf:
remote: DocumentRoot must be a directory
remote: httpd (no pid file) not running
remote: Syncing git content to other proxy gears
remote: Building git ref 'master', commit a9f6251
remote: Building PHP cartridge
remote: Preparing build for deployment
remote: Deployment id is 798003b8
remote: Activating deployment
remote: HAProxy instance is started
remote: Starting PHP cartridge
remote: Syntax error on line 2 of /var/lib/openshift/52a0647aaed7d464ad000299/php/configuration/etc/conf.d/openshift.conf:
remote: DocumentRoot must be a directory
remote: Result: failure
remote: Activation status: failure
remote: Activation failed for the following gears:
remote: 52a0647aaed7d464ad000299 (Error activating gear: Failed to execute: 'control start' for /var/lib/openshift/52a0647aaed7d464ad000299/php)
remote: Deployment completed with status: failure
remote: postreceive failed
To ssh://52a0647aaed7d464ad000299.rhcloud.com/~/git/p1testb2.git/
 * [new branch]      master -> master


Expected results:
The git ref is pushed and the deploy is successful

Additional info:

Comment 1 Andy Goldstein 2013-12-05 14:22:30 UTC
You need to conform to the format that the PHP cartridge expects. In this case, your repo needs to have php/testfile.php - it can't just be in the root of the repo itself.


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