salt-cloud will use list_floating_ips for Openstack #34280
Merged
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.
What does this PR do?
When using salt-cloud on an Openstack installation, attempting to provision a machine with public_ips while a project has maxed out the quota for floating-ips but has unassigned IP's in the pool results in a HTTP 413 error. It appears the code calls get create_floating_ips instead of using unassigned IP's in the pool. This changes the behavior to use IP's from the pool and errors if none are assigned.
What issues does this PR fix or reference?
N/A
Previous Behavior
salt-cloud would call create_floating_ips to get a floating IP to assign to an instance when provisioning
New Behavior
salt-cloud will call list_floating_ips and use any unassigned IP currently in the pool for provisioing
Tests written?
No
Please review Salt's Contributing Guide for best practices.
This changes salt-cloud for Openstack to list_floating_ips when
nodes are provisioned. This prevents quota errors whe attempting
to allocate IPs to a project when the quota is maxed out but there
are unassigned IPs.