[ 
https://issues.apache.org/jira/browse/DTACLOUD-457?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ronelle Landy closed DTACLOUD-457.
----------------------------------

    Resolution: Fixed

Closing this JIRA as fixed in Deltacloud commit version: 
98cfca63b52a63f73442522c8d30b18bdcd566fc

<error status='403' 
url='/api/instances/7107f01f-2a1d-4096-9611-0d8de2582809/start'>
  <backend driver='rhevm' 
provider='https://cloudqe-test-rhevm.rhq.lab.eng.bos.redhat.com/api;b9bb11c2-f397-4f41-a57b-7ac15a894779'></backend>
  <request>
    <param name='splat'></param>
    <param name='captures'>7107f01f-2a1d-4096-9611-0d8de2582809</param>
    <param name='id'>7107f01f-2a1d-4096-9611-0d8de2582809</param>
    <param name='format'>xml</param>
  </request>
  <message>Method not allowed for this resource</message>
</error>

                
> RHEVm, Passing an invalid instance ID to start instance results in traceback 
> with 500. 
> ---------------------------------------------------------------------------------------
>
>                 Key: DTACLOUD-457
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-457
>             Project: DeltaCloud
>          Issue Type: Bug
>         Environment: RHEVm3.1
>            Reporter: Joseph J. VLcek
>            Assignee: Joseph J. VLcek
>         Attachments: 
> 0001-DTACLOUD-457-RHEVm-Passing-an-invalid-instance-ID-to.patch
>
>
> When starting an instance on RHEVm and passing an invalid instance ID to
> POST "start" generates the following traceback with 500.
> Instead of 500 404 or 403 should be returned.
> % curl   -X POST   --user "${CREDS}"
> "http://localhost:3001/api/instances/${INSTANCE_ID}/start?format=xml";
> <?xml version='1.0' encoding='utf-8' ?>
> <error status='500'
> url='/api/instances/INVALID INSTANCE ID/start'>
>   <kind>backend_error</kind>
>   <backend driver='rhevm'
> provider='PROVIDER'>
>     <code>500</code>
>   </backend>
>   <message><![CDATA[undefined method `state' for nil:NilClass]]></message>
> <backtrace><![CDATA[<REPO>/GIT/DELTACLOUD_OVIRT/deltacloud/server/lib/deltacloud/helpers/deltacloud_helper.rb:147:in
> `instance_action'
> <REPO>/GIT/DELTACLOUD_OVIRT/deltacloud/server/lib/deltacloud/collections/instances.rb:93:in
> `block (3 levels) in <class:Instances>'
> <LOCAL 
> GEMS>/.gem/ruby/1.9.1/gems/sinatra-rabbit-1.1.3/lib/sinatra/rabbit/base.rb:396:in
> `instance_eval'
> <LOCAL 
> GEMS>/.gem/ruby/1.9.1/gems/sinatra-rabbit-1.1.3/lib/sinatra/rabbit/base.rb:396:in
> `block in control'
> <LOCAL GEMS>/.gem/ruby/1.9.1/gems/sinatra-1.3.4/lib/sinatra/base.rb:1293:in
> `call'
> <LOCAL GEMS>/.gem/ruby/1.9.1/gems/sinatra-1.3.4/lib/sinatra/base.rb:1293:in
> `block in compile!'
> ...
> Comments from mfojtik: on IRC
> I think the problem is here: original_instance = driver.instance(credentials, 
> :id => params[:id])
> this call return 'nil' and that will make the instance_actions_for helper die
> secondary bug is that we should report 404 in that case not 500
> POST /api/instances/unknown-instance/start should return 404 or 403 (forbiden)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to