Description of problem: If the end user deletes the tmp dir under $OPENSHIFT_REPO_DIR/tmp then an application restart will fail because the command below fails: touch $OPENSHIFT_REPO_DIR/tmp/restart.txt Should check the code in post-deploy as well since it also attempts to touch this file. We shouldn't assume that directory is still there since it is underneath their repo dir. How reproducible: Occurs in PROD when and tries to restart their app. Recreating the tmp dir allows app to be restarted again. Steps to Reproduce: 1. Create a ruby app 2. ssh in and delete app-root/repo/tmp 3. Restart the app Actual results: 500 error with these messages (as reported by site in new relic): Error: Failed to execute: 'control restart' for /var/lib/openshift/<id>/rubyrestarting Ruby carttouch: cannot touch `/var/lib/openshift/<id>/app-root/runtime/repo//tmp/restart.txt': No such file or directory -- Unable to complete the requested operation due to: Failed to correctly execute all parallel operations - ["RestartCompOp"] Expected results: The application should restart.
If tmp isn't there we should fall back to the standard apache restart.
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/8538a1b2dac7ae49bafe671ba89b1be4f13e5131 Bug 1052276 - Check if tmp/ directory exists before ruby restart
Fyi, we are doing the full apache restart anyway. I think the reason why is to pick up environment variables changes (performance/passenv). In that case I think it does not even make a sense to touch the restart.txt.
test ruby-1.8 and ruby-1.9 on devenv_4224, after ssh into app and delete app-root/repo/tmp, app can restart normally. [root@Daphne test]# rhc app restart ruby19 RESULT: ruby19 restarted Move to verified.