Skip to content
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

[nexus] Manage datasets via reconfigurator #6229

Merged
merged 139 commits into from
Oct 30, 2024
Merged

Conversation

smklein
Copy link
Collaborator

@smklein smklein commented Aug 6, 2024

This PR makes the blueprint aware of datasets, and manages them as a part of planning and execution.

As a part of the planning phase: the reconfigurator ensures that all in-service disks have debug / zone root datasets, and that all zones have the corresponding datasets they need to function. Additionally, unused datasets are marked as "expunged" until they are gone from the database, at which point they're fully deleted from the blueprint.

As a part of the execution phase: the reconfigurator ensures that database records exist for these datasets, and requests them from appropriate sled agents. Additionally, "expunged" datasets are removed from the database explicitly.

Fixes #6043
Fixes #6107

smklein added a commit that referenced this pull request Oct 1, 2024
Building off of:

-
#6229 (comment)
- #6694
- https://github.com/oxidecomputer/sqldance

This PR acknowledges that `SELECT FOR UPDATE` is a performance
"optimization" in the situation where a blueprint's value is checked
before performing a subsequent operation, as we do with setting network
resources. It arguably could make performance worse in certain cases, as
it locks out concurrent read operations from accessing the database.

This PR removes the usage of `SELECT FOR UPDATE`, and significantly
overhauls the `test_ensure_external_networking_bails_on_bad_target` test
to account for the concurrent control that CockroachDB may be performing
with respect to operation re-ordering.

---------

Co-authored-by: John Gallagher <[email protected]>
hawkw pushed a commit that referenced this pull request Oct 2, 2024
Building off of:

-
#6229 (comment)
- #6694
- https://github.com/oxidecomputer/sqldance

This PR acknowledges that `SELECT FOR UPDATE` is a performance
"optimization" in the situation where a blueprint's value is checked
before performing a subsequent operation, as we do with setting network
resources. It arguably could make performance worse in certain cases, as
it locks out concurrent read operations from accessing the database.

This PR removes the usage of `SELECT FOR UPDATE`, and significantly
overhauls the `test_ensure_external_networking_bails_on_bad_target` test
to account for the concurrent control that CockroachDB may be performing
with respect to operation re-ordering.

---------

Co-authored-by: John Gallagher <[email protected]>
@smklein
Copy link
Collaborator Author

smklein commented Oct 29, 2024

Rebased and passing all tests - happy to take another pass here with folks as that would be useful.

@smklein smklein merged commit 8bd3149 into main Oct 30, 2024
18 checks passed
@smklein smklein deleted the nexus-requests-datasets branch October 30, 2024 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants