Red Hat Bugzilla – Bug 1019646
Show 503 after rhc deploy nodejs-0.6 and nodejs-0.10 and jbossews-2.0 app
Last modified: 2015-05-14 22:25:44 EDT
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):
rhc-1.16.0 (build from fork_ami_origin_ui_82_910)
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
[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 firstname.lastname@example.org
info preinstall OpenShift-Sample-App@1.0.0
npm info build
npm info linkStuff OpenShift-Sample-App@1.0.0
npm info install OpenShift-Sample-App@1.0.0
npm info postinstall OpenShift-Sample-App@1.0.0
npm info ok Preparing build for deployment
Prepared deployment artifacts in
Deployment id is dc6c525a
Starting NodeJS cartridge
step5, app can't be accessed after deploy, show 503 in webpage
app can be accessed normally after deploy
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
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
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