Return-Path: X-Original-To: apmail-deltacloud-dev-archive@www.apache.org Delivered-To: apmail-deltacloud-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 66CBB9641 for ; Wed, 21 Mar 2012 16:12:14 +0000 (UTC) Received: (qmail 51674 invoked by uid 500); 21 Mar 2012 16:12:11 -0000 Delivered-To: apmail-deltacloud-dev-archive@deltacloud.apache.org Received: (qmail 51655 invoked by uid 500); 21 Mar 2012 16:12:11 -0000 Mailing-List: contact dev-help@deltacloud.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@deltacloud.apache.org Delivered-To: mailing list dev@deltacloud.apache.org Received: (qmail 51612 invoked by uid 99); 21 Mar 2012 16:12:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Mar 2012 16:12:11 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Mar 2012 16:12:09 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 1F9D81A97D5 for ; Wed, 21 Mar 2012 16:11:49 +0000 (UTC) Date: Wed, 21 Mar 2012 16:11:49 +0000 (UTC) From: "Ronelle Landy (Closed) (JIRA)" To: dev@deltacloud.apache.org Message-ID: <122108875.42145.1332346309153.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <92167687.41487.1332334779859.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Closed] (DTACLOUD-164) json output from creating an ec2 instance contains errors MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DTACLOUD-164?page=3Dcom.atlass= ian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ronelle Landy closed DTACLOUD-164. ---------------------------------- Closing this issue as Fixed - see test comments above =20 > json output from creating an ec2 instance contains errors > --------------------------------------------------------- > > Key: DTACLOUD-164 > URL: https://issues.apache.org/jira/browse/DTACLOUD-164 > Project: DeltaCloud > Issue Type: Bug > Components: Server > Environment: deltacloud git commit: 4a3fc20bb532296dfaea0c7c23eb0= 9c3c7190f7c > ec2 > Reporter: Ronelle Landy > Assignee: Ronelle Landy > Attachments: 0001-Bugfix-return-json-output-for-create-instance-a= ction.patch > > > Using format=3Djson, following text + is returned: (log shows: NoMethodEr= ror - undefined method `to_hash' for nil:NilClass) > =20 > curl -X POST -F "image_id=3Dami-8cc035e5" -F "hwp_id=3Dc1.medium" -F "rea= lm_id=3Dus-east-1c" --user "username:password" "http://localhost:3009/api/i= nstances?format=3Djson" > =20 > > rack.errors >
#<Object:0x7fa05419f220>
> > =20 > > rack.input >
#<StringIO:0x7fa051260248>
= > > =20 > > rack.logger >
#<Rack::NullLogger:0x7fa052c29e68 @= app=3D#<Rack::Protection::FrameOptions:0x7fa052c2a250 @options=3D{:statu= s=3D>403, :frame_options=3D>:sameorigin, :message=3D>"Forbidd= en", :encryptor=3D>Digest::SHA1, :except=3D>[:escaped_params, :s= ession_hijacking, :remote_token], :session_key=3D>"rack.session&quo= t;, :xss_mode=3D>:block, :allow_empty_referrer=3D>true, :reaction=3D&= gt;:default_reaction, :logging=3D>true}, @app=3D#<Rack::Protection::I= PSpoofing:0x7fa052c2a7f0 @options=3D{:status=3D>403, :message=3D>&quo= t;Forbidden", :encryptor=3D>Digest::SHA1, :except=3D>[:escaped_p= arams, :session_hijacking, :remote_token], :session_key=3D>"rack.se= ssion", :allow_empty_referrer=3D>true, :reaction=3D>:default_rea= ction, :logging=3D>true}, @app=3D#<Rack::Protection::JsonCsrf:0x7fa05= 2c2ab88 @options=3D{:status=3D>403, :message=3D>"Forbidden"= , :encryptor=3D>Digest::SHA1, :except=3D>[:escaped_params, :session_h= ijacking, :remote_token], :session_key=3D>"rack.session", :all= ow_empty_referrer=3D>true, :reaction=3D>:default_reaction, :logging= =3D>true}, @app=3D#<Rack::Protection::PathTraversal:0x7fa052c2b1a0 @o= ptions=3D{:status=3D>403, :message=3D>"Forbidden", :encrypt= or=3D>Digest::SHA1, :except=3D>[:escaped_params, :session_hijacking, = :remote_token], :session_key=3D>"rack.session", :allow_empty_r= eferrer=3D>true, :reaction=3D>:default_reaction, :logging=3D>true}= , @app=3D#<Rack::Protection::XSSHeader:0x7fa052c2c0a0 @options=3D{:statu= s=3D>403, :encryptor=3D>Digest::SHA1, :message=3D>"Forbidden&= quot;, :except=3D>[:escaped_params, :session_hijacking, :remote_token], = :session_key=3D>"rack.session", :xss_mode=3D>:block, :allow= _empty_referrer=3D>true, :logging=3D>true, :reaction=3D>:default_r= eaction}, @app=3D#<Rack::MediaType:0x7fa052d37a30 @default_layout=3D:lay= out, @template_cache=3D#<Tilt::Cache:0x7fa052d37828 @cache=3D{}>, @ap= p=3D#<Rack::Date:0x7fa052d3fb68 @app=3D#<Rack::CommonLogger:0x7fa052d= 3fcf8 @app=3D#<Sinatra::Application:0x7fa052d403d8 @default_layout=3D:la= yout, @template_cache=3D#<Tilt::Cache:0x7fa052d40180 @cache=3D{}>, @a= pp=3Dnil>, @logger=3Dnil>>>>>>>>>
> > =20 > > rack.multiprocess >
false
> > =20 > > rack.multithread >
true
> > =20 > > rack.request.cookie_hash >
{}
> > =20 > > rack.request.form_hash >
{"image_id"=3D>"ami-= 8cc035e5", "hwp_id"=3D>"c1.medium", "realm= _id"=3D>"us-east-1c"}
> > =20 > > rack.request.form_input >
#<StringIO:0x7fa051260248>
= > > =20 > > rack.request.query_hash >
{"format"=3D>"json&q= uot;}
> > =20 > > rack.request.query_string >
format=3Djson
> > =20 > > rack.run_once >
false
> > =20 > > rack.url_scheme >
http
> > =20 > > rack.version >
[1, 0]
> > =20 > > sinatra.error >
#<NoMethodError: undefined method `= to_hash' for nil:NilClass>
> > =20 > >
> > =20 >

You're seeing this error because you have > enabled the show_exceptions setting.

> > > > =20 > DC log output shows: > I, [2012-03-21T08:43:09.227586 #20097] INFO -- : New Aws::Ec2 using per_= thread-connection mode > I, [2012-03-21T08:43:09.238450 #20097] INFO -- : Launching instance of i= mage ami-8cc035e5 for AKIAJCBB265A57CGKR2Q, key: , groups:=20 > I, [2012-03-21T08:43:09.239199 #20097] INFO -- : Opening new HTTPS conne= ction to ec2.us-east-1.amazonaws.com:443 > NoMethodError - undefined method `to_hash' for nil:NilClass: > =09/home/rlandy/workspace/deltacloud/server/lib/deltacloud/helpers/conver= sion_helper.rb:29:in `convert_to_json' > =09/home/rlandy/workspace/deltacloud/server/lib/deltacloud/server.rb:498 > =09/home/rlandy/workspace/deltacloud/server/lib/sinatra/rack_accept.rb:89= :in `call' > =09/home/rlandy/workspace/deltacloud/server/lib/sinatra/rack_accept.rb:89= :in `respond_to' > =09/home/rlandy/workspace/deltacloud/server/lib/deltacloud/server.rb:492 > =09/home/rlandy/workspace/deltacloud/server/lib/sinatra/rabbit.rb:125:in = `instance_eval' > =09/home/rlandy/workspace/deltacloud/server/lib/sinatra/rabbit.rb:125:in = `POST /api/instances' > =09/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:1211:in = `call' > =09/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:1211:in = `compile!' > =09/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in `= []' > =09/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in `= route!' > =09/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:788:in `= route_eval' > =09/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in `= route!' > =09/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:821:in `= process_route' > =09/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:819:in `= catch' > =09/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:819:in `= process_route' > =09/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:771:in `= route!' > =09/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:770:in `= each' > =09/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:770:in `= route!' > =09/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:886:in `= dispatch!' > =09/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:706:in `= call!' > =09/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in `= invoke' > =09/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in `= catch' > =09/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in `= invoke' > =09/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:706:in `= call!' > =09/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:692:in `= call' > =09/usr/lib/ruby/gems/1.8/gems/rack-1.3.5/lib/rack/commonlogger.rb:20:in = `call' > =09/home/rlandy/workspace/deltacloud/server/lib/sinatra/rack_date.rb:31:i= n `call' > =09/home/rlandy/workspace/deltacloud/server/lib/sinatra/rack_accept.rb:15= 2:in `call' > =09/usr/lib/ruby/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/= xss_header.rb:22:in `call' > =09/usr/lib/ruby/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/= path_traversal.rb:16:in `call' > =09/usr/lib/ruby/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/= json_csrf.rb:17:in `call' > =09/usr/lib/ruby/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/= base.rb:47:in `call' > =09/usr/lib/ruby/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/= xss_header.rb:22:in `call' > =09/usr/lib/ruby/gems/1.8/gems/rack-1.3.5/lib/rack/nulllogger.rb:9:in `ca= ll' > =09/usr/lib/ruby/gems/1.8/gems/rack-1.3.5/lib/rack/head.rb:9:in `call' > =09/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/showexceptions.r= b:21:in `call' > =09/home/rlandy/workspace/deltacloud/server/lib/sinatra/rack_driver_selec= t.rb:45:in `call' > =09/home/rlandy/workspace/deltacloud/server/lib/sinatra/rack_matrix_param= s.rb:106:in `call' > =09/home/rlandy/workspace/deltacloud/server/lib/sinatra/rack_runtime.rb:3= 6:in `call' > =09/home/rlandy/workspace/deltacloud/server/lib/sinatra/rack_etag.rb:41:i= n `call' > =09/usr/lib/ruby/gems/1.8/gems/rack-accept-0.4.4/lib/rack/accept/context.= rb:22:in `call' > =09/usr/lib/ruby/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/= xss_header.rb:22:in `call' > =09/usr/lib/ruby/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/= path_traversal.rb:16:in `call' > =09/usr/lib/ruby/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/= json_csrf.rb:17:in `call' > =09/usr/lib/ruby/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/= base.rb:47:in `call' > =09/usr/lib/ruby/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/= xss_header.rb:22:in `call' > =09/usr/lib/ruby/gems/1.8/gems/rack-1.3.5/lib/rack/logger.rb:15:in `call' > =09/usr/lib/ruby/gems/1.8/gems/rack-1.3.5/lib/rack/commonlogger.rb:20:in = `call' > =09/usr/lib/ruby/gems/1.8/gems/rack-1.3.5/lib/rack/head.rb:9:in `call' > =09/usr/lib/ruby/gems/1.8/gems/rack-1.3.5/lib/rack/methodoverride.rb:24:i= n `call' > =09/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:1334:in = `call' > =09/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:1403:in = `synchronize' > =09/usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:1334:in = `call' > =09/usr/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/connection.rb:80:in `p= re_process' > =09/usr/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/connection.rb:78:in `c= atch' > =09/usr/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/connection.rb:78:in `p= re_process' > =09/usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:1= 060:in `call' > =09/usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:1= 060:in `spawn_threadpool' > =09/usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:1= 057:in `initialize' > =09/usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:1= 057:in `new' > =09/usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:1= 057:in `spawn_threadpool' > =09/usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:1= 049:in `defer' > =09/usr/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/connection.rb:50:in `p= rocess' > =09/usr/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/connection.rb:38:in `r= eceive_data' > =09/usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:2= 56:in `run_machine' > =09/usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:2= 56:in `run' > =09/usr/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/backends/base.rb:61:in= `start' > =09/usr/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/server.rb:159:in `star= t' > =09/usr/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/controllers/controller= .rb:86:in `start' > =09/usr/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/runner.rb:185:in `send= ' > =09/usr/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/runner.rb:185:in `run_= command' > =09/usr/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/runner.rb:151:in `run!= ' > =09./bin/deltacloudd:239 > 127.0.0.1 - - [21/Mar/2012 08:43:10] "POST /api/instances?format=3Djson H= TTP/1.1" 500 185386 0.9620 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs: https://issues.apache.org/jira/secure/ContactAdministrators!default.jsp= a For more information on JIRA, see: http://www.atlassian.com/software/jira