deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ronelle Landy (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DTACLOUD-149) Deltacloud Deltacloud::ExceptionHandler::BackendError is thrown instead of Unauthorized when validating provider credentials
Date Wed, 22 Feb 2012 14:47:48 GMT

    [ https://issues.apache.org/jira/browse/DTACLOUD-149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13213663#comment-13213663
] 

Ronelle Landy commented on DTACLOUD-149:
----------------------------------------

Below is another example of this problem ... note how the two errors are different depending
on where conductor is on the port or just the mock server:

    >>> Starting mock DC server on 6001:
     
    deltacloudd -i mock -r localhost -p 6001
     
    >> Error from starting rhevm instance (with rhvem creds) on 6001:
     
     1) instance launch load test launching multiple instances from the same image
         Failure/Error: instance = client.create_instance('456d7bd2-4671-4e1d-bd39-b5c81fc9216e',
         DeltaCloud::API::BackendError:
           401 : Not authorized / Invalid credentials
         # ./lib/deltacloud.rb:417:in `handle_backend_error'
         # ./lib/deltacloud.rb:370:in `request'
         # ./lib/deltacloud.rb:369:in `send'
         # ./lib/deltacloud.rb:369:in `request'
         # ./lib/deltacloud.rb:315:in `method_missing'
         # ./specs/load_spec.rb:34
         # ./specs/load_spec.rb:30:in `each'
         # ./specs/load_spec.rb:30
         # ./lib/deltacloud.rb:81:in `initialize'
         # ./lib/deltacloud.rb:40:in `new'
         # ./lib/deltacloud.rb:40:in `new'
         # ./specs/load_spec.rb:28
     
    Finished in 0.24459 seconds
    1 example, 1 failure
     
    Failed examples:
     
    rspec ./specs/load_spec.rb:27 # instance launch load test launching multiple instances
from the same image
    rake aborted!
    /usr/bin/ruby -S rspec specs/load_spec.rb --format nested --color failed
     
    Tasks: TOP => spec
    (See full trace by running task with --trace)
    [root@hp-dl360g5-02 client]#
     
     
     
    ***************************************
     
    Targeting port 3002 - with conductor gives:
     
    [root@hp-dl360g5-02 client]# rake spec API_PROVIDER=rhevm API_PORT=3002
    /usr/bin/ruby -S rspec specs/load_spec.rb --format nested --color
     
    instance launch load test
    Launching instance rlandyLThp1
      launching multiple instances from the same image (FAILED - 1)
     
    Failures:
     
      1) instance launch load test launching multiple instances from the same image
         Failure/Error: Unable to find matching line from backtrace
         DeltaCloud::API::BackendError:
           500 : Unhandled exception or status code (AuthFailure)
         #
         # /usr/share/deltacloud-core/lib/deltacloud/drivers/mock/mock_driver.rb:459:in `check_credentials'
         # /usr/share/deltacloud-core/lib/deltacloud/base_driver/exceptions.rb:151:in `call'
         # /usr/share/deltacloud-core/lib/deltacloud/base_driver/exceptions.rb:151:in `safely'
         # /usr/share/deltacloud-core/lib/deltacloud/drivers/mock/mock_driver.rb:457:in `check_credentials'
         # /usr/share/deltacloud-core/lib/deltacloud/drivers/mock/mock_driver.rb:170:in `create_instance'
         # /usr/share/deltacloud-core/lib/deltacloud/server.rb:480
         # /usr/share/deltacloud-core/lib/sinatra/rabbit.rb:125:in `instance_eval'
         # /usr/share/deltacloud-core/lib/sinatra/rabbit.rb:125:in `POST /api/instances'
     
    Finished in 0.24303 seconds
    1 example, 1 failure
     
    Failed examples:
     
    rspec ./specs/load_spec.rb:27 # instance launch load test launching multiple instances
from the same image
    rake aborted!
    /usr/bin/ruby -S rspec specs/load_spec.rb --format nested --color failed
     
    Tasks: TOP => spec
    (See full trace by running task with --trace)
    [root@hp-dl360g5-02 client]# 
                
> Deltacloud Deltacloud::ExceptionHandler::BackendError is thrown instead of Unauthorized
when validating provider credentials
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DTACLOUD-149
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-149
>             Project: DeltaCloud
>          Issue Type: Bug
>         Environment: commit: 0d31929171175de459e2dbde9d13cae611f3efa3
>            Reporter: Martyn Taylor
>            Assignee: David Lutterkort
>
> Deltacloud Server throws a 500 instead of a 401 error when wrong credentials are provider
tot he valid_credentials method.  This causes the client to raise a ServerError exception
instead of Unauthorised.
> /usr/bin/deltacloudd[9969]: [NO HANDLED] Deltacloud::ExceptionHandler::BackendError:
Unhandled exception or status code (401 Unauthorized)
> /usr/lib/ruby/gems/1.8/gems/rbovirt-0.0.7/lib/rbovirt.rb:273:in `handle_fault'
> /usr/lib/ruby/gems/1.8/gems/rbovirt-0.0.7/lib/rbovirt.rb:177:in `datacenter'
> /usr/lib/ruby/gems/1.8/gems/rbovirt-0.0.7/lib/rbovirt.rb:165:in `current_datacenter'
> /usr/lib/ruby/gems/1.8/gems/rbovirt-0.0.7/lib/rbovirt.rb:145:in `clusters'
> /usr/lib/ruby/gems/1.8/gems/deltacloud-core-0.5.0/lib/deltacloud/drivers/rhevm/rhevm_driver.rb:82:in
`realms'
> /usr/lib/ruby/gems/1.8/gems/deltacloud-core-0.5.0/lib/deltacloud/base_driver/exceptions.rb:173:in
`call'
> /usr/lib/ruby/gems/1.8/gems/deltacloud-core-0.5.0/lib/deltacloud/base_driver/exceptions.rb:173:in
`safely'
> /usr/lib/ruby/gems/1.8/gems/deltacloud-core-0.5.0/lib/deltacloud/drivers/rhevm/rhevm_driver.rb:81:in
`realms'
> /usr/lib/ruby/gems/1.8/gems/deltacloud-core-0.5.0/lib/deltacloud/drivers/rhevm/rhevm_driver.rb:197:in
`valid_credentials?'
> /usr/lib/ruby/gems/1.8/gems/deltacloud-core-0.5.0/lib/deltacloud/server.rb:110:in `GET
/api/?'
> /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:1151:in `call'
> /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:1151:in `compile!'
> /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:724:in `instance_eval'
> /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:724:in `route_eval'
> /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:708:in `route!'
> /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:758:in `process_route'
> /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:755:in `catch'
> /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:755:in `process_route'
> /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:707:in `route!'
> /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:706:in `each'
> /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:706:in `route!'
> /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:843:in `dispatch!'
> /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:644:in `call!'
> /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:808:in `instance_eval'
> /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:808:in `invoke'
> /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:808:in `catch'
> /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:808:in `invoke'
> /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:644:in `call!'
> /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:629:in `call'
> /usr/lib/ruby/gems/1.8/gems/deltacloud-core-0.5.0/lib/sinatra/rack_syslog.rb:48:in `call'
> /usr/lib/ruby/gems/1.8/gems/deltacloud-core-0.5.0/lib/sinatra/rack_date.rb:31:in `call'
> /usr/lib/ruby/gems/1.8/gems/deltacloud-core-0.5.0/lib/sinatra/rack_accept.rb:149:in `call'
> /usr/lib/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/head.rb:9:in `call'
> /usr/lib/ruby/gems/1.8/gems/deltacloud-core-0.5.0/lib/sinatra/rack_driver_select.rb:45:in
`call'
> /usr/lib/ruby/gems/1.8/gems/deltacloud-core-0.5.0/lib/sinatra/rack_matrix_params.rb:106:in
`call'
> /usr/lib/ruby/gems/1.8/gems/deltacloud-core-0.5.0/lib/sinatra/rack_runtime.rb:36:in `call'
> /usr/lib/ruby/gems/1.8/gems/deltacloud-core-0.5.0/lib/sinatra/rack_etag.rb:41:in `call'
> /usr/lib/ruby/gems/1.8/gems/rack-accept-0.4.3/lib/rack/accept/context.rb:22:in `call'
> /usr/lib/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/head.rb:9:in `call'
> /usr/lib/ruby/gems/1.8/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in `call'
> /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:1272:in `call'
> /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:1303:in `synchronize'
> /usr/lib/ruby/gems/1.8/gems/sinatra-1.2.6/lib/sinatra/base.rb:1272:in `call'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/connection.rb:84:in `pre_process'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/connection.rb:82:in `catch'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/connection.rb:82: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.2.11/lib/thin/connection.rb:54:in `process'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/connection.rb:42: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.2.11/lib/thin/backends/base.rb:61:in `start'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/server.rb:159:in `start'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/controllers/controller.rb:86:in `start'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/runner.rb:185:in `send'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/runner.rb:185:in `run_command'
> /usr/lib/ruby/gems/1.8/gems/thin-1.2.11/lib/thin/runner.rb:151:in `run!'
> /usr/lib/ruby/gems/1.8/gems/deltacloud-core-0.5.0/bin/deltacloudd:239
> /usr/bin/deltacloudd:19:in `load'
> /usr/bin/deltacloudd:19

--
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

        

Mime
View raw message