Skip to content

[rack-setup] Lower the per-sled minimum U.2 count to 1 - #11153

Merged
smklein merged 3 commits into
mainfrom
rss-single-u2-sleds
Aug 25, 2026
Merged

smklein merged 3 commits into
mainfrom
rss-single-u2-sleds

Conversation

@smklein

@smklein smklein commented Aug 25, 2026 •

Copy link
Copy Markdown
Collaborator

RSS refused to include a sled in the service plan until it reports at least MINIMUM_U2_COUNT U.2 disks in inventory, retrying indefinitely below that threshold ("Awaiting disks"). This blocks deployments that want compute-heavy sleds carrying a smaller number of U.22.

The value of 3 dates back to December 2022 (#1954, as MINIMUM_ZPOOL_COUNT), when RSS provisioned Crucible datasets itself and needed enough zpools for a 3-way replicated region set. Furthermore, at that time, disks could not be adopted after RSS. This has since been fixed with automated disk adoption.

This PR lowers the threshold of "minimum U.2s during RSS" to 1. The floor stays at 1 rather than 0 because every sled in the plan hosts an NTP zone whose filesystem must be placed on one of the sled's U.2 pools, so a zero-U.2 sled would fail plan generation regardless.

The disk-count check is also extracted from the inventory retry closure into a standalone function so it can be tested directly.

RSS refuses to include a sled in the service plan until it reports at
least MINIMUM_U2_COUNT U.2 disks, retrying inventory collection
indefinitely below that threshold. The value of 3 dates back to when
RSS provisioned Crucible datasets itself and needed enough zpools for a
3-way replicated region set. That responsibility moved to Nexus long
ago, and disks that appear after rack setup are adopted by the
physical_disk_adoption background task and the reconfigurator planner.

Lower the threshold to 1 so that compute-heavy sleds carrying a single
U.2 can be part of rack setup. The floor stays at 1 rather than 0
because every sled in the plan hosts an NTP zone whose filesystem must
be placed on one of the sled's U.2 pools.

This is safe for plan generation on racks with at least
COCKROACHDB_REDUNDANCY (5) sleds: each dataset kind is striped across
consecutive positions of a cycle over all sleds, so no sled receives
two same-kind datasets (which would require two distinct pools) unless
a kind's redundancy count exceeds the sled count.

Also extracts the disk-count check into a testable function and adds
plan generation tests covering single-U.2 and mixed-U.2 racks.
Two positional integer arguments were easy to confuse at call sites;
name them instead.

@hawkw hawkw left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks good, and i like that the tests are now documenting some of the expected properties. Suggested a couple docs edits, a your discretion.

@smklein
smklein merged commit 2c27752 into main Aug 25, 2026
19 checks passed
@smklein
smklein deleted the rss-single-u2-sleds branch August 25, 2026 18:01
iliana pushed a commit that referenced this pull request Aug 27, 2026
iliana pushed a commit that referenced this pull request Aug 27, 2026
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.

2 participants