Bug 1019646 - Show 503 after rhc deploy nodejs-0.6 and nodejs-0.10 and jbossews-2.0 app
Show 503 after rhc deploy nodejs-0.6 and nodejs-0.10 and jbossews-2.0 app
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Fabiano Franz
libra bugs
:
Depends On:
Blocks: 1020365
  Show dependency treegraph
 
Reported: 2013-10-16 03:57 EDT by Yan Du
Modified: 2015-05-14 22:25 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-23 22:24:20 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Yan Du 2013-10-16 03:57:43 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):
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@1.1.37
npm info using node@v0.6.20
npm
 info preinstall OpenShift-Sample-App@1.0.0
npm info build
 /var/lib/openshift/525e41ff36500da027000002/app-deployments/2013-10-16_03-40-27.474/repo
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
/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:
Comment 1 Hiro Asari 2013-10-16 15:34:24 EDT
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.
Comment 2 Dan Mace 2013-10-17 14:14:37 EDT
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.
Comment 3 openshift-github-bot 2013-10-17 18:48:24 EDT
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
Comment 4 Liang Xia 2013-10-18 07:52:48 EDT
This also happen on jbossews-2.0. The same steps as description.
Comment 5 Hiro Asari 2013-10-18 10:16:09 EDT
Ooops. It still needs some work on CLI side.
Comment 6 Fabiano Franz 2013-10-18 17:56:33 EDT
Fixed in pull request https://github.com/openshift/rhc/pull/487
Comment 8 Yan Du 2013-10-20 23:04:17 EDT
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

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