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

Marios Andreou commented on DTACLOUD-330:
-----------------------------------------

Not sure why this ticket is still open - as far as I can see the issue is 
addressed and resolved.

This ticket is specific to Openstack driver - because for that driver we need 
credentials even for /api entry point. Conductor needs to be able to tell from:

DeltaCloud.new(nil, nil, "http://localhost:3001/api";)

whether the provider running @  "http://localhost:3001/api"; is valid or not. 
For all other drivers this call will be silent, meaning that 'yes, the 
deltacloud server running at the url is running with a valid driver'. For 
Openstack however it (previous to the fix pushed above - see my comment [ 
https://issues.apache.org/jira/browse/DTACLOUD-330?focusedCommentId=13464561&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13464561
 ] ) was not possible to do this because Openstack needed creds even for the 
/api. Which was producing a Deltacloud::ExceptionHandler::BackendError - 
Unhandled exception or status code (Must supply a :username): 

Now however, and specifically for the Openstack driver, Deltacloud will respond 
with '401' status code. This tells conductor that 'yes, this is a valid 
provider'. On the client side you get a DeltaCloud::HTTPError::Unauthorized 
exception:


  1 require 'rubygems'
  2 require 'deltacloud'
  3 
  4 begin
  5   client = DeltaCloud.new(nil, nil, "http://localhost:3001/api";)
  6 rescue DeltaCloud::HTTPError::Unauthorized => e
  7   puts "valid"
  8 end


Jan - can you please tell us if this addresses your issue?

thanks, marios
                
> 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

Reply via email to