Avoid unnecessary redeploys #2631
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 is this change about?
If the bosh directors ip version does not match the ip version of the subnet range (ipv4 <-> ipv6), bosh will trigger a redeploy everytime it deploys the relevant deployment. This PR will avoid to add an ipv4 to the restricted ips if the range of the subnet is ipv6 and vice versa, which is the root cause of the issue and does not make any sense. I also added an integration test.
Other symptoms include:
"No more IPs available"
In debug logs: "Failed to find network <network_name> or a network with valid subnets for <ip_address>,reservation will be marked as obsolete"
What tests have you run against this PR?
Unit tests and created a separate integration test which I ran on the concourse worker
How should this change be described in bosh release notes?
Avoid unnecessary redeploys
Does this PR introduce a breaking change?
No