Bug 861005 - [US2599][fork]Show exception when reloading application
[US2599][fork]Show exception when reloading application
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: REST API (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Rajat Chopra
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-27 05:57 EDT by Wei Sun
Modified: 2015-05-14 20:52 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-11-06 13:49:50 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 2012-09-27 05:57:10 EDT
Description of problem:
Run "rhc app reload ",will show exception ,but using rhc app start or other command,will show information correctly.

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

How reproducible:

always
Steps to Reproduce:
1.create app
2.rhc app reload -a $appname
3.
  
Actual results:
[sunwei@dhcp-8-229 dev]$ rhc app reload -a phptest
Password: 
/home/sunwei/.gem/ruby/1.9.1/gems/rhc-0.99.3/lib/rhc/commands/app.rb:244:in `app_action': undefined method `reload' for #<RHC::Rest::Application:0x000000020e1788> (NoMethodError)
    from /home/sunwei/.gem/ruby/1.9.1/gems/rhc-0.99.3/lib/rhc/commands/app.rb:191:in `reload'
    from /home/sunwei/.gem/ruby/1.9.1/gems/rhc-0.99.3/lib/rhc/commands.rb:103: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:402:in `run_active_command'
    from /home/sunwei/.gem/ruby/1.9.1/gems/rhc-0.99.3/lib/rhc/command_runner.rb:30:in `run!'
    from /usr/local/share/gems/gems/commander-4.1.2/lib/commander/delegates.rb:11:in `run!'
    from /home/sunwei/.gem/ruby/1.9.1/gems/rhc-0.99.3/lib/rhc/cli.rb:40:in `start'
    from /home/sunwei/.gem/ruby/1.9.1/gems/rhc-0.99.3/bin/rhc:57:in `<top (required)>'
    from /home/sunwei/bin/rhc:23:in `load'
    from /home/sunwei/bin/rhc:23:in `<main>'

Expected results:
Should not show expection,should show information correctly

Additional info:
Other commands can show information correctly.Such as :rhc app stop,rhc app start
Comment 1 Xiaoli Tian 2012-09-28 02:14:24 EDT
Move it to ON_QA to verify it with rhc built in fork_ami_US2597_US2599_US2813_US2817_US2872_173
Comment 2 Wei Sun 2012-09-28 03:49:24 EDT
Move it to ASSIGNED,because this bug is not fixed with rhc built in fork_ami_US2597_US2599_US2813_US2817_US2872_173


information:

server:devenv_2248
client:rhc built in fork_ami_US2597_US2599_US2813_US2817_US2872_173

[sunwei@dhcp-8-229 ~]$ rhc app reload -a php1 -d
Password: *****

D, [2012-09-28T15:45:49.145317 #31537] DEBUG -- : Connecting to https://ec2-23-22-148-197.compute-1.amazonaws.com/broker/rest/api
D, [2012-09-28T15:45:50.822542 #31537] DEBUG -- : Getting all domains
D, [2012-09-28T15:45:50.822864 #31537] DEBUG -- : Request: #<RestClient::Request:0x00000003239a08 @method="GET", @headers={:accept=>:json, "Authorization"=>"Basic d3N1bkByZWRoYXQuY29tOnJlaGF0", "User-Agent"=>"rhc/0.99.3 (ruby 1.9.3; x86_64-linux)"}, @url="https://ec2-23-22-148-197.compute-1.amazonaws.com/broker/rest/domains", @cookies={}, @payload="", @user=nil, @password=nil, @timeout=nil, @open_timeout=nil, @block_response=nil, @raw_response=false, @verify_ssl=false, @ssl_client_cert=nil, @ssl_client_key=nil, @ssl_ca_file=nil, @tf=nil, @max_redirects=10, @processed_headers={"Accept"=>"application/json", "Accept-Encoding"=>"gzip, deflate", "Authorization"=>"Basic d3N1bkByZWRoYXQuY29tOnJlaGF0", "User-Agent"=>"rhc/0.99.3 (ruby 1.9.3; x86_64-linux)", "Content-Length"=>"0", "Content-Type"=>"application/x-www-form-urlencoded"}, @args={:url=>"https://ec2-23-22-148-197.compute-1.amazonaws.com/broker/rest/domains", :method=>"GET", :headers=>{:accept=>:json, "Authorization"=>"Basic d3N1bkByZWRoYXQuY29tOnJlaGF0", "User-Agent"=>"rhc/0.99.3 (ruby 1.9.3; x86_64-linux)"}, :payload=>{}, :timeout=>nil}>
D, [2012-09-28T15:45:52.121436 #31537] DEBUG -- : Finding domain wsunfull
D, [2012-09-28T15:45:52.121570 #31537] DEBUG -- : Getting all domains
D, [2012-09-28T15:45:52.121798 #31537] DEBUG -- : Request: #<RestClient::Request:0x000000031634f8 @method="GET", @headers={:accept=>:json, "Authorization"=>"Basic d3N1bkByZWRoYXQuY29tOnJlaGF0", "User-Agent"=>"rhc/0.99.3 (ruby 1.9.3; x86_64-linux)"}, @url="https://ec2-23-22-148-197.compute-1.amazonaws.com/broker/rest/domains", @cookies={}, @payload="", @user=nil, @password=nil, @timeout=nil, @open_timeout=nil, @block_response=nil, @raw_response=false, @verify_ssl=false, @ssl_client_cert=nil, @ssl_client_key=nil, @ssl_ca_file=nil, @tf=nil, @max_redirects=10, @processed_headers={"Accept"=>"application/json", "Accept-Encoding"=>"gzip, deflate", "Authorization"=>"Basic d3N1bkByZWRoYXQuY29tOnJlaGF0", "User-Agent"=>"rhc/0.99.3 (ruby 1.9.3; x86_64-linux)", "Content-Length"=>"0", "Content-Type"=>"application/x-www-form-urlencoded"}, @args={:url=>"https://ec2-23-22-148-197.compute-1.amazonaws.com/broker/rest/domains", :method=>"GET", :headers=>{:accept=>:json, "Authorization"=>"Basic d3N1bkByZWRoYXQuY29tOnJlaGF0", "User-Agent"=>"rhc/0.99.3 (ruby 1.9.3; x86_64-linux)"}, :payload=>{}, :timeout=>nil}>
D, [2012-09-28T15:45:53.694149 #31537] DEBUG -- : Finding application :name => php1, :framework => 
D, [2012-09-28T15:45:53.694280 #31537] DEBUG -- : Getting all applications for domain wsunfull
D, [2012-09-28T15:45:53.694823 #31537] DEBUG -- : Request: #<RestClient::Request:0x00000002605bb0 @method="GET", @headers={:accept=>:json, "Authorization"=>"Basic d3N1bkByZWRoYXQuY29tOnJlaGF0", "User-Agent"=>"rhc/0.99.3 (ruby 1.9.3; x86_64-linux)"}, @url="https://ec2-23-22-148-197.compute-1.amazonaws.com/broker/rest/domains/wsunfull/applications", @cookies={}, @payload="", @user=nil, @password=nil, @timeout=nil, @open_timeout=nil, @block_response=nil, @raw_response=false, @verify_ssl=false, @ssl_client_cert=nil, @ssl_client_key=nil, @ssl_ca_file=nil, @tf=nil, @max_redirects=10, @processed_headers={"Accept"=>"application/json", "Accept-Encoding"=>"gzip, deflate", "Authorization"=>"Basic d3N1bkByZWRoYXQuY29tOnJlaGF0", "User-Agent"=>"rhc/0.99.3 (ruby 1.9.3; x86_64-linux)", "Content-Length"=>"0", "Content-Type"=>"application/x-www-form-urlencoded"}, @args={:url=>"https://ec2-23-22-148-197.compute-1.amazonaws.com/broker/rest/domains/wsunfull/applications", :method=>"GET", :headers=>{:accept=>:json, "Authorization"=>"Basic d3N1bkByZWRoYXQuY29tOnJlaGF0", "User-Agent"=>"rhc/0.99.3 (ruby 1.9.3; x86_64-linux)"}, :payload=>{}, :timeout=>nil}>
D, [2012-09-28T15:45:55.904299 #31537] DEBUG -- : Reload application php1
/home/sunwei/.gem/ruby/1.9.1/gems/rhc-0.99.3/lib/rhc/rest/base.rb:27:in `rest_method': undefined method `[]' for nil:NilClass (NoMethodError)
	from /home/sunwei/.gem/ruby/1.9.1/gems/rhc-0.99.3/lib/rhc/rest/application.rb:63:in `reload'
	from /home/sunwei/.gem/ruby/1.9.1/gems/rhc-0.99.3/lib/rhc/commands/app.rb:244:in `app_action'
	from /home/sunwei/.gem/ruby/1.9.1/gems/rhc-0.99.3/lib/rhc/commands/app.rb:191:in `reload'
	from /home/sunwei/.gem/ruby/1.9.1/gems/rhc-0.99.3/lib/rhc/commands.rb:103: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:402:in `run_active_command'
	from /home/sunwei/.gem/ruby/1.9.1/gems/rhc-0.99.3/lib/rhc/command_runner.rb:34:in `run!'
	from /usr/local/share/gems/gems/commander-4.1.2/lib/commander/delegates.rb:11:in `run!'
	from /home/sunwei/.gem/ruby/1.9.1/gems/rhc-0.99.3/lib/rhc/cli.rb:40:in `start'
	from /home/sunwei/.gem/ruby/1.9.1/gems/rhc-0.99.3/bin/rhc:21:in `<top (required)>'
	from /home/sunwei/bin/rhc:23:in `load'
	from /home/sunwei/bin/rhc:23:in `<main>'
Comment 3 Fabiano Franz 2012-10-01 14:35:41 EDT
The Rest API is apparently missing to return the RELOAD action in the "links" list, which causes this NilClass exception on CLI. Please check.
Comment 4 Fabiano Franz 2012-10-01 14:40:01 EDT
Assigning to rchopra.
Comment 5 Rajat Chopra 2012-10-03 05:37:08 EDT
Fix merged in master with rev#96e4825
Comment 6 Chandrika Gole 2012-10-03 16:48:25 EDT
Tested it on master and it worked

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