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

Handling of asynchronous floating IP assignment #324

Merged
merged 1 commit into from
May 14, 2017
Merged

Handling of asynchronous floating IP assignment #324

merged 1 commit into from
May 14, 2017

Conversation

softsilverwind
Copy link

Overview

When vagrant is run with an openstack-compatible backend which assigns
floating IPs asynchronously, it fails with "Vagrant was unable to resolve
a valid ip to ssh on your OpenStack instance".

This happens because vagrant-openstack-provider tries to get the assigned
IP of the virtual machine immediately after sending the floating IP
assignment command.

This issue was found when using vagrant with synnefo
as the backend.

With this patch, vagrant will wait until the floating IP is assigned before
continuing.

Notes

It should be noted that many implementations do not assume that the IP is immediately assigned, but wait/poll until it appears on the server information.

These include what Ansible and the official Shade library do.
Here is a chain of calls that Ansible does:

  1. Ansible os_floating_ip.py:main
  2. Shade add_ips_to_server
  3. Shade _add_auto_ip
  4. Shade create_floating_ip
  5. Shade _neutron_create_floating_ip

Also, this patch will probably solve other issues, such as issue 278

Currently, vagrant fails when run with an openstack backend
that assigns a floating IP asynchronously.

With this patch, vagrant will wait after sending the floating IP
assign command until the floating IP is actually assigned to the
server.
@coveralls
Copy link

coveralls commented Mar 9, 2017

Coverage Status

Coverage decreased (-0.6%) to 87.014% when pulling d0b43d5 on softsilverwind:synnefo-integration into d91b1cb on ggiamarchi:master.

@kpelelis
Copy link

kpelelis commented May 8, 2017

bump

@ggiamarchi
Copy link
Owner

LGTM ! @softsilverwind Good catch !

@ggiamarchi ggiamarchi merged commit 2978da1 into ggiamarchi:master May 14, 2017
@ggiamarchi ggiamarchi added this to the 0.11.0 milestone May 22, 2017
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

Successfully merging this pull request may close these issues.

4 participants