ggiamarchi / vagrant-openstack-provider

Use Vagrant to manage OpenStack Cloud instances.
MIT License
247 stars 101 forks source link

Does not work on Mitaka #294

Closed jdonofrio728 closed 7 years ago

jdonofrio728 commented 8 years ago

I was unable to get this plugin working on OpenStack Mitaka. Is there any interest in updating this plugin to support the newer versions?

ggiamarchi commented 8 years ago

I don't know any issue regarding Mitaka. Can you please describe your issue more in details. Provide a Vagrantfile and a complete log (before running vagrant up set the environment variable VAGRANT_OPENSTACK_LOG to true).

jdonofrio728 commented 8 years ago

I didn't get much output:

jdonofrio@jdonofrio-Precision:/tmp/vm$ env  | grep VAGRANT
VAGRANT_OPENSTACK_LOG=true
jdonofrio@jdonofrio-Precision:/tmp/vm$ vagrant up --provider=openstack
Authentication failed.

Here is my test vagrant file:

require 'vagrant-openstack-provider'

Vagrant.configure("2") do |config|
  config.ssh.username = "ubuntu"
  config.ssh.private_key_path = "~/.ssh/id_rsa"
  config.vm.provider "openstack" do |os|
    os.openstack_auth_url = "http://192.168.27.10:5000/v2.0"
    os.username = "admin"
    os.password = "password"
    os.tenant_name = "admin"
    os.region = "laptop"

    os.server_name = "vagrant-test"
    os.flavor = "m1.small"
    os.image = "ubuntu-1604-kvm"
    os.networks = "admin-net"
    os.keypair_name = "ubuntu"
    os.security_groups = ["default","ssh"]
  end
end
ggiamarchi commented 8 years ago

Sorry, i made a mistake in my previous message. The value for VAGRANT_OPENSTACK_LOG must be debug.

jdonofrio728 commented 8 years ago

Ok a little more output with this one:

jdonofrio@jdonofrio-Precision-7710:/tmp/vm$ vagrant up --provider=openstack
2016-07-25 10:34 |  INFO | Authenticating on Keystone
2016-07-25 10:34 |  INFO | Authentication on project admin with user admin
2016-07-25 10:34 | DEBUG | request  => method  : POST
2016-07-25 10:34 | DEBUG | request  => url     : http://192.168.27.10:5000/v2.0/tokens
2016-07-25 10:34 | DEBUG | request  => headers : {:content_type=>:json, :accept=>:json}
2016-07-25 10:34 | DEBUG | request  => body    : {"auth":{"tenantName":"admin","passwordCredentials":{"username":"admin","password":"****"}}}
2016-07-25 10:34 | DEBUG | response => code    : 401
2016-07-25 10:34 | DEBUG | response => headers : {:date=>"Mon, 25 Jul 2016 14:34:09 GMT", :server=>"Apache/2.4.18 (Ubuntu)", :vary=>"X-Auth-Token", :x_distribution=>"Ubuntu", :x_openstack_request_id=>"req-d40e559a-184a-4d7e-8248-5ad3864a69c9", :www_authenticate=>"Keystone uri=\"http://192.168.27.10:5000\"", :content_length=>"114", :content_type=>"application/json"}
2016-07-25 10:34 | DEBUG | response => body    : {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}
ggiamarchi commented 8 years ago

Can you check whether you are able to authenticate on your OpenStack using the following curlcommand ? Don't forget to substitue the password.

curl -X POST -i -H "Content-Type: application/json" \
     -d '{"auth":{"tenantName":"admin","passwordCredentials":{"username":"admin","password":"****"}}}' \
     http://192.168.27.10:5000/v2.0/tokens

If this doesn't work that means an issue on your OpenStack not related with Vagrant. Here is a list of possible issue:

jdonofrio728 commented 8 years ago

Definitly not the first or the third options.

When I issue the request, I see this warning from keystone log:

2016-07-25 17:03:06.572221 2016-07-25 17:03:06.571 657 WARNING oslo_log.versionutils [req-5c69176a-32ed-47af-b042-ef93e89235da - - - - -] Deprecated: authenticate of the v2 Authentication APIs is deprecated as of Mitaka in favor of a similar function in the v3 Authentication APIs.
2016-07-25 17:03:06.579101 2016-07-25 17:03:06.578 657 WARNING keystone.common.wsgi [req-5c69176a-32ed-47af-b042-ef93e89235da - - - - -] Authorization failed. The request you have made requires authentication. from 192.168.27.1

Is there something specific that I need to do to enable version 2 of the api?

Do you have any plans to implement version 3 of the api so that we have access to other authentication domains?

Thanks for your responses so far :)

Spenser309 commented 8 years ago

Hey,

Wanted to add a plus one for keystone v3 domain support. I'm currently on a v3 enabled domain at work where the default domain is for admin only and the 'COMPANY_NAME' domain is for ldap users.

Thanks, Spenser

krishraghuram commented 7 years ago

Im experiencing exact same problem.

ggiamarchi commented 7 years ago

Just to clarify the situation. Currently, Keystone v3 is partially supported. It works only if the project's domain and the user's domain are the same. See this example.

ggiamarchi commented 7 years ago

See #334