Bug 1024741 - Failed to deploy binary file from a URL
Failed to deploy binary file from a URL
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
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-30 06:49 EDT by Wei Sun
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:27:51 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-10-30 06:49:52 EDT
Description of problem:
Create an application ,and set deployment-type as binary,try to deploy binary file from URL,but it failed.

Version-Release number of selected component (if applicable):
rhc 1.16.5
INT(devenv_3965)

How reproducible:
Always

Steps to Reproduce:
1.Create an application
2.Get a binary tar.gz file via `rhc snapshot save $appame --deployment`
3.Put the tar.gz file into a http website, and get the URL of the file
4.Configure app with "--no-auto-deploy --deployment-type binary" option
5.Deploy binary file from URL

Actual results:
openshift@openshift-ubuntu:~/test$ rhc deploy http://phpbinary-wsunpro.rhcloud.com/phpt.tar.gz -a phpx 
Deployment of file 'http://phpbinary-wsunpro.rhcloud.com/phpt.tar.gz' in progress for application phpx ...
Error deploying file from url. You can try to deploy manually with:
ssh -t 5270e06903ef647280000118@phpx-wsunint.int.rhcloud.com 'oo-binary-deploy'
/home/openshift/.rvm/gems/ruby-2.0.0-p247/gems/rhc-1.16.5/lib/rhc/ssh_helpers.rb:243:in `ssh_send_url_ruby': uninitialized constant RHC::SSHHelpers::OpenStruct (NameError)
	from /home/openshift/.rvm/gems/ruby-2.0.0-p247/gems/rhc-1.16.5/lib/rhc/deployment_helpers.rb:63:in `deploy_file_from_url'
	from /home/openshift/.rvm/gems/ruby-2.0.0-p247/gems/rhc-1.16.5/lib/rhc/deployment_helpers.rb:17:in `deploy_artifact'
	from /home/openshift/.rvm/gems/ruby-2.0.0-p247/gems/rhc-1.16.5/lib/rhc/commands/app.rb:385:in `deploy'
	from /home/openshift/.rvm/gems/ruby-2.0.0-p247/gems/rhc-1.16.5/lib/rhc/commands.rb:285:in `execute'
	from /home/openshift/.rvm/gems/ruby-2.0.0-p247/gems/rhc-1.16.5/lib/rhc/commands.rb:276:in `block (3 levels) in to_commander'
	from /home/openshift/.rvm/gems/ruby-2.0.0-p247/gems/commander-4.1.5/lib/commander/command.rb:180:in `call'
	from /home/openshift/.rvm/gems/ruby-2.0.0-p247/gems/commander-4.1.5/lib/commander/command.rb:180:in `call'
	from /home/openshift/.rvm/gems/ruby-2.0.0-p247/gems/commander-4.1.5/lib/commander/command.rb:155:in `run'
	from /home/openshift/.rvm/gems/ruby-2.0.0-p247/gems/commander-4.1.5/lib/commander/runner.rb:400:in `run_active_command'
	from /home/openshift/.rvm/gems/ruby-2.0.0-p247/gems/rhc-1.16.5/lib/rhc/command_runner.rb:73:in `run!'
	from /home/openshift/.rvm/gems/ruby-2.0.0-p247/gems/commander-4.1.5/lib/commander/delegates.rb:7:in `run!'
	from /home/openshift/.rvm/gems/ruby-2.0.0-p247/gems/rhc-1.16.5/lib/rhc/cli.rb:37:in `start'
	from /home/openshift/.rvm/gems/ruby-2.0.0-p247/gems/rhc-1.16.5/bin/rhc:20:in `<top (required)>'
	from /home/openshift/.rvm/gems/ruby-2.0.0-p247/bin/rhc:23:in `load'
	from /home/openshift/.rvm/gems/ruby-2.0.0-p247/bin/rhc:23:in `<main>'
	from /home/openshift/.rvm/gems/ruby-2.0.0-p247/bin/ruby_executable_hooks:15:in `eval'
	from /home/openshift/.rvm/gems/ruby-2.0.0-p247/bin/ruby_executable_hooks:15:in `<main>'


Expected results:
It should work well

Additional info:
Comment 1 Fabiano Franz 2013-10-30 15:20:04 EDT
Fixed in https://github.com/openshift/rhc/pull/495
Comment 3 Wei Sun 2013-10-31 02:21:58 EDT
Check this bug with rhc-1.16.6 ,ruby-1.8/1.9/2.0,still could not deploy binary from URL

Result:
[openshift@dhcp-10-143 ~]$ rhc deploy http://phpbinary-wsunpro.rhcloud.com/phpt.tar.gz -a phpx
Deployment of file 'http://phpbinary-wsunpro.rhcloud.com/phpt.tar.gz' in progress for application phpx ...
Error deploying file from url. You can try to deploy manually with:
ssh -t 5271ea0317c6ada458000005@phpx-wsundev3971.dev.rhcloud.com 'oo-binary-deploy'
/usr/share/ruby/net/protocol.rb:153:in `read_nonblock': Connection reset by peer (Errno::ECONNRESET)
	from /usr/share/ruby/net/protocol.rb:153:in `rbuf_fill'
	from /usr/share/ruby/net/protocol.rb:134:in `readuntil'
	from /usr/share/ruby/net/protocol.rb:144:in `readline'
	from /usr/share/ruby/net/http/response.rb:39:in `read_status_line'
	from /usr/share/ruby/net/http/response.rb:28:in `read_new'
	from /usr/share/ruby/net/http.rb:1406:in `block in transport_request'
	from /usr/share/ruby/net/http.rb:1403:in `catch'
	from /usr/share/ruby/net/http.rb:1403:in `transport_request'
	from /usr/share/ruby/net/http.rb:1376:in `request'
	from /usr/share/ruby/net/http.rb:1278:in `request_get'
	from /usr/local/share/gems/gems/rhc-1.16.6/lib/rhc/ssh_helpers.rb:252:in `block (2 levels) in ssh_send_url_ruby'
	from /usr/share/ruby/net/http.rb:852:in `start'
	from /usr/local/share/gems/gems/rhc-1.16.6/lib/rhc/ssh_helpers.rb:251:in `block in ssh_send_url_ruby'
	from /usr/local/share/gems/gems/rhc-1.16.6/lib/rhc/ssh_helpers.rb:195:in `block (3 levels) in ssh_ruby'
	from /usr/share/gems/gems/net-ssh-2.6.6/lib/net/ssh/connection/channel.rb:607:in `call'
	from /usr/share/gems/gems/net-ssh-2.6.6/lib/net/ssh/connection/channel.rb:607:in `do_success'
	from /usr/share/gems/gems/net-ssh-2.6.6/lib/net/ssh/connection/session.rb:581:in `channel_success'
	from /usr/share/gems/gems/net-ssh-2.6.6/lib/net/ssh/connection/session.rb:456:in `dispatch_incoming_packets'
	from /usr/share/gems/gems/net-ssh-2.6.6/lib/net/ssh/connection/session.rb:213:in `preprocess'
	from /usr/share/gems/gems/net-ssh-2.6.6/lib/net/ssh/connection/session.rb:197:in `process'
	from /usr/share/gems/gems/net-ssh-2.6.6/lib/net/ssh/connection/session.rb:161:in `block in loop'
	from /usr/share/gems/gems/net-ssh-2.6.6/lib/net/ssh/connection/session.rb:161:in `loop'
	from /usr/share/gems/gems/net-ssh-2.6.6/lib/net/ssh/connection/session.rb:161:in `loop'
	from /usr/local/share/gems/gems/rhc-1.16.6/lib/rhc/ssh_helpers.rb:199:in `block in ssh_ruby'
	from /usr/share/gems/gems/net-ssh-2.6.6/lib/net/ssh.rb:193:in `start'
	from /usr/local/share/gems/gems/rhc-1.16.6/lib/rhc/ssh_helpers.rb:172:in `ssh_ruby'
	from /usr/local/share/gems/gems/rhc-1.16.6/lib/rhc/ssh_helpers.rb:245:in `ssh_send_url_ruby'
	from /usr/local/share/gems/gems/rhc-1.16.6/lib/rhc/deployment_helpers.rb:63:in `deploy_file_from_url'
	from /usr/local/share/gems/gems/rhc-1.16.6/lib/rhc/deployment_helpers.rb:17:in `deploy_artifact'
	from /usr/local/share/gems/gems/rhc-1.16.6/lib/rhc/commands/app.rb:385:in `deploy'
	from /usr/local/share/gems/gems/rhc-1.16.6/lib/rhc/commands.rb:285:in `execute'
	from /usr/local/share/gems/gems/rhc-1.16.6/lib/rhc/commands.rb:276:in `block (3 levels) in to_commander'
	from /usr/share/gems/gems/commander-4.1.2/lib/commander/command.rb:180:in `call'
	from /usr/share/gems/gems/commander-4.1.2/lib/commander/command.rb:180:in `call'
	from /usr/share/gems/gems/commander-4.1.2/lib/commander/command.rb:155:in `run'
	from /usr/share/gems/gems/commander-4.1.2/lib/commander/runner.rb:400:in `run_active_command'
	from /usr/local/share/gems/gems/rhc-1.16.6/lib/rhc/command_runner.rb:73:in `run!'
	from /usr/share/gems/gems/commander-4.1.2/lib/commander/delegates.rb:7:in `run!'
	from /usr/local/share/gems/gems/rhc-1.16.6/lib/rhc/cli.rb:37:in `start'
	from /usr/local/share/gems/gems/rhc-1.16.6/bin/rhc:20:in `<top (required)>'
	from /usr/local/bin/rhc:23:in `load'
	from /usr/local/bin/rhc:23:in `<main>'
Comment 4 Fabiano Franz 2013-10-31 12:09:03 EDT
I'm not sure if this is a bug, *may* be related to some proxy issue. Could you please run the command with '-d' and post the debug details here?
Comment 5 Fabiano Franz 2013-10-31 12:57:17 EDT
I also wrote a few adjustments, take a look if it helps:

https://github.com/openshift/rhc/pull/496
Comment 7 Wei Sun 2013-10-31 22:57:20 EDT
Check this bug with rhc-1.16.8,still could not deploy.

[wsun@dhcp-8-229 test]$ rhc deploy http://phpbinary-wsunpro.rhcloud.com/phpt.tar.gz -a phpt -d
DEBUG: Using config file /home/wsun/.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://ec2-54-227-117-86.compute-1.amazonaws.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://ec2-54-227-117-86.compute-1.amazonaws.com/broker/rest/api
DEBUG: SSL Verification failed -- Using self signed cert
DEBUG:    code 200 1182 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://ec2-54-227-117-86.compute-1.amazonaws.com/broker/rest/api
DEBUG:    code 200  316 ms
DEBUG: Using token authentication
DEBUG: Request GET https://ec2-54-227-117-86.compute-1.amazonaws.com/broker/rest/domains
DEBUG:    code 200  305 ms
DEBUG: Using token authentication
DEBUG: Request GET https://ec2-54-227-117-86.compute-1.amazonaws.com/broker/rest/domains/wsunstg546/applications/phpt
DEBUG:    code 200  317 ms
Deployment of file 'http://phpbinary-wsunpro.rhcloud.com/phpt.tar.gz' in progress for application phpt ...
Error deploying file from url. You can try to deploy manually with:
ssh -t 5273146a318d0cea82000007@phpt-wsunstg546.dev.rhcloud.com 'oo-binary-deploy'
/usr/local/share/gems/gems/rhc-1.16.8/lib/rhc/ssh_helpers.rb:242:in `ssh_send_url_ruby': uninitialized constant RHC::SSHHelpers::OpenStruct (NameError)
	from /usr/local/share/gems/gems/rhc-1.16.8/lib/rhc/deployment_helpers.rb:62:in `deploy_file_from_url'
	from /usr/local/share/gems/gems/rhc-1.16.8/lib/rhc/deployment_helpers.rb:16:in `deploy_artifact'
	from /usr/local/share/gems/gems/rhc-1.16.8/lib/rhc/commands/app.rb:385:in `deploy'
	from /usr/local/share/gems/gems/rhc-1.16.8/lib/rhc/commands.rb:285:in `execute'
	from /usr/local/share/gems/gems/rhc-1.16.8/lib/rhc/commands.rb:276:in `block (3 levels) in to_commander'
	from /usr/share/gems/gems/commander-4.1.2/lib/commander/command.rb:180:in `call'
	from /usr/share/gems/gems/commander-4.1.2/lib/commander/command.rb:180:in `call'
	from /usr/share/gems/gems/commander-4.1.2/lib/commander/command.rb:155:in `run'
	from /usr/share/gems/gems/commander-4.1.2/lib/commander/runner.rb:400:in `run_active_command'
	from /usr/local/share/gems/gems/rhc-1.16.8/lib/rhc/command_runner.rb:73:in `run!'
	from /usr/share/gems/gems/commander-4.1.2/lib/commander/delegates.rb:7:in `run!'
	from /usr/local/share/gems/gems/rhc-1.16.8/lib/rhc/cli.rb:37:in `start'
	from /usr/local/share/gems/gems/rhc-1.16.8/bin/rhc:20:in `<top (required)>'
	from /usr/local/bin/rhc:23:in `load'
	from /usr/local/bin/rhc:23:in `<main>'
Comment 8 Wei Sun 2013-11-01 01:55:05 EDT
Check this bug on MTV machine,if use rhc-1.16.6,could deploy binary file from URL successfully.

But if use rhc-1.16.8,could not deploy binary file from URL.
[root@mtv-f17-01 ~]# rhc deploy http://phpbinary-wsunpro.rhcloud.com/phpt.tar.gz -a phpx -d
DEBUG: Using config file /root/.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://ec2-54-227-117-86.compute-1.amazonaws.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://ec2-54-227-117-86.compute-1.amazonaws.com/broker/rest/api
DEBUG: SSL Verification failed -- Using self signed cert
DEBUG:    code 200  706 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://ec2-54-227-117-86.compute-1.amazonaws.com/broker/rest/api
DEBUG:    code 200  142 ms
DEBUG: Using token authentication
DEBUG: Request GET https://ec2-54-227-117-86.compute-1.amazonaws.com/broker/rest/domains
DEBUG:    code 200  147 ms
DEBUG: Using token authentication
DEBUG: Request GET https://ec2-54-227-117-86.compute-1.amazonaws.com/broker/rest/domains/wsunstg546/applications/phpx
DEBUG:    code 200  242 ms
Deployment of file 'http://phpbinary-wsunpro.rhcloud.com/phpt.tar.gz' in progress for application phpx ...
Error deploying file from url. You can try to deploy manually with:
ssh -t 52733ad7318d0c36a1000614@phpx-wsunstg546.dev.rhcloud.com 'oo-binary-deploy'
/usr/local/share/gems/gems/rhc-1.16.8/lib/rhc/ssh_helpers.rb:242:in `ssh_send_url_ruby': uninitialized constant RHC::SSHHelpers::OpenStruct (NameError)
	from /usr/local/share/gems/gems/rhc-1.16.8/lib/rhc/deployment_helpers.rb:62:in `deploy_file_from_url'
	from /usr/local/share/gems/gems/rhc-1.16.8/lib/rhc/deployment_helpers.rb:16:in `deploy_artifact'
	from /usr/local/share/gems/gems/rhc-1.16.8/lib/rhc/commands/app.rb:385:in `deploy'
	from /usr/local/share/gems/gems/rhc-1.16.8/lib/rhc/commands.rb:285:in `execute'
	from /usr/local/share/gems/gems/rhc-1.16.8/lib/rhc/commands.rb:276:in `block (3 levels) in to_commander'
	from /usr/local/share/gems/gems/commander-4.1.2/lib/commander/command.rb:180:in `call'
	from /usr/local/share/gems/gems/commander-4.1.2/lib/commander/command.rb:180:in `call'
	from /usr/local/share/gems/gems/commander-4.1.2/lib/commander/command.rb:155:in `run'
	from /usr/local/share/gems/gems/commander-4.1.2/lib/commander/runner.rb:400:in `run_active_command'
	from /usr/local/share/gems/gems/rhc-1.16.8/lib/rhc/command_runner.rb:73:in `run!'
	from /usr/local/share/gems/gems/commander-4.1.2/lib/commander/delegates.rb:11:in `run!'
	from /usr/local/share/gems/gems/rhc-1.16.8/lib/rhc/cli.rb:37:in `start'
	from /usr/local/share/gems/gems/rhc-1.16.8/bin/rhc:20:in `<top (required)>'
	from /usr/local/bin/rhc:23:in `load'
	from /usr/local/bin/rhc:23:in `<main>'
Comment 9 Fabiano Franz 2013-11-01 08:43:39 EDT
Fixed in https://github.com/openshift/rhc/pull/497
Comment 11 Wei Sun 2013-11-03 20:49:39 EST
Verified in STG(devenv-stage_549) with rhc-1.16.9

Result:

[root@mtv-f17-01 ~]# rhc deploy http://phpbinary-wsunpro.rhcloud.com/phpt.tar.gz -a phpx
Deployment of file 'http://phpbinary-wsunpro.rhcloud.com/phpt.tar.gz' in progress for application phpx ...
Beginning binary deployment
Stopping gear
Stopping PHP cartridge
Waiting for stop to finish
Creating new deployment directory
Preparing deployment
Distributing deployment
Distribution status: success
Activating deployment
Activation status: success
Deployment status: success
Success

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