-
Notifications
You must be signed in to change notification settings - Fork 62
Distinguishes between IPv4 and v6 subnet overlap when creating VPC #760
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
Merged
Conversation
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
Collaborator
Author
|
This will address #722 when merged, see that issue for more context. Briefly, this checks for an detects overlapping IP address ranges for IPv4 and IPv6 blocks separately when creating a VPC Subnet. That specific failure is returned to the client, so they know which exactly IP CIDR block they need to fix. |
smklein
approved these changes
Mar 15, 2022
7105339 to
731f5e7
Compare
Collaborator
Author
|
Thanks for the quick review @smklein! |
731f5e7 to
38ea525
Compare
Subnets - Extends `SubnetError` variant for communicating overlapping address ranges to contain the actual subnet that caused the problem. This can be used to determine if it was a V4 or V6, client-provided or auto-generated subnet. - Reworks the SQL for checking this case. It now tries to insert NULL for a subnet if that's been found to overlap with an existing range, which violates a not-NULL constraint on the `vpc_subnet` table. By inspecting which constraint failed, we can learn which input caused the issue. - Updates tests to verify, ensuring we get the actual bad subnet back
leftwo
pushed a commit
that referenced
this pull request
Sep 18, 2024
Crucible changes:
Make crutest use BlockIO trait instead of a Guest (#1452)
Use new syncfs syscall (#1427)
Increment write backpressure before deferred encryption (#1444)
Use RAII handles for backpressure (#1443)
Fine-tuning backpressure clamping, and API cleanups (#1442)
Fix outdated comment (#1447)
Update Rust crate rusqlite to 0.32 (#1418)
Fix write reordering bug (#1448)
Remove `history_file` (#1446)
Remove optionality for `BlockRes` in `DeferredWrite` (#1441)
Propolis changes
instance spec rework: tighten up component naming (#761)
instance spec rework: remove most dependencies on `InstanceSpecV0` from propolis-server (#757)
fix new 1.81.0 warning and clippy error (#760)
standalone: be more helpful with bad block device configs (#758)
leftwo
added a commit
that referenced
this pull request
Sep 18, 2024
Crucible changes:
Make crutest use BlockIO trait instead of a Guest (#1452)
Use new syncfs syscall (#1427)
Increment write backpressure before deferred encryption (#1444)
Use RAII handles for backpressure (#1443)
Fine-tuning backpressure clamping, and API cleanups (#1442)
Fix outdated comment (#1447)
Update Rust crate rusqlite to 0.32 (#1418)
Fix write reordering bug (#1448)
Remove `history_file` (#1446)
Remove optionality for `BlockRes` in `DeferredWrite` (#1441)
Propolis changes
instance spec rework: tighten up component naming (#761)
instance spec rework: remove most dependencies on `InstanceSpecV0` from
propolis-server (#757)
fix new 1.81.0 warning and clippy error (#760)
standalone: be more helpful with bad block device configs (#758)
Co-authored-by: Alan Hanson <alan@oxide.computer>
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.
Subnets
SubnetErrorvariant for communicating overlapping addressranges to contain the actual subnet that caused the problem. This can
be used to determine if it was a V4 or V6, client-provided or
auto-generated subnet.
for a subnet if that's been found to overlap with an existing range,
which violates a not-NULL constraint on the
vpc_subnettable. Byinspecting which constraint failed, we can learn which input caused
the issue.