Open THUzxj opened 1 year ago
This issue is same as #171
Hi @THUzxj
I have been able to easily reproduce your issue on Devstack where the Neutron endpoint URL from the catalog redirects to a different URL with a 302 code.
In this plugin implementation, we use REST Client to perform HTTP calls. According to the documentation, REST Client is supposed to follow redirections as a default behavior.
It took me a couple of hours to understand why it is not the case here. I finally figured out that when we give a &block
parameter when calling RestClient::Request.execute()
, redirection is not followed.
I don't know if there is a good reason for that or if this is a bug in REST Client, I didn't deep dive into the code.
I refactored our code to not use Ruby blocks, it does the trick.
Feel free to test and review the PR https://github.com/ggiamarchi/vagrant-openstack-provider/pull/395
Hi, thanks for your great work.
My Neutron responses a 302 code when called
/networking
, but functionget_api_version_list
only handles code 200 and 300 and throws an error when getting this. I can offer to fix it.One temporary solution is to set the endpoint in
Vagrantfile
likeos.openstack_network_url = "http://neutron/networking/v2.0"
.