Bug 861005 - [US2599][fork]Show exception when reloading application
Summary: [US2599][fork]Show exception when reloading application
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Master
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Rajat Chopra
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-27 09:57 UTC by Wei Sun
Modified: 2015-05-15 00:52 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-11-06 18:49:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Wei Sun 2012-09-27 09:57:10 UTC
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 06:14:24 UTC
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 07:49:24 UTC
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 18:35:41 UTC
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 18:40:01 UTC
Assigning to rchopra.

Comment 5 Rajat Chopra 2012-10-03 09:37:08 UTC
Fix merged in master with rev#96e4825

Comment 6 Chandrika Gole 2012-10-03 20:48:25 UTC
Tested it on master and it worked


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