Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
YaEvan opened this issue Nov 20, 2017 · 1 comment
Open

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

YaEvan opened this issue Nov 20, 2017 · 1 comment

Comments

@YaEvan
Copy link

YaEvan commented Nov 20, 2017

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 YaEvan changed the title NoMethodError/Fog::Errors::NotFound for Fog::Image::OpenStack.new(@connection_params) Fog::Image::OpenStack.new service cannot be connected Nov 21, 2017
@YaEvan
Copy link
Author

YaEvan commented Nov 23, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant