Description of problem: Error message: Shell command '/bin/cp -a app-root/runtime/dependencies/. app-deployments/2013-10-09_04-06-33.574/dependencies' returned an error. rc=1 is seen when an app is being pushed. The program takes app-root/runtime/dependencies/ as a directory, which is file Version-Release number of selected component (if applicable): devenv_3874 How reproducible: Always Steps to Reproduce: 1. Create an application, set keep_deployments of the app to 2 rhc create-app p1 php-5.3 2. Change application code, commit and push, app will be deployed and a deploy id will be returned to end user 3. Deploy the app again via rest api, same deploy id is applied to the app curl -s -k -H 'Content-Type: Application/json' --user jhou:x https://ec2-184-72-155-218.compute-1.amazonaws.com/broker/rest/domain/jhou/application/p1/deployments -X POST 4. Change application codes, commit and push again Actual results: After step 4 Compressing objects: 100% (4/4), done. Writing objects: 100% (4/4), 359 bytes | 0 bytes/s, done. Total 4 (delta 2), reused 0 (delta 0) remote: Stopping PHP cartridge remote: [Wed Oct 09 04:06:31 2013] [warn] PassEnv variable SHELL was undefined remote: [Wed Oct 09 04:06:31 2013] [warn] PassEnv variable USER was undefined remote: [Wed Oct 09 04:06:31 2013] [warn] PassEnv variable LOGNAME was undefined remote: Waiting for stop to finish remote: An error occurred executing 'gear postreceive' (exit code: 1) remote: Error message: Shell command '/bin/cp -a app-root/runtime/dependencies/. app-deployments/2013-10-09_04-06-33.574/dependencies' returned an error. rc=1 remote: stdout: remote: stderr: /bin/cp: cannot stat `app-root/runtime/dependencies/.': No such file or directory remote: remote: For more details about the problem, try running the command again with the '--trace' option. To ssh://52550e316948fa0ce8000087.rhcloud.com/~/git/p1.git/ 61dd335..207f1a3 master -> master Further dig in rhcsh, turns out the destination directory failed to be created [p1-jhou.dev.rhcloud.com 52550e316948fa0ce8000087]\> file app-root/runtime/dependencies app-root/runtime/dependencies: broken symbolic link to `../../app-deployments/2013-10-09_04-06-06.771/dependencies' [p1-jhou.dev.rhcloud.com 52550e316948fa0ce8000087]\> ls -l app-deployments/ total 12 drwxr-x---. 5 52550e316948fa0ce8000087 52550e316948fa0ce8000087 4096 Oct 9 04:06 2013-10-09_04-06-13.906 drwxr-x---. 5 52550e316948fa0ce8000087 52550e316948fa0ce8000087 4096 Oct 9 04:06 2013-10-09_04-06-33.574 drwxr-xr-x. 2 52550e316948fa0ce8000087 52550e316948fa0ce8000087 4096 Oct 9 04:06 by-id Expected results: Should be able to push the code and deploy the app successfully. Additional info:
I believe this is fixed by https://github.com/openshift/origin-server/pull/3805
Confirmed this is fixed by https://github.com/openshift/origin-server/pull/3805
Verified on devenv_3880 A new deploy id is generated when no new changes were committed to the app, and this error is not reproduced anymore.