Skip to content

Fix an error allocating partitions within RAIDs#2854

Merged
ancorgs merged 4 commits intoSLE-16from
bug_partitioned_raid
Nov 7, 2025
Merged

Fix an error allocating partitions within RAIDs#2854
ancorgs merged 4 commits intoSLE-16from
bug_partitioned_raid

Conversation

@ancorgs
Copy link
Copy Markdown
Contributor

@ancorgs ancorgs commented Nov 7, 2025

Problem

During some manual testing, @tacerus found a pretty serious bug in the Agama storage proposal.

When distributing several partitions over several new MD RAIDs, it may happen that Agama locates some of those partitions in the WRONG RAID DEVICE!

That happened because Agama tried to optimize the size distribution of those partitions, but in the process it ignored a very basic constraint: the exact RAID in which those partitions should be created.

Solution

Honor the relationship between new MDs and its partitions.

Testing

Unit tests included

@ancorgs ancorgs force-pushed the bug_partitioned_raid branch 3 times, most recently from 53261be to 955eee4 Compare November 7, 2025 14:45
@ancorgs ancorgs changed the title y2storage: Test-case showcasing a serious MD bug Fix an error allocating partitions within RAIDs Nov 7, 2025
@ancorgs ancorgs force-pushed the bug_partitioned_raid branch from cb75b43 to 4279d2c Compare November 7, 2025 15:09
@ancorgs ancorgs marked this pull request as ready for review November 7, 2025 15:09
Copy link
Copy Markdown
Contributor

@joseivanlopez joseivanlopez left a comment

Choose a reason for hiding this comment

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

LGTM

@ancorgs ancorgs merged commit 3b5eef8 into SLE-16 Nov 7, 2025
13 checks passed
@ancorgs ancorgs deleted the bug_partitioned_raid branch November 7, 2025 15:34
ancorgs added a commit that referenced this pull request Nov 12, 2025
This is a merge of #2854 into the master branch.

**Bonus:** This also includes a change in one of the existing tests to
make it more robust. See the comment below.
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