Skip to content

Allow to delete mandatory filesystems#2160

Merged
dgdavid merged 9 commits intoagama-project:masterfrom
ancorgs:delete_root_again
Mar 20, 2025
Merged

Allow to delete mandatory filesystems#2160
dgdavid merged 9 commits intoagama-project:masterfrom
ancorgs:delete_root_again

Conversation

@ancorgs
Copy link
Contributor

@ancorgs ancorgs commented Mar 14, 2025

This is a re-incarnation of #2129, that was automatically closed by Github.

Problem

Agama does not allow to delete the "/" partition nor the drive containing it.

But that was only implemented to hide some limitations of the current UI. In fact, deleting "/" or any other mandatory partition should be allowed. Of course, a proposal without mandatory mount paths is not valid and cannot be computed. But that doesn’t mean the user cannot delete them temporarily in order to create it elsewhere.

Solution

  • Detect and properly report when mandatory partitions are missing.
  • Adapt the UI to not panic (ie. resort to an empty state) when there are configuration errors that can actually be fixed by using the UI.
  • Allow to delete all partitions (including "/").
  • Adapt the "do not use" button of the drives to the new situation

Screenshots

Now the trash-can icon is there for root as well...

avion1

But nothing dramatic happens if the user clicks on it.

avion2

Testing

  • Tested manually
  • Unit tests adapted

Copy link
Contributor

@dgdavid dgdavid left a comment

Choose a reason for hiding this comment

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

Despite adding a few NP comments, I consider this ready to merge if you'd like to do so

import { useConfigErrors } from "~/queries/issues";

const Description = ({ errors }) => {
return (
Copy link
Contributor

Choose a reason for hiding this comment

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

NP: I'm not sure if it should be a list when it is just one issue. But please, do not invest time on it now. This is mostly a comment for taking notes for future rounds of small improvements.

Copy link
Contributor

@dgdavid dgdavid left a comment

Choose a reason for hiding this comment

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

I think it worth addressing @joseivanlopez comments at least.

@ancorgs ancorgs force-pushed the delete_root_again branch from ac8804b to 2adb1d5 Compare March 20, 2025 01:54
@ancorgs
Copy link
Contributor Author

ancorgs commented Mar 20, 2025

Updated to cover all important comments, I hope.

@dgdavid dgdavid merged commit bc0b1ce into agama-project:master Mar 20, 2025
4 checks passed
@imobachgs imobachgs mentioned this pull request Mar 27, 2025
imobachgs added a commit that referenced this pull request Mar 27, 2025
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request Mar 27, 2025
https://build.opensuse.org/request/show/1256469
by user IGonzalezSosa + anag+factory
- Version 13

- Add basic support for creating LVM volume groups and logical
  volumes (gh#agama-project/agama#2216).

- Change switches by checkboxes (gh#agama-project/agama#2168).
- Restructure the encryption form (gh#agama-project/agama#2168).

- Properly handle empty lists of unsupported AutoYaST elements
  (gh#agama-project/agama#2196).

- Stop parsing errors from SCC at frontend side and simply render
  them as returned by the backend (gh#agama-project/agama#2193).

- Stop displaying the hostname alert once the system is registered
  (gh#agama-project/agama#2183).

- Allow temporary removal of the root file system
 (gh#agama-project/agama#2160).
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