Description of problem: create a nodejs app disable auto deploy, change something in index and try to deploy with rhc deploy. app can't access after deploy, just show 503 in webpage Version-Release number of selected component (if applicable): devenv_3901 rhc-1.16.0 (build from fork_ami_origin_ui_82_910) How reproducible: Always Steps to Reproduce: 1. Create a nodejs app (nodejs-0.6 or nodejs-0.10) 2. rhc configure-app -a nodejs --no-auto-deploy 3. In local repo, make some change in index and git push 4. Manual deploy the app: # rhc deploy f66c9bc -a nodejs 5. access the app in webpage Actual results: step4, [root@Daphne nodejs]# rhc deploy 1389bf9 -a nodejs Deployment of git ref '1389bf9' in progress for application nodejs ... Stopping NodeJS cartridge Saving away previously installed Node modules Building git ref '1389bf9', commit 1389bf9 Building NodeJS cartridge npm info it worked if it ends with ok npm info using npm.37 npm info using node.20 npm info preinstall OpenShift-Sample-App.0 npm info build /var/lib/openshift/525e41ff36500da027000002/app-deployments/2013-10-16_03-40-27.474/repo npm info linkStuff OpenShift-Sample-App.0 npm info install OpenShift-Sample-App.0 npm info postinstall OpenShift-Sample-App.0 npm info ok Preparing build for deployment Prepared deployment artifacts in /var/lib/openshift/525e41ff36500da027000002/app-deployments/2013-10-16_03-40-27.474 Deployment id is dc6c525a Activating deployment Starting NodeJS cartridge Success step5, app can't be accessed after deploy, show 503 in webpage Expected results: app can be accessed normally after deploy Additional info:
OK, I've reproduced this. The gear has not been restarted after the manual deploy. Logging into the gear and running 'gear restart' works fine.
I believe this is actually an issue with rhc's Ruby SSH implementation. When issuing the deploy command directly to the gear via ssh works fine: `ssh user@host "gear deploy master"` What's happening with rhc is that when the SSH session closes, the nodejs supervisor process is receiving a SIGHUP and terminating, even though the supervisor process is launched with nohup. My suspicion is that something about rhc's ssh handling in ssh_helpers.rb#ssh_ruby is taking down the newly restarted supervisor with it when the process exits. Reassigning to the UI team to investigate the Net::SSH implementation to explain the different in behavior compared to ssh.
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/01a92292cee97c0a424a220265c92b8e1d163cc6 Bug 1019646: Check if specified git ref is valid during deploy
This also happen on jbossews-2.0. The same steps as description.
Ooops. It still needs some work on CLI side.
Fixed in pull request https://github.com/openshift/rhc/pull/487
Commit pushed to master at https://github.com/openshift/rhc https://github.com/openshift/rhc/commit/3ddf7f9dad2622bb39a633c79d8649ba6bc26c7d Fixes Bug 1019646 and Bug 1020473
test on devenv_3921 test ok with nodejs-0.6/nodejs-0.10/jbossews-2.0 app, all apps can be accessed normally after rhc deploy move the bug to verified