[1/3] Decouple support bundle inner layer from Nexus management#10374
Draft
[1/3] Decouple support bundle inner layer from Nexus management#10374
Conversation
Replaces `BundleCollection.bundle: SupportBundle` with a slim
`BundleInfo { id, reason_for_creation }`. Moves the sled-storage
chunked transfer (`store_bundle_on_sled`), zip helpers
(`bundle_to_zipfile`, `recursively_add_directory_to_zipfile`,
`sha2_hash`), the `CHUNK_SIZE` and `TEMPDIR` constants, and the
DB-polling cancellation (`check_for_cancellation`) out of the inner
`support_bundle/` module and into `support_bundle_collector.rs`.
After this change the inner layer is a pure mechanism: it never reads
the `support_bundle` DB row, never talks to a sled-agent's bundle
storage endpoints, and treats CRDB only as a source of facts about
sleds, ereports, and blueprints. The outer collector remains the
manager of the bundle lifecycle.
This is the first step toward a future shared crate that omdb can use
to collect bundles when Nexus is down.
d293556 to
1afa67a
Compare
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
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.
Replaces
BundleCollection.bundle: SupportBundlewith a slimBundleInfo { id, reason_for_creation }. Moves the sled-storage chunked transfer (store_bundle_on_sled), zip helpers (bundle_to_zipfile,recursively_add_directory_to_zipfile,sha2_hash), theCHUNK_SIZEandTEMPDIRconstants, and the DB-polling cancellation (check_for_cancellation) out of the innersupport_bundle/module and intosupport_bundle_collector.rs.After this change the inner layer is a pure mechanism: it never reads the
support_bundleDB row, never talks to a sled-agent's bundle storage endpoints, and treats CRDB only as a source of facts about sleds, ereports, and blueprints. The outer collector remains the manager of the bundle lifecycle.This is the first step toward a future shared crate that omdb can use to collect bundles when Nexus is down.