Merged
Conversation
The 'should create a subnet spec with restricted_ips in cidr format' test was flaky because the reserved IP ranges overlapped with the gateway, network ID, broadcast, and director IP addresses. The production code's `reject!` block (manual_network_subnet.rb:72-77) mutates a Set while iterating over it to remove IPs subsumed by larger CIDRs, which produces non-deterministic results when there are overlapping entries. Fix by choosing reserved ranges (10.0.3.64-99, 10.0.3.200-215) and a director IP (10.0.3.150) that don't overlap with the gateway, network ID, or broadcast addresses. This makes the reject! a no-op, and the expected set now explicitly lists all 8 restricted IPs. Addresses: https://github.com/cloudfoundry/bosh/actions/runs/21680616777 ai-assisted=yes [TNZ-60576] Made-with: Cursor
The 'clears similar ips with smaller prefix' test was flaky because the reserved range 192.168.1.0-12 decomposed into CIDRs where the saved IP (192.168.1.8/32) overlapped with a reserved CIDR (192.168.1.8/30). The production code's `reject!` block (ip_repo.rb:99-104) mutates a Set while iterating to remove IPs subsumed by larger CIDRs, producing non-deterministic results depending on Set iteration order. Fix by using a reserved range (192.168.1.2-31) that doesn't overlap with the gateway (192.168.1.1) or network ID, and a saved IP (192.168.1.20) that falls cleanly within a single reserved CIDR (192.168.1.16/28). The expected next available IP is now 192.168.1.32. Addresses: https://github.com/cloudfoundry/bosh/actions/runs/22188553905 ai-assisted=yes [TNZ-60576] Made-with: Cursor
selzoc
approved these changes
Mar 12, 2026
Member
Author
Member
|
This could be related to the WIP fix for IP allocation in #2657 |
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.
No description provided.