You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by "Ronelle Landy (JIRA)" <ji...@apache.org> on 2012/10/03 19:20:07 UTC
[jira] [Commented] (DTACLOUD-330) Openstack driver - Deltacloud
requires credentials for any request
[ https://issues.apache.org/jira/browse/DTACLOUD-330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13468681#comment-13468681 ]
Ronelle Landy commented on DTACLOUD-330:
----------------------------------------
Using deltacloud-client gem under test ...
Creating client with a nil username and password and then querying client.images does show the 401 error on the server side but returns a 'NoMethodError: undefined method `[]' for nil:NilClass' on the client side ... is that expected? ....
---------------- CLIENT side:
irb(main):201:0* client=DeltaCloud.new(nil,nil,"http://localhost:3005/api")
=> #<DeltaCloud::API:0x000000031805f8 @api_provider=nil, @api_driver=nil, @password=nil, @username=nil, @api_uri=#<URI::HTTP:0x000000031801e8 URL:http://localhost:3005/api>, @entry_points={:realms=>"http://localhost:3005/api/realms", :storage_volumes=>"http://localhost:3005/api/storage_volumes", :hardware_profiles=>"http://localhost:3005/api/hardware_profiles", :instances=>"http://localhost:3005/api/instances", :instance_states=>"http://localhost:3005/api/instance_states", :drivers=>"http://localhost:3005/api/drivers", :images=>"http://localhost:3005/api/images"}, @features={:instances=>[:user_name, :user_data]}, @verbose=false, @driver_name="rhevm", @api_version="1.0.4">
irb(main):202:0> client.images
NoMethodError: undefined method `[]' for nil:NilClass
from /usr/local/share/gems/gems/deltacloud-client-1.0.4/lib/deltacloud.rb:369:in `response_error'
from /usr/local/share/gems/gems/deltacloud-client-1.0.4/lib/deltacloud.rb:403:in `block in request'
from /usr/local/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:228:in `call'
from /usr/local/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:228:in `process_result'
from /usr/local/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:178:in `block in transmit'
from /usr/share/ruby/net/http.rb:745:in `start'
from /usr/local/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit'
from /usr/local/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
from /usr/local/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
from /usr/local/share/gems/gems/rest-client-1.6.7/lib/restclient/resource.rb:51:in `get'
from /usr/local/share/gems/gems/deltacloud-client-1.0.4/lib/deltacloud.rb:402:in `request'
from /usr/local/share/gems/gems/deltacloud-client-1.0.4/lib/deltacloud.rb:138:in `block (3 levels) in declare_entry_points_methods'
from (irb):202
from /bin/irb:12:in `<main>'
irb(main):203:0>
----------------------- SERVER side:
127.0.0.1 - - [03/Oct/2012 12:35:25] "GET /api/images HTTP/1.1" 200 89730 0.7218
127.0.0.1 - - [03/Oct/2012 12:36:18] "GET /api HTTP/1.1" 200 837 0.0119
E, [2012-10-03T12:36:24.301979 #10018] ERROR -- : OVIRT::OvirtException:401 Unauthorized
/usr/local/share/gems/gems/rbovirt-0.0.12/lib/rbovirt.rb:131:in `handle_fault'
/usr/local/share/gems/gems/rbovirt-0.0.12/lib/client/datacenter_api.rb:8:in `rescue in datacenter'
/usr/local/share/gems/gems/rbovirt-0.0.12/lib/client/datacenter_api.rb:4:in `datacenter'
/usr/local/share/gems/gems/rbovirt-0.0.12/lib/rbovirt.rb:58:in `current_datacenter'
/usr/local/share/gems/gems/rbovirt-0.0.12/lib/client/template_api.rb:4:in `templates'
/usr/local/share/gems/gems/deltacloud-core-1.0.4/lib/deltacloud/drivers/rhevm/rhevm_driver.rb:97:in `block in images'
/usr/local/share/gems/gems/deltacloud-core-1.0.4/lib/deltacloud/drivers/exceptions.rb:199:in `call'
/usr/local/share/gems/gems/deltacloud-core-1.0.4/lib/deltacloud/drivers/exceptions.rb:199:in `safely'
/usr/local/share/gems/gems/deltacloud-core-1.0.4/lib/deltacloud/drivers/rhevm/rhevm_driver.rb:88:in `images'
/usr/local/share/gems/gems/deltacloud-core-1.0.4/lib/deltacloud/helpers/deltacloud_helper.rb:44:in `block in filter_all'
/usr/share/ruby/benchmark.rb:280:in `measure'
127.0.0.1 - - [03/Oct/2012 12:36:24] "GET /api/images HTTP/1.1" 401 93 0.0386
> Openstack driver - Deltacloud requires credentials for any request
> ------------------------------------------------------------------
>
> Key: DTACLOUD-330
> URL: https://issues.apache.org/jira/browse/DTACLOUD-330
> Project: DeltaCloud
> Issue Type: Bug
> Components: Server
> Environment: deltalcoud-core from master branch (last commit 97db199f908eb9fcd7780d904e7161fb7c60bac5)
> Reporter: Jan Provaznik
> Assignee: Michal Fojtik
>
> Conductor keeps providers and provider accounts separately. This means that at first step a user adds a provider (ec2, rhevm, openstack), then he can add multiple accounts for this provider.
> When adding a provider, Conductor checks if the provider is valid by doing dc connect with nil credentials:
> DeltaCloud.new(nil, nil, url)
> The problem is that this call always fails for Openstack driver with
> Deltacloud::ExceptionHandler::BackendError - Unhandled exception or status code (Must supply a :username):
> /usr/local/share/gems/gems/openstack-1.0.6/lib/openstack/connection.rb:74:in `initialize'
> /usr/local/share/gems/gems/openstack-1.0.6/lib/openstack/connection.rb:60:in `new'
> /usr/local/share/gems/gems/openstack-1.0.6/lib/openstack/connection.rb:60:in `create'
> /home/jprovazn/devel/deltacloud/server/lib/deltacloud/drivers/openstack/openstack_driver.rb:357:in `block in new_client'
> /home/jprovazn/devel/deltacloud/server/lib/deltacloud/drivers/exceptions.rb:199:in `call'
> /home/jprovazn/devel/deltacloud/server/lib/deltacloud/drivers/exceptions.rb:199:in `safely'
> /home/jprovazn/devel/deltacloud/server/lib/deltacloud/drivers/openstack/openstack_driver.rb:352:in `new_client'
> /home/jprovazn/devel/deltacloud/server/lib/deltacloud/drivers/openstack/openstack_driver.rb:47:in `supported_collections'
> /home/jprovazn/devel/deltacloud/server/lib/deltacloud/server.rb:52:in `block in <class:API>'
> From what I know DC requries openstack credentials to be able to connect to openstack api and check if some bucket is supported or not.
> Is it possible to offer some unauthenticated connection which can be used just to check that a provider is accessible?
--
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