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

[sled-agent] Support bundle storage api #6782

Merged
merged 55 commits into from
Nov 25, 2024
Merged

Conversation

smklein
Copy link
Collaborator

@smklein smklein commented Oct 5, 2024

This PR implements raw bundle storage for support bundles.

In the future, I expect that Nexus will invoke these APIs to store and later access portions of storage bundles.

  • Provides an API to create, list, query, and delete support bundles
  • Implements range request support for these APIs

Fixes #1599

range-requests/Cargo.toml Outdated Show resolved Hide resolved
sled-storage/src/manager.rs Outdated Show resolved Hide resolved
sled-storage/src/manager_test_harness.rs Outdated Show resolved Hide resolved
@smklein smklein marked this pull request as ready for review November 20, 2024 01:03
Comment on lines +700 to +703
/// Accesses the [SupportBundleManager] API.
pub(crate) fn as_support_bundle_storage(&self) -> SupportBundleManager<'_> {
SupportBundleManager::new(&self.log, self.storage())
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than directly implementing the support bundle API as part of the Sled Agent, I split it into a different structure to make testing easier.

That's why I'm calling this function in the http_entrypoints

// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

pub mod queries;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI @papertigers - we both used the support_bundle.rs module, so I split your stuff into "queries" and my stuff into "storage". Hopefully the re-organization makes sense?

sled-agent/src/support_bundle/storage.rs Show resolved Hide resolved
Copy link
Contributor

@wfchandler wfchandler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @smklein, just a few small suggestions from me.

sled-agent/src/support_bundle/storage.rs Outdated Show resolved Hide resolved
sled-agent/src/support_bundle/storage.rs Outdated Show resolved Hide resolved
sled-agent/src/support_bundle/storage.rs Outdated Show resolved Hide resolved
sled-agent/src/support_bundle/storage.rs Outdated Show resolved Hide resolved
sled-agent/src/support_bundle/storage.rs Outdated Show resolved Hide resolved
sled-agent/src/support_bundle/storage.rs Show resolved Hide resolved
sled-agent/api/src/lib.rs Outdated Show resolved Hide resolved
sled-agent/api/src/lib.rs Outdated Show resolved Hide resolved
sled-agent/api/src/lib.rs Outdated Show resolved Hide resolved
sled-agent/api/src/lib.rs Outdated Show resolved Hide resolved
smklein added a commit that referenced this pull request Nov 21, 2024
This library is used as a part of
#1599 , I'm pulling it
out of #6782 to help make
the diff smaller.

This PR adds a `range-requests` crate for dropshot-based range requests.

Heavily inspired by @jclulow 's work in
https://github.com/oxidecomputer/buildomat/blob/main/download/src/lib.rs
@smklein
Copy link
Collaborator Author

smklein commented Nov 22, 2024

Thanks for the feedback! All the responses to review comments should be contained within e1e185b

Copy link
Contributor

@wfchandler wfchandler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @smklein!

@smklein smklein merged commit e87ac05 into main Nov 25, 2024
18 checks passed
@smklein smklein deleted the support-bundle-storage-api branch November 25, 2024 20:26
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] Figure out how to store/manage Service Bundles
2 participants