Skip to content

[nexus][support-bundles] Avoid looking at expunged datasets, zones#7325

Open
smklein wants to merge 3 commits into
mainfrom
bundles-dont-use-expunged-things
Open

[nexus][support-bundles] Avoid looking at expunged datasets, zones#7325
smklein wants to merge 3 commits into
mainfrom
bundles-dont-use-expunged-things

Conversation

@smklein

@smklein smklein commented Jan 8, 2025

Copy link
Copy Markdown
Collaborator

This PR avoids accessing expunge zones and datasets from support bundle datastore methods. Instead,
it opts to read all valid {zones,datasets}, and consider everything not in that set as "in-need of replacement".

This means that expunged and pruned {zones,datasets} will both be treated the same. Added a test for this
behavior with a dataset that gets fully removed, skipping the expungement stage.

Fixes #7319

Comment thread schema/crdb/dbinit.sql
CREATE UNIQUE INDEX IF NOT EXISTS one_bundle_per_dataset ON omicron.public.support_bundle (
dataset_id
);
) WHERE dataset_id IS NOT NULL;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is necessary to avoid a full-table scan

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.

support_bundle_fail_expunged should not look at expunged datasets, zones

1 participant