Bug 1020840 - Gear binary deploy from gear will hang
Gear binary deploy from gear will hang
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: Andy Goldstein
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-18 07:17 EDT by Qiushui Zhang
Modified: 2015-05-14 19:30 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-29 19:49:11 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)
logs from instance (164.03 KB, application/zip)
2013-10-18 07:17 EDT, Qiushui Zhang
no flags Details

  None (edit)
Description Qiushui Zhang 2013-10-18 07:17:53 EDT
Created attachment 813720 [details]
logs from instance

Description of problem:
On the gear, try to do "binary-deploy". It shows "Beginning binary deployment" and hangs.

Version-Release number of selected component (if applicable):
devenv_3912

How reproducible:
always

Steps to Reproduce:
1. Create an app
rhc app create php1 php-5.3
2. SSH to the app. Create an archive
rhc ssh php1
gear archive-deployment > app-root/data/ab.tar.gz
3. Set auto_deploy to false. Set deployment_type to "binary"
4. Try to use this file for binary-deploy
[php1-qiuzhang.dev.rhcloud.com .env]\> gear binary-deploy ~/app-root/data/ab.tar.gz 


Actual results:
It will hang there.
[php1-qiuzhang.dev.rhcloud.com .env]\> gear binary-deploy ~/app-root/data/ab.tar.gz 
Beginning binary deployment

Expected results:
Binary deploy ends up successfully.

Additional info:
Please refer to the attached log.
Comment 1 Andy Goldstein 2013-10-18 08:27:56 EDT
"gear binary-deploy" currently does the deployment by reading from STDIN. It does not use the filename as a command line argument. Can we close this as notabug?
Comment 2 Qiushui Zhang 2013-10-18 08:39:00 EDT
Won't we implement this in the future? 
I see binary deploy is one of the method for deploy in https://github.com/openshift/openshift-pep/blob/master/openshift-pep-006.md

In current gear, we can see the following information:
[myapp-qiuzhang.dev.rhcloud.com 526128c294e53fc66c0001c8]\> gear --help binary-deploy

  NAME:

    binary-deploy

  DESCRIPTION:

    Deploy a binary artifact

  SYNOPSIS:

    /usr/bin/gear binary-deploy


I'm sorry but I don't think using STDIN is more helpful than using an archive for users.
Comment 3 Andy Goldstein 2013-10-18 08:48:03 EDT
We will support binary deployments via "rhc deploy FILE_OR_URL". We can keep this bug around and if we have time, we'll modify the gear script to support optionally taking in a file as a command line argument.
Comment 4 Jay Johnson 2013-11-04 13:26:49 EST
This support is currently captured in: https://github.com/openshift/origin-server/pull/4078

Should be ready for the status as: ON_QA
Comment 5 Qiushui Zhang 2013-11-05 01:40:15 EST
Tested on both STG and latest devenv_3986. I got the same result as following:

[openshift@dhcp-10-143 tmp]$ rhc app configure -a php1 --no-auto-deploy --keep-deployments 3 --deployment-type binary
Configuring application 'php1' ... done

php1 @ http://php1-qiuzhang.stg.rhcloud.com/ (uuid: 52788d2cdbd93cd899000529)
-----------------------------------------------------------------------------
  Deployment:        manual (use 'rhc deploy')
  Keep Deployments:  3
  Deployment Type:   binary
  Deployment Branch: master

Your application 'php1' is now configured as listed above.

Use 'rhc show-app php1 --configuration' to check your configuration values any time.



SSH to the app,

[php1-qiuzhang.stg.rhcloud.com 52788d2cdbd93cd899000529]\> gear archive-deployment > app-root/data/ab.tar.gz
[php1-qiuzhang.stg.rhcloud.com 52788d2cdbd93cd899000529]\> env |grep -i type
OPENSHIFT_DEPLOYMENT_TYPE=binary
[php1-qiuzhang.stg.rhcloud.com 52788d2cdbd93cd899000529]\> gear binary-deploy ~/app-root/data/ab.tar.gz 
Beginning binary deployment
Stopping gear
Stopping PHP cartridge
[Tue Nov 05 01:22:23 2013] [warn] PassEnv variable SHELL was undefined
[Tue Nov 05 01:22:23 2013] [warn] PassEnv variable USER was undefined
[Tue Nov 05 01:22:23 2013] [warn] PassEnv variable LOGNAME was undefined
Waiting for stop to finish
Creating new deployment directory
Preparing deployment

It will be pending here.

Mark the bug as assigned.
Comment 6 Andy Goldstein 2013-11-05 09:18:20 EST
The PR hasn't been merged yet. I'll switch it back to ON_QA when it has.
Comment 7 Qiushui Zhang 2013-11-07 21:38:44 EST
Tested on STG(devenv_stage_560) and latest devenv_4003.

On STG, I got the following:
[openshift@dhcp-10-143 tmp]$ rhc app configure -a myapp --no-auto-deploy --keep-deployments 3 --deployment-type binary
Configuring application 'myapp' ... done

myapp @ http://myapp-qiuzhang.stg.rhcloud.com/ (uuid: 527c496ddbd93c65da00000f)
-------------------------------------------------------------------------------
  Deployment:        manual (use 'rhc deploy')
  Keep Deployments:  3
  Deployment Type:   binary
  Deployment Branch: master

Your application 'myapp' is now configured as listed above.

Use 'rhc show-app myapp --configuration' to check your configuration values any time.

SSH to the app:
[myapp-qiuzhang.stg.rhcloud.com 527c496ddbd93c65da00000f]\> gear archive-deployment > app-root/data/ab.tar.gz
[myapp-qiuzhang.stg.rhcloud.com 527c496ddbd93c65da00000f]\> env |grep -i type
OPENSHIFT_DEPLOYMENT_TYPE=binary
[myapp-qiuzhang.stg.rhcloud.com 527c496ddbd93c65da00000f]\> gear binary-deploy ~/app-root/data/ab.tar.gz
Beginning binary deployment
Stopping gear
Stopping PHP cartridge
[Thu Nov 07 21:18:05 2013] [warn] PassEnv variable SHELL was undefined
[Thu Nov 07 21:18:05 2013] [warn] PassEnv variable USER was undefined
[Thu Nov 07 21:18:05 2013] [warn] PassEnv variable LOGNAME was undefined
Waiting for stop to finish
Creating new deployment directory
Preparing deployment

It would hang here.


BUT, on devenv_4003:
[php1-qiuzhang.dev.rhcloud.com 527c4da87df7571769000002]\> gear archive-deployment > app-root/data/ab.tar.gz
[php1-qiuzhang.dev.rhcloud.com 527c4da87df7571769000002]\> env |grep -i type
OPENSHIFT_DEPLOYMENT_TYPE=binary
[php1-qiuzhang.dev.rhcloud.com 527c4da87df7571769000002]\> gear binary-deploy ~/app-root/data/ab.tar.gz
Starting deploy for binary artifact
Stopping gear
Stopping PHP cartridge
Waiting for stop to finish
Creating new deployment directory
Preparing deployment
Preparing build for deployment
Deployment id is 12aba24d
Distributing deployment
Distribution status: success
Activating deployment
Starting PHP cartridge
Activation status: success
Deployment status: success

This bug is fixed on latest devenv_4003, but not STG(devenv_stage_560).
So mark the bug as verified.

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