Skip to content

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sled Agent: Allow the setting of quotas and reservations on datasets Cleanup: Use explicit dataset request API to request zone datasets

4 participants