Skip to content

UI: handle reused MD RAIDs that are already included in the configuration#2346

Merged
joseivanlopez merged 35 commits intoagama-project:masterfrom
ancorgs:raid_editor
May 23, 2025
Merged

UI: handle reused MD RAIDs that are already included in the configuration#2346
joseivanlopez merged 35 commits intoagama-project:masterfrom
ancorgs:raid_editor

Conversation

@ancorgs
Copy link
Contributor

@ancorgs ancorgs commented May 8, 2025

Problem

If a storage configuration includes reusing an existing MD RAID device, such a device is not displayed at the Agama configuration UI. But actually that case is not so different from using a disk.

Solution

This extends the component ConfigEditor to also display reused MD RAIDs, offering the same capabilities that are there for disks (like creating partitions or defining what to do with the existing ones).

md0b

md0a

This does not offer any possibility to remove the RAID from the configuration or to add a new RAID. It only works with RAIDs that are already present at the loaded configuration.

Implementation notes

Some of the pre-existing components like DriveEditor, SpacePolicySelection or PartitionsPage use the old queries at config-model.ts to communicate with the backend. Something that is deprecated in favor of https://gist.github.com/joseivanlopez/a8d1e4269e6f1c8d41837dfd89fb556d?permalink_comment_id=5569616

This pull request gives several steps on the agreed direction, but a few inner components still use the old approach.

Testing

  • Tested manually
  • Backend tests reorganized and expanded
  • Frontend tests updated

@ancorgs ancorgs force-pushed the raid_editor branch 3 times, most recently from ed965a3 to 2fa4c48 Compare May 15, 2025 11:32
@coveralls
Copy link

coveralls commented May 15, 2025

Coverage Status

coverage: 62.794% (-0.2%) from 63.008%
when pulling 8e6e5ce on ancorgs:raid_editor
into 9116f0e on agama-project:master.

@ancorgs ancorgs changed the title Raid editor UI: handle reused MD RAIDs that are already included in the configuration May 15, 2025
@ancorgs ancorgs marked this pull request as ready for review May 22, 2025 14:08
@joseivanlopez
Copy link
Contributor

joseivanlopez commented May 22, 2025

As discussed in a meeting, we will adapt the storage editor components (e.g., DriveEditor) to receive a list and an index instead of a device object. This will allow to:

  • Simplify the model types (list and listIndex properties are not needed).
  • All the components work in a similar way (DriveEditor, PartitionPage, etc). They receive a list and an index and each component retrieves the device from the model if needed.
  • The components always have the needed info for generating an url.
  • The partitions and logical volumes can also be referenced by an index, so it opens the door to have partitions and lvs without a mount path.

These changes will be done once we need to allow creating partitions without a mount path (e.g., for manually creating physical volumes).

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

@joseivanlopez joseivanlopez merged commit c1c4e96 into agama-project:master May 23, 2025
7 checks passed
@imobachgs imobachgs mentioned this pull request May 26, 2025
imobachgs added a commit that referenced this pull request May 26, 2025
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request May 27, 2025
https://build.opensuse.org/request/show/1280489
by user IGonzalezSosa + anag_factory
- Version 15

- Proper handling of WebSocket secure connections (gh#agama-project/agama#2391):
  - "agama monitor" does not use "insecure" by default.
  - Do not encrypt the connection when using ws: URLs.

- Cache progress reporting to avoid blocking the clients
  (gh#agama-project/agama#2389).

- Update schema of the storage model (gh#agama-project/agama#2346).

- Provide software conflicts HTTP API (gh#agama-project/agama#2348)

- Cache issues to avoid blocking the clients
  (gh#agama-project/agama#2379).

- Cache the software configuration and products in the web server,
  the software backend is blocked during package installation
  (bsc#1241208)

- Add support for bridge connections (gh#agama-project/agama#2258).

- Do not crash when network events do not contain "addresses",
  "nameserver
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request May 27, 2025
https://build.opensuse.org/request/show/1280475
by user IGonzalezSosa + anag_factory
- Version 15

- Handle reused MD RAIDs that are already included at the storage
  configuration (gh/agama-project/agama#2346).

- Allow to resolve in web UI software conflicts
  (gh#agama-project/agama#2348)

- Do not crash when navigating to a Wi-Fi network (bsc#1243415)

- Keep margin between sidebar and main content in all breakpoints
  (gh/agama-project/agama#2370).

- Rework the installer l10n settings (gh#agama-project/agama#2359):
  - Improve discoverability of language and keyboard layout settings.
  - Add contextual messages to help users differentiate between
    installer and product localization settings.
  - Add the ability to reuse installer settings for the product
    to install.
  - In local connections, keyboard layout change is now available
    directly from modal dialog
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