Bug 1023512

Summary: [deploy] 'gear deploy' should not allow git deployments when deployment-type is set to binary
Product: OpenShift Online Reporter: Fabiano Franz <ffranz>
Component: ContainersAssignee: Andy Goldstein <agoldste>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2.xCC: xtian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-30 00:49:35 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 Fabiano Franz 2013-10-25 15:14:45 UTC
Description of problem: 'gear deploy' will allow deploying a git ref even when deployment-type is set to binary.

[foo-foo.dev.rhcloud.com 526a7e1b29856796cf000007]\> gear deploy master
Stopping PHP cartridge
Waiting for stop to finish
Building git ref 'master', commit 3961a72
Building PHP cartridge
Preparing build for deployment
Deployment id is c711eb5c
Activating deployment
Starting PHP cartridge

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

How reproducible: always

Steps to Reproduce:
1. rhc create-app foo php-5 --no-git --no-dns
2. rhc configure-app foo --no-auto-deploy --keep-deployments 5 --deployment-type binary
3. rhc deploy master -a foo

Actual results: git ref 'master' is deployed

Expected results: gracefully error out a message and exit with error code

Additional info:

Comment 1 Andy Goldstein 2013-10-25 18:37:24 UTC
https://github.com/openshift/origin-server/pull/4000

Comment 2 openshift-github-bot 2013-10-25 20:18:20 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/91dcf774a277164975fd029fc94117c1f75ad2c0
Disallow 'gear deploy' if deployment type is binary

Bug 1023512

Comment 3 Qiushui Zhang 2013-10-28 05:24:54 UTC
Tested on devenv_3953.
When deploy type is set to "binary", we will get the following:
[php2-qiuzhang.dev.rhcloud.com 526df3507820b9fed1000067]\> gear deploy master
OPENSHIFT_DEPLOYMENT_TYPE is 'binary' - git-based deployments are disabled.

The only notice is that, we need to re-login to the application after deploy type changed. 

Mark the bug as verified.