-
Notifications
You must be signed in to change notification settings - Fork 42
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
allocate external IPs previously used by expunged zones #6483
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the more detailed investigation and fix!
having looked through the reconfigurator preparation code it seems like the planning input from the database contains all external IP addresses ever assigned to services.
This is a little surprising to me, but I think in the production path this should work as expected. Planning input is constructed via inspecting the database, and the blueprint executor deletes external IP records for expunged zones. I would not be surprised if many tests don't bother to do the DB cleanup we do in reality.
Ah, I didn't notice that we were deleting external IP records. But yes, this should work in production regardless. The number of tests that were impacted by doing it the "right" way were pretty small, so I might look into fixing them instead of this approach. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, that is much less painful than I expected!
Closes #6260. The test I've written successfully fails when the change to `BuilderExternalNetworking::new` is backed out.
The "Check the planning input" block of code needs to consider _all_ zones in the parent blueprint, including expunged zones. #6483 fixed the planner's ability to reuse external IPs from expunged zones, but accidentally made these checks incorrect, because it's certainly valid for the planning input to still have records for expunged zones. See #6581 (comment) for more context. We also get to remove the somewhat-awkward update_network_resources_from_blueprint() test helper that was needed in #6483 to make some tests pass (because we didn't realize the checks being performed here were wrong).
The "Check the planning input" block of code needs to consider _all_ zones in the parent blueprint, including expunged zones. #6483 fixed the planner's ability to reuse external IPs from expunged zones, but accidentally made these checks incorrect, because it's certainly valid for the planning input to still have records for expunged zones. See #6581 (comment) for more context. We also get to remove the somewhat-awkward update_network_resources_from_blueprint() test helper that was needed in #6483 to make some tests pass (because we didn't realize the checks being performed here were wrong).
…ng (#6599) The "Check the planning input" block of code needs to consider _all_ zones in the parent blueprint, including expunged zones. #6483 fixed the planner's ability to reuse external IPs from expunged zones, but accidentally made these checks incorrect, because it's certainly valid for the planning input to still have records for expunged zones. See #6581 (comment) for more context. We also get to remove the somewhat-awkward `update_network_resources_from_blueprint()` test helper that was needed to make some tests pass (because we didn't realize the checks being performed here were wrong).
…rds (#6742) Recapping from the update sync: * #6483 moved the code restored by this PR into a helper method (`update_network_resources_from_blueprint()`), and also added calls to that method to a handful of tests to make them pass * In the external DNS work, we discovered that those tests should not have needed that, and the reason they did was because of a different bug * #6599 fixed that bug and removed `update_network_resources_from_blueprint()` and all its callers, but neglected to restore this code, meaning the `PlanningInput`s our tests create from their initial system descriptions never had any external networking records
…rds (#6742) Recapping from the update sync: * #6483 moved the code restored by this PR into a helper method (`update_network_resources_from_blueprint()`), and also added calls to that method to a handful of tests to make them pass * In the external DNS work, we discovered that those tests should not have needed that, and the reason they did was because of a different bug * #6599 fixed that bug and removed `update_network_resources_from_blueprint()` and all its callers, but neglected to restore this code, meaning the `PlanningInput`s our tests create from their initial system descriptions never had any external networking records
Closes #6260.
When applying the change suggested in that issue, some tests fail because the IPs in the planning input are no longer considered "seen". This might be due to tests not cleaning up the planning input between changes, but having looked through the reconfigurator preparation code it seems like the planning input from the database contains all external IP addresses ever assigned to services.The test I've written successfully fails when the change to
BuilderExternalNetworking::new
is backed out.