fog / fog-openstack

Fog for OpenStack Platform
MIT License
69 stars 130 forks source link

Region Issue: OpenStack SDK throwing error while trying to call the cloud services from some regions. #405

Closed sachinjagtap41 closed 6 years ago

sachinjagtap41 commented 6 years ago

Note: I am trying to call FOG-OpenStack SDK using Native APIs for one of the clouds.

Scenario 1: When I am calling the service from sa-brazil-1 region, it is working fine.

Request: image

Response: This is working as expected.


Scenario 2: When I am calling the service from another region i.e. na-mexico-1 region, it is giving an error.

Request: image

Response: C:\Ruby24-x64\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/fog-openstack-0.1.25/examples/compute/basics.rb fatal: Not a git repository (or any of the parent directories): .git C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/excon-0.62.0/lib/excon/middlewares/expects.rb:7:in response_call': Expected([200, 204, 300]) <=> Actual(404 Not Found) (Excon::Error::NotFound) excon.error.response :body => "{\"message\":\"API not found\",\"request_id\":\"6f478c4f-d62c-459e-8507-532ea5ce0ebb\"}\n" :cookies => [ ] :headers => { "Connection" => "keep-alive" "Content-Length" => "80" "Content-Type" => "application/json" "Date" => "Fri, 22 Jun 2018 11:01:14 GMT" "Server" => "Web Server" } :host => "ecs.sa-chile-1.telefonicaopencloud.com" :local_address => "192.168.0.88" :local_port => 52117 :path => "/" :port => 443 :reason_phrase => "Not Found" :remote_ip => "186.148.32.11" :status => 404 :status_line => "HTTP/1.1 404 Not Found\r\n" from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/excon-0.62.0/lib/excon/middlewares/response_parser.rb:9:inresponse_call' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/excon-0.62.0/lib/excon/connection.rb:414:in response' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/excon-0.62.0/lib/excon/connection.rb:263:inrequest' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/fog-core-1.45.0/lib/fog/core/connection.rb:81:in request' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/fog-openstack-0.1.25/lib/fog/openstack.rb:610:inget_version' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/fog-openstack-0.1.25/lib/fog/openstack.rb:583:in get_supported_microversion' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/fog-openstack-0.1.25/lib/fog/openstack/core.rb:122:inset_microversion' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/fog-openstack-0.1.25/lib/fog/openstack/core.rb:212:in authenticate' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/fog-openstack-0.1.25/lib/fog/compute/openstack.rb:397:ininitialize' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/fog-core-1.45.0/lib/fog/core/service.rb:115:in new' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/fog-core-1.45.0/lib/fog/core/service.rb:115:innew' from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/fog-openstack-0.1.25/examples/compute/basics.rb:12:in <top (required)>' from -e:1:inload' from -e:1:in `

'

Process finished with exit code 1 Please help I am not getting why the same thing is not working on another region.

iamazeem commented 6 years ago

Are you sure that there's a space in your auth URL?

Your auth URL is (observe space after dot):

https://iam. na-mexico-

Shouldn't it be like this?

https://iam.na-mexico-

If that's not the problem then you make sure that the region you're trying to work is available or not. Use the OpenStack official CLI for this.

gildub commented 6 years ago

@sachinjagtap41, I don't see any reason why it would work for one and one the other as they're both using non default domains.

gildub commented 6 years ago

This seems to be a non issue. Please reopen if valid case. Thanks

click2cloud-aniketp commented 6 years ago

@gildub, I am facing the same issue on the latest version of fog-openstack. It works only for sa-brazil-1 region but not working for other regions. The token generated by fog-openstack is valid, but facing issue while establishing a connection. error Can you please check and reopen this issue.

sachinjagtap41 commented 6 years ago

@gildub This is not working, Could you please re-open this issue ?

gildub commented 6 years ago

@aniketpawar92, @sachinjagtap41, I'm happy to re-open the issue but could you please provide more specific information about the issue you're facing. Please provide catalog and endpoint lists.

The error "API not found" seems to indicate an endpoint setup issue.

Using latest fog-openstack version, I can retrieve compute information from 2 different regions.