Skip to content

Conversation

@ancorgs
Copy link
Contributor

@ancorgs ancorgs commented May 23, 2025

This replaces ancorgs#3 (I was not able to re-target it to the proper repository)

Problem

Right now a configuration error is reported if storage.boot.device points to an entry at mdRaids.

A configuration like this:

{
  "storage":  {
    "mdRaids": [
        {
           "search":     { "max": 1 },
           "alias":      "raid",
           "partitions": [
              { "search": "*", "delete": true },
              { "filesystem": { "path": "/" } }
           ]
         }
    ],
    "boot":    { "configure": true, "device": "raid" }
  }
}

...resulted in the error "There is no boot device with alias 'raid'".

Solution

Honor the mentioned setting if the mdRaid entry corresponds to a pre-existing RAID device. Since the configuration is explicit, is the user responsibility to choose a RAID that actually boots.

Testing

  • Extended unit tests for the configuration
  • Added a new unit test for the proposal that proves it really does the job if the RAID exists beforehand.

Not working

If the entry at mdRaids corresponds to a new RAID that will be created during the proposal, then the configuration will be accepted but the proposal will not use the new RAID to allocate the boot partitions. That's kind of expected given the nature of the proposal.

Tracked at https://trello.com/c/yuLVe1BR/1585-storage-check-whether-it-makes-sense-to-selecti-a-new-raid-as-boot-device

@coveralls
Copy link

coveralls commented May 23, 2025

Coverage Status

coverage: 62.732%. remained the same
when pulling 2bc652e on ancorgs:explicit_boot_raid_upstream
into c1c4e96 on agama-project:master.

Copy link
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.

I miss a changelog entry. Other than that, it looks good.

Copy link
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 4e3ccb2 into agama-project:master May 23, 2025
4 checks passed
@imobachgs imobachgs mentioned this pull request May 26, 2025
imobachgs added a commit that referenced this pull request May 26, 2025
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.

3 participants