Repository navigation
Conversation
With reuse_ips set the step only searched for an unassociated floating IP and halted when there was none, even when floating_ip_network was given. The docs describe reuse as an attempt before allocating a new one, so fall back to creating one on floating_ip_network when the search comes back empty, and say in the error when no network is configured either. Neutron errors still halt without a fallback. Fixes hashicorp#167 Signed-off-by: Youssef Omar Bouden <youssef.bouden2002@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
With
reuse_ips = truethe builder only searched for an unassociated floating IP and failed withno free floating IPs foundwhen there was none, even thoughfloating_ip_networkwas set. The docs describereuse_ipsas an attempt before allocating a new one, so the step now falls back to creating a floating IP onfloating_ip_networkwhen the search comes back empty. The allocated IP is marked temporary and released on cleanup like any other allocated one. Withoutfloating_ip_networkthe error now says that no IP was free and no network was given. A Neutron error during the search still halts the build, and nothing changes whenreuse_ipsis false or when a free IP exists.Tests for the step run against gophercloud's test server and cover the fallback and its cleanup, reuse of a free IP, the missing network error, a list error, and the plain
floating_ip_networkpath.Resolved Issues
Closes #167
Rollback Plan
If a change needs to be reverted, we will roll out an update to the code within 7 days.
Changes to Security Controls
None.