Bug 1023372

Summary: Met script error when deploy a binary file for app which have git deploy type enabled
Product: OpenShift Online Reporter: zhaozhanqi <zzhao>
Component: ContainersAssignee: Andy Goldstein <agoldste>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: dmcphers, jliggitt, xtian
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-24 03:26:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description zhaozhanqi 2013-10-25 09:52:37 UTC
Description of problem:
Given an type app created. and change the deploy type to git. deploy a binary file for app will meet error.


Version-Release number of selected component (if applicable):
INT(devenv_3942)
devenv_3944

How reproducible:
always

Steps to Reproduce:
1. create one any type app
2. snapshot this app with option --deployment
    rhc snapshot save app2 --deployment
3. deploy app with the file step 2 created
    rhc deploy ./app2.tar.gz -a app

Actual results:

step 3 will show some script error:
rhc deploy ./app2.tar.gz -a app2
Deployment of file '/root/app2.tar.gz' in progress for application app2 ...
/usr/bin/gear:418:in `block (2 levels) in <main>': OPENSHIFT_DEPLOYMENT_TYPE is 'git' - binary deployments are disabled. (UsageException)
	from /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/command.rb:180:in `call'
	from /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/command.rb:180:in `call'
	from /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/command.rb:155:in `run'
	from /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/runner.rb:385:in `run_active_command'
	from /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/runner.rb:62:in `run!'
	from /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/delegates.rb:11:in `run!'
	from /opt/rh/ruby193/root/usr/share/gems/gems/commander-4.0.3/lib/commander/import.rb:10:in `block in <top (required)>'
Error deploying local file. You can try to deploy manually with:
ssh -t 526a1fd7db6aa205060000e3.rhcloud.com 'oo-binary-deploy'
SSH command finished with exit status = 1

Expected results:
should not show the script error

Additional info:

Comment 1 zhaozhanqi 2013-10-25 09:59:44 UTC
rhc version is 1.16.3

Comment 2 Dan McPherson 2013-10-25 18:09:20 UTC
https://github.com/openshift/origin-server/pull/3997

Comment 3 openshift-github-bot 2013-10-25 21:32:55 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/aaf4c493134ed3be4701e48f91c64aecb2033ebd
Use do_command with gear binary-deploy

Use do_command with gear binary-deploy so exceptions are handled in the
same manner as the other commands.

Bug 1023372

Comment 4 zhaozhanqi 2013-10-28 03:12:08 UTC
Tested this bug on devenv_3953, it has been fixed.


 rhc deploy ./zqphp.tar.gz -a zqphp
Deployment of file '/home/zqzhao/code/mv_testing/non_scalable/zqphp/zqphp.tar.gz' in progress for application zqphp ...
Error trying to deploy local file. You can ssh to your application and try to deploy manually with:
oo-binary-deploy
OPENSHIFT_DEPLOYMENT_TYPE is 'git' - binary deployments are disabled.