You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Account for Crucible Agent reservation overhead (#7885)
When creating a region's dataset, the Crucible Agent will include a
reservation 25% larger than the region's size to account for on-disk
overhead (storing encryption contexts and other metadata). Nexus does
not take this overhead into account when computing `size_used` for
crucible_dataset rows, or when allocating regions. This leads to the
scenario where Nexus thinks there's enough room for a region but the
Agent will fail to create the dataset due to not having enough space for
the reservation to succeed.
Fix this: add a reservation factor column to the Region model, and
account for this when performing region allocation and when computing
the `size_used` column for crucible datasets.
This commit also adds an upgrader that will set all currently allocated
Region's reservation factor to 1.25, and recompute all the `size_used`
values for all non-deleted crucible datasets. This may lead to
`size_used` being greater than the pool's total_size - a follow up
commit will add an omdb command to identify these cases, and identify
candidate regions to request replacement for in order to remedy this.
The `regions_hard_delete` function now uses this upgrader's CTE to set
`size_used` for all crucible datasets at once, instead of in a for loop
during an interactive transaction.
0 commit comments