Closed KrystianMarek closed 7 years ago
@KrystianMarek i have a few questions in order to be able to help you with this issue :
An unknown error happened in Vagrant OpenStack provider
?vagrant openstack network-list
with the same credentials ?curl -H "X-Auth-Token: $token" http://my-awesome-openstack:9696/v2.0/networks
with the same token ?admin
role ?I'm seeing the same issue, with me it seems to be caused by vagrant-openstack-provider resolving the url to neutron to be http://my-awesome../v2.0/networks, where in my case that should be over ssl, so https://my-awesome../v2.0/networks.
Trying the suggested curl command with the URL taken from debug info will hang forever, changing it into https will return a json.
When hacking .vagrant.d/gems/2.2.5/gems/vagrant-openstack-provider-0.9.0/lib/vagrant-openstack-provider/client/neutron.rb changing at line 38:
def get_networks(env, all)
networks_json = get(env, "#{@session.endpoints[:network]}/networks")
into
def get_networks(env, all)
networks_json = get(env, "https://my-awesome-neutron/v2.0/networks")
I can succesfully 'vagrant up' a machine. Sadly, I don't have the ruby skills to find the correct spot to correct the URL, or to find out if it is vagrant-openstack-provider resolving the URL incorrectly, or my openstack installation sending incorrect information.
Hope this helps, if there are further debug steps I could perform to gather information, let me know.
[edit] Just read the documentation and found that I can override the detected endpoint by specifying os.openstack_network_url in the VagrantFile. No need to hack the source.
@averstappen, you can override the networks endpoint url as follows:
config.vm.provider :openstack do |os|
config.env.enable
...
os.openstack_auth_url = 'https://my-awesome-openstack:5000/v2.0'
os.openstack_network_url = 'https://my-awesome-openstack:9696/v2.0'
...
end
This should help as a hotfix.
@xdanos: yes, that works, thank you. Much better than my lousy code-hack :-)
@averstappen Please have a look at this old comment https://github.com/ggiamarchi/vagrant-openstack-provider/issues/128#issuecomment-65283223. I would bet this is the reason why the plugin resolve a HTTP address instead of a HTTPS address. The endpoint URL resolver in the plugin is implemented the good way but unfortunately the lack of SSL termination support in OpenStack (i don't if this point has evolved in the last past year...) a lot of OpenStack HTTPS deployments have this problem. So, the best solution would be to fix this at the OpenStack level. By the way, the workaround given by @xdanos is the good one
I think no more action is required on this one. Feel free to open a new issue if you guys still encounter any problem
This happens each time I try to run vagrant up
Stack trace: http://pastebin.com/iXnVrJ1D
Vagrantfile: