Bug 1026275 - Should not prompt "Deployment of git ref" when deploy a non-exist binary artifact
Should not prompt "Deployment of git ref" when deploy a non-exist binary arti...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
2.x
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Fabiano Franz
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-04 05:18 EST by Wei Sun
Modified: 2015-05-14 22:26 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-23 22:28:41 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 Wei Sun 2013-11-04 05:18:11 EST
Description of problem:
Set deployment-type as binary for an application,and try to deploy a non-exist binary artifact ,could not deploy successfully,but there are some incorrect prompt
"Deployment of git ref './py.tar.gz' in progress for application py26 ...

OPENSHIFT_DEPLOYMENT_TYPE is 'binary' - git-based deployments are disabled."

Version-Release number of selected component (if applicable):
rhc 1.16.9
STG(devenv-stage_549)


How reproducible:
Always

Steps to Reproduce:
1.Create an application
2.Disable auto-deploy and configure deployment-type as binary
3.Deploy a non-exist binary artifact 

Actual results:
dhcp-11-73:test OpenShift$ rhc deploy ./py.tar.gz -a py26   
Deployment of git ref './py.tar.gz' in progress for application py26 ...
OPENSHIFT_DEPLOYMENT_TYPE is 'binary' - git-based deployments are disabled.
Error deploying git ref. You can try to deploy manually with:
ssh -t 52775c8f2587c8171100001e@py26-wsunstg.stg.rhcloud.com 'gear deploy ./py.tar.gz'
SSH command finished with exit status = 255
dhcp-11-73:test OpenShift$ rhc deploy ./py.tar.gz -a py26 -d
DEBUG: Using config file /Users/OpenShift/.openshift/express.conf
DEBUG: Git config 'git config --get rhc.app-id' returned ''
DEBUG: Git config 'git config --get rhc.app-name' returned ''
DEBUG: Git config 'git config --get rhc.domain-name' returned ''
DEBUG: Authenticating with RHC::Auth::Token
DEBUG: Connecting to https://stg.openshift.redhat.com/broker/rest/api
DEBUG: Getting all domains
DEBUG: Client supports API versions 1.1, 1.2, 1.3, 1.4, 1.5
DEBUG: Using token authentication
DEBUG: Created new httpclient
DEBUG: Request GET https://stg.openshift.redhat.com/broker/rest/api
DEBUG:    code 200 2515 ms
DEBUG: Server supports API versions 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6
DEBUG:    Using API version 1.5
DEBUG: Client API version 1.5 is not current. Refetching API
DEBUG: Using token authentication
DEBUG: Request GET https://stg.openshift.redhat.com/broker/rest/api
DEBUG:    code 200  314 ms
DEBUG: Using token authentication
DEBUG: Request GET https://stg.openshift.redhat.com/broker/rest/domains
DEBUG:    code 200  409 ms
DEBUG: Using token authentication
DEBUG: Request GET https://stg.openshift.redhat.com/broker/rest/domains/wsunstg/applications/py26
DEBUG:    code 200  412 ms
Deployment of git ref './py.tar.gz' in progress for application py26 ...
DEBUG: Opening Net::SSH connection to py26-wsunstg.stg.rhcloud.com, 52775c8f2587c8171100001e, gear deploy ./py.tar.gz
OPENSHIFT_DEPLOYMENT_TYPE is 'binary' - git-based deployments are disabled.
DEBUG: Terminating ... 
Error deploying git ref. You can try to deploy manually with:
ssh -t 52775c8f2587c8171100001e@py26-wsunstg.stg.rhcloud.com 'gear deploy ./py.tar.gz'
SSH command finished with exit status = 255


Expected results:
Should not prompt "Deployment of git ref"

Additional info:
Comment 1 Fabiano Franz 2013-11-11 10:10:50 EST
Fixed in https://github.com/openshift/rhc/pull/503

From now on rhc will check on the client if the app is configured for binary or git reference deployments and raise an error if the artifact provided is not correct.
Comment 2 openshift-github-bot 2013-11-11 11:25:38 EST
Commit pushed to master at https://github.com/openshift/rhc

https://github.com/openshift/rhc/commit/ef381dddf788dc7016b3ad8f28bf270ad1fe9807
Bug 1026275 - will fail in the client when trying to deploy an artifact incompatible with the app deployment type
Comment 3 Wei Sun 2013-11-11 22:37:23 EST
Verified in devenv_4018 with rhc-1.17.3

Result:
[wsun@dhcp-8-229 test]$ rhc deploy ./pynoexist.tar.gz -a py
The application 'py' is configured for binary deployments but the artifact provided ('./pynoexist.tar.gz') is not
a binary file. Please provide the path to a deployable file on your local filesystem or a url, or configure your
app to deploy from a git reference with 'rhc configure-app py --deployment-type git'.

The artifact provided is not compatible with the app deployment type.

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