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 0D4CD9DDA for ; Wed, 28 Mar 2012 12:24:51 +0000 (UTC) Received: (qmail 36243 invoked by uid 500); 28 Mar 2012 12:24:50 -0000 Delivered-To: apmail-deltacloud-dev-archive@deltacloud.apache.org Received: (qmail 36228 invoked by uid 500); 28 Mar 2012 12:24:50 -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 36219 invoked by uid 99); 28 Mar 2012 12:24:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Mar 2012 12:24:50 +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, 28 Mar 2012 12:24:48 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id B97D734AF0E for ; Wed, 28 Mar 2012 12:24:28 +0000 (UTC) Date: Wed, 28 Mar 2012 12:24:28 +0000 (UTC) From: "Ronelle Landy (Assigned) (JIRA)" To: dev@deltacloud.apache.org Message-ID: <1787178836.28253.1332937468779.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <676191614.9688.1332529527863.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Assigned] (DTACLOUD-173) Creating a blob using the format POST /api/buckets/:bucket_id - missing parameter verification MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DTACLOUD-173?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ronelle Landy reassigned DTACLOUD-173: -------------------------------------- Assignee: Marios Andreou (was: Ronelle Landy) Assigning back to Marios to commit the patch to the deltacloud git master branch. Will reverify and close out JIRA once the fix is tested on the master branch. > Creating a blob using the format POST /api/buckets/:bucket_id - missing parameter verification > ---------------------------------------------------------------------------------------------- > > Key: DTACLOUD-173 > URL: https://issues.apache.org/jira/browse/DTACLOUD-173 > Project: DeltaCloud > Issue Type: Bug > Components: Server > Environment: - Deltacloud git commit version 7e372dfca79c02a799046287e5936129216b781b - branch 'master' of https://git-wip-us.apache.org/repos/asf/deltacloud > - ec2 provider > - Fedora 16, RHEL 6.2 > Reporter: Ronelle Landy > Assignee: Marios Andreou > Attachments: 0001-FIXES-DTACLOUD_173-Missing-parameter-validation-for-.patch > > > When the parameter "blob_id" is missing from the POST command to create a blob, a 502 backend error (plus trace) is returned: "private method `gsub' called for nil:NilClass": > curl -X POST --trace-ascii /home/rlandy/Temp/out -F 'blob_data=@/home/rlandy/Temp/factory-build-5468912b-b707-4701-b919-c370ed2099ba-1330360364.96.png;type=image/png' -F "meta_params=2" -F "meta_name1=author" -F "meta_value1=rlandy" -F "meta_name2=version" -F "meta_value2=2.3" --user "username:password" "http://localhost:3009/api/buckets/bucket-rlandy2?format=xml" > > > backend_error > > 502 > > > > /usr/lib/ruby/gems/1.8/gems/aws-2.5.6/lib/s3/s3_interface.rb:434:in `put' > /home/rlandy/workspace/deltacloud/server/lib/deltacloud/drivers/ec2/ec2_driver.rb:440:in `create_blob' > /home/rlandy/workspace/deltacloud/server/lib/deltacloud/base_driver/exceptions.rb:173:in `call' > /home/rlandy/workspace/deltacloud/server/lib/deltacloud/base_driver/exceptions.rb:173:in `safely' > /home/rlandy/workspace/deltacloud/server/lib/deltacloud/drivers/ec2/ec2_driver.rb:439:in `create_blob' > /home/rlandy/workspace/deltacloud/server/lib/deltacloud/server.rb:880 > /home/rlandy/workspace/deltacloud/server/lib/sinatra/rabbit.rb:125:in `instance_eval' > /home/rlandy/workspace/deltacloud/server/lib/sinatra/rabbit.rb:125:in `POST /api/buckets/:bucket' > /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:1211:in `call' > /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:1211:in `compile!' > /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in `[]' > /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in `route!' > /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:788:in `route_eval' > /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:772:in `route!' > /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:821:in `process_route' > /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:819:in `catch' > /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:819:in `process_route' > /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:771:in `route!' > /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:770:in `each' > /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:770:in `route!' > /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:886:in `dispatch!' > /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:706:in `call!' > /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in `invoke' > /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in `catch' > /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:871:in `invoke' > /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:706:in `call!' > /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:692:in `call' > /usr/lib/ruby/gems/1.8/gems/rack-1.3.5/lib/rack/commonlogger.rb:20:in `call' > /home/rlandy/workspace/deltacloud/server/lib/sinatra/rack_date.rb:31:in `call' > /home/rlandy/workspace/deltacloud/server/lib/sinatra/rack_accept.rb:152:in `call' > /usr/lib/ruby/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/xss_header.rb:22:in `call' > /usr/lib/ruby/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/path_traversal.rb:16:in `call' > /usr/lib/ruby/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/json_csrf.rb:17:in `call' > /usr/lib/ruby/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/base.rb:47:in `call' > /usr/lib/ruby/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/xss_header.rb:22:in `call' > /usr/lib/ruby/gems/1.8/gems/rack-1.3.5/lib/rack/nulllogger.rb:9:in `call' > /usr/lib/ruby/gems/1.8/gems/rack-1.3.5/lib/rack/head.rb:9:in `call' > /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/showexceptions.rb:21:in `call' > /home/rlandy/workspace/deltacloud/server/lib/sinatra/rack_driver_select.rb:45:in `call' > /home/rlandy/workspace/deltacloud/server/lib/sinatra/rack_matrix_params.rb:106:in `call' > /home/rlandy/workspace/deltacloud/server/lib/sinatra/rack_runtime.rb:36:in `call' > /home/rlandy/workspace/deltacloud/server/lib/sinatra/rack_etag.rb:41:in `call' > /usr/lib/ruby/gems/1.8/gems/rack-accept-0.4.4/lib/rack/accept/context.rb:22:in `call' > /usr/lib/ruby/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/xss_header.rb:22:in `call' > /usr/lib/ruby/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/path_traversal.rb:16:in `call' > /usr/lib/ruby/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/json_csrf.rb:17:in `call' > /usr/lib/ruby/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/base.rb:47:in `call' > /usr/lib/ruby/gems/1.8/gems/rack-protection-1.1.4/lib/rack/protection/xss_header.rb:22:in `call' > /usr/lib/ruby/gems/1.8/gems/rack-1.3.5/lib/rack/logger.rb:15:in `call' > /usr/lib/ruby/gems/1.8/gems/rack-1.3.5/lib/rack/commonlogger.rb:20:in `call' > /usr/lib/ruby/gems/1.8/gems/rack-1.3.5/lib/rack/head.rb:9:in `call' > /usr/lib/ruby/gems/1.8/gems/rack-1.3.5/lib/rack/methodoverride.rb:24:in `call' > /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:1334:in `call' > /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:1403:in `synchronize' > /usr/lib/ruby/gems/1.8/gems/sinatra-1.3.1/lib/sinatra/base.rb:1334:in `call' > /usr/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/connection.rb:80:in `pre_process' > /usr/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/connection.rb:78:in `catch' > /usr/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/connection.rb:78:in `pre_process' > /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:1060:in `call' > /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:1060:in `spawn_threadpool' > /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:1057:in `initialize' > /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:1057:in `new' > /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:1057:in `spawn_threadpool' > /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:1049:in `defer' > /usr/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/connection.rb:50:in `process' > /usr/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/connection.rb:38:in `receive_data' > /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine' > /usr/lib/ruby/gems/1.8/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run' > /usr/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/backends/base.rb:61:in `start' > /usr/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/server.rb:159:in `start' > /usr/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/controllers/controller.rb:86:in `start' > /usr/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/runner.rb:185:in `send' > /usr/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/runner.rb:185:in `run_command' > /usr/lib/ruby/gems/1.8/gems/thin-1.3.1/lib/thin/runner.rb:151:in `run!' > ./bin/deltacloudd:239]]> > > > Deltacloud::ExceptionHandler::ProviderError > author > version > > typeimage/pngheadContent-Disposition: form-data; name="blob_data"; filename="factory-build-5468912b-b707-4701-b919-c370ed2099ba-1330360364.96.png" > Content-Type: image/png > filenamefactory-build-5468912b-b707-4701-b919-c370ed2099ba-1330360364.96.pngnameblob_datatempfile# > > 2 > xml > rlandy > 2.3 > > > As a comparison, for other collections, missing required parameters throw relevant error messages like: Deltacloud::ExceptionHandler::ProviderError - MissingParameter: The request must contain the parameter KeyName -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira