Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AgamaProposal: fix bug when partitions are searched but not managed #1767

Merged
merged 3 commits into from
Nov 14, 2024

Conversation

ancorgs
Copy link
Contributor

@ancorgs ancorgs commented Nov 14, 2024

Problem

When a drive was configured with an empty search for partitions like this (in which there is no configuration about deleting or resizing the found partitions)...

{
  "storage": {
    "drives": [
      {
        "partitions": [
          { "search": "*" },
          { "filesystem": { "path": "/" } }
        ]
      }
    ]
  } 
} 

...all the matched pre-existing partitions are considered as candidates to be shrunk.

Solution

With this fix, partitions with no actions do not generate any SpaceMaker action.

Bonus

AgamaProposal now returns an exception of type Y2Storage::NoDiskSpaceError when the SpaceMaker fails to find space. That was the documented behavior, but a generic Y2Storage::Error was returned instead.

Testing

  • Added a new unit test
  • Tested manually

@ancorgs ancorgs merged commit bbc9ad2 into agama-project:master Nov 14, 2024
3 checks passed
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