ggiamarchi / vagrant-openstack-provider

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

Wrong scheme in network endpoint url #258

Closed jpdionne closed 8 years ago

jpdionne commented 8 years ago

It it appears, the https scheme of the network endpoint url is somehow changed into http.

When I run 'vagrant openstack network-list', I get a `rescue in transmit': Server broke connection (RestClient::ServerBrokeConnection) error.

Using VAGRANT_OPENSTACK_LOG=debug, I notice that my 'network' endpoint url is 'http' instead of 'https'. All other endpoint are https:

2015-11-18 10:39 | INFO | -- compute : https://openstack:8774/v2/9e93976a767d455dbd49ef3b9741cf0d 2015-11-18 10:39 | INFO | -- network : http://openstack:9696/v2.0 2015-11-18 10:39 | INFO | -- volumev2 : https://openstack:8776/v2/9e93976a76d345debd49ef3b9741cf0d 2015-11-18 10:39 | INFO | -- computev3 : https://openstack:8774/v3 2015-11-18 10:39 | INFO | -- s3 : https://openstack:7480 2015-11-18 10:39 | INFO | -- image : https://openstack:9292/v2/ 2015-11-18 10:39 | INFO | -- volume : https://openstack:8776/v1/9e93976a7d73d55ebd49ef3b9741cf0d 2015-11-18 10:39 | INFO | -- object-store : https://openstack:7480/swift/v1 2015-11-18 10:39 | INFO | -- identity : https://openstack:5000/v3

If I overwrite the network url in the Vagrantfile, I am able to get things to work: os.openstack_network_url = 'https://openstack:9696/v2.0'

I am not sure where the problem is. The endpoint appears to be returning valid url in json response.

ggiamarchi commented 8 years ago

I'm pretty sure your problem is the one i describe here https://github.com/ggiamarchi/vagrant-openstack-provider/issues/128#issuecomment-65283223

jpdionne commented 8 years ago

You are correct, this is a duplicate issue. I get ‘http’ in the response body:

2015-11-18 13:35 | INFO | Looking for available endpoints... 2015-11-18 13:35 | DEBUG | request => method : GET 2015-11-18 13:35 | DEBUG | request => url : https://openstack:9696/ 2015-11-18 13:35 | DEBUG | request => headers : {"X-Auth-Token"=>"ffa608802ddc47fab194477255e87caf", :accept=>:json} 2015-11-18 13:35 | DEBUG | response => code : 200 2015-11-18 13:35 | DEBUG | response => headers : {:content_type=>"application/json; charset=UTF-8", :content_length=>"140", :date=>"Wed, 18 Nov 2015 18:35:37 GMT", :connection=>"close"} 2015-11-18 13:35 | DEBUG | response => body : {"versions": [{"status": "CURRENT", "id": "v2.0", "links": [{"href": "http://openstack:9696/v2.0", "rel": "self"}]}]}