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

ERROR Bad authentication endpoint. #379

Open
cally725 opened this issue Jan 18, 2019 · 2 comments
Open

ERROR Bad authentication endpoint. #379

cally725 opened this issue Jan 18, 2019 · 2 comments

Comments

@cally725
Copy link

cally725 commented Jan 18, 2019

using
vagrant-openstack-provider (0.13.0)
Vagrant 1.8.1
openstack newton

I get Bad authentication endpoint error when running vagrant up --provider openstack with the following vagrant file:

require 'vagrant-openstack-provider'

Vagrant.configure('2') do |config|

  config.ssh.username = 'cirros'
  config.ssh.password = 'gocubsgo'

  config.vm.provider :openstack do |os|
    os.openstack_auth_url = 'http://10.10.20.30:5000/v3'
    os.username           = 'admin`'
    os.password           = 'Passw0rd@stellia'
    os.tenant_name        = 'admin'
    os.flavor             = 'm1.tiny'
    os.image              = 'cirros'
    os.floating_ip_pool   = 'provider'
  end
end

When sourcing my ./openrc I can execute openstack command but not when using vagrant

I saw the the pluggin is adding /token to the auth_url.
My url is :
openstack_auth_url = 'http://10.10.20.30:5000/v3'
but the plugin show in the debug that it use :
openstack_auth_url = 'http://10.10.20.30:5000/v3/tokens'

No sure why it concatenate /tokens but that seems to be causing the problem ?

Here is the debug info:

2019-01-18 23:09 |  INFO | Authenticating on Keystone
2019-01-18 23:09 |  INFO | Authentication on project admin with user admin`
2019-01-18 23:09 | DEBUG | request  => method  : POST
2019-01-18 23:09 | DEBUG | request  => url     : http://10.10.20.30:5000/v3/tokens
2019-01-18 23:09 | DEBUG | request  => headers : {:content_type=>:json, :accept=>:json}
2019-01-18 23:09 | DEBUG | request  => body    : {"auth":{"tenantName":"admin","passwordCredentials":{"username":"admin`","password":"****"}}}
2019-01-18 23:09 | DEBUG | response => code    : 404
2019-01-18 23:09 | DEBUG | response => headers : {:date=>"Fri, 18 Jan 2019 22:09:32 GMT", :server=>"Apache", :vary=>"X-Auth-Token", :x_openstack_request_id=>"req-cb089dc5-c7ae-4d14-abd3-84b0d9bbdbd6", :content_length=>"93", :content_type=>"application/json"}
2019-01-18 23:09 | DEBUG | response => body    : {"error": {"message": "The resource could not be found.", "code": 404,
"title": "Not Found"}}
~

Please help

@cally725 cally725 changed the title Bad authentication endpoint. ERROR Bad authentication endpoint. Jan 18, 2019
@mpiscaer
Copy link

mpiscaer commented May 8, 2019

I have the same issue.

I'm using Openstack rocky.

@ggiamarchi
Copy link
Owner

Hi,

Vargrant OpenStack Provider supports both keystone v2 and v3 authentication endpoints but it uses v2 by default. Depending if you use v2 or v3 endpoint and credentials, configuration will be different.

For v2, you have to populate os.tenant_name, os.username and os.password. For v3, instead of os.tenant_name you have to use os.project_name. In addition, you have to set domains information with os.user_domain_name and os.project_domain_name. Last but not least, set os.identity_api_version = '3' to tell the provider you're using v3 API.

Here are Vagrantfile examples for v2 and v3

Hope it helps.

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

3 participants