fog / fog-openstack

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

Fog::Image::OpenStack.new service cannot be connected #342

Open YaEvan opened 6 years ago

YaEvan commented 6 years ago

My Openstack's version is stable/pike.(ubuntu16 install by devstack, enable swift)

When I follow the tutorial to the Image (Glance) Download Glance image: @connection_params = { openstack_auth_url: "http://xx.xxx.xx.xx/identity/v3/auth/tokens", openstack_username: "admin", openstack_api_key: "password", openstack_project_name: "admin", openstack_domain_id: "default" }

image = Fog::Image::OpenStack.new(@connection_params)

The error is : NoMethodError: undefined method `[]' for nil:NilClass from /home/evan/.rvm/gems/ruby-2.3.4@fog-openstack/gems/fog-openstack-0.1.22/lib/fog/openstack.rb:364:in `authenticate_v3'

And then I follow the example 'spec/image_v2_upload_spec.rb' image = Fog::Image::OpenStack.new(:openstack_auth_url=>"http://xx.xxx.xx.xx/identity/v3/auth/tokens", :openstack_project_name=>"admin", :openstack_username=>"admin", :openstack_api_key=>"password", :openstack_domain_name => 'default', :openstack_region => 'RegionOne')

The error is: Fog::Errors::NotFound: No endpoints available for region 'RegionOne' from /home/evan/.rvm/gems/ruby-2.3.4@fog-openstack/gems/fog-openstack-0.1.22/lib/fog/openstack.rb:354:in `authenticate_v3'

In terminal run openstack region list +-----------+---------------+-------------+ | Region | Parent Region | Description | +-----------+---------------+-------------+ | RegionOne | None | | +-----------+---------------+-------------+

I also view the fog-openstack/examples/container_infra/basics.rb example ,the error is: Invalid input for field 'scope/project/domain/name'

Is this the reason for the ruby version, or is it the openstack version? How can I solve this problem? Thank you very much.

YaEvan commented 6 years ago

When I installed the pike version of openstack with devstack, the glance was version v2.8. I make the Fog::Image::OpenStack.new() failure.Is it because the highest only support to 2.3? How do I get it to support 2.8?

image_v2