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: handle resize of partitions #1599

Merged
merged 7 commits into from
Sep 20, 2024

Conversation

ancorgs
Copy link
Contributor

@ancorgs ancorgs commented Sep 12, 2024

joseivanlopez#1 documented the approach to follow for resizing partitions at Agama, based on the partitioning config (a.k.a. the "profile").

The current pull request implements the basis of the described management.

It depends on the improvements introduced at yast2-storage-ng by yast/yast-storage-ng#1388

Pending

Some aspects of partition growing are not fully handled. That's planned for a future iteration and documented at https://trello.com/c/opInsicQ/531-storage-profile-partition-growing

@ancorgs ancorgs force-pushed the auto_resize branch 3 times, most recently from 55242ca to f4a2eac Compare September 18, 2024 15:13
@ancorgs ancorgs changed the title Some draft stuff for handling resize of partitions AgamaProposal: handle resize of partitions Sep 20, 2024
@ancorgs ancorgs marked this pull request as ready for review September 20, 2024 13:40
# @param config [Agama::Storage::Configs::Partition]
# @return [Boolean]
def grow?(device, config)
return false unless config.size
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 would say #size cannot be nil.

size_config.min = size
size_config.max = size
end
config.size = Agama::Storage::Configs::Size.new.tap do |size_config|
Copy link
Contributor

Choose a reason for hiding this comment

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

This will not be needed thanks to the solvers introduced by #1617. BTW, in general I am trying to generate configs from JSON hashes. I think it makes the tests easier to read and maintain.

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

@coveralls
Copy link

Coverage Status

coverage: 71.979% (+0.03%) from 71.951%
when pulling ce5d46b on ancorgs:auto_resize
into 574a1a5 on openSUSE:master.

@ancorgs ancorgs merged commit 484fa9c into agama-project:master Sep 20, 2024
2 of 3 checks passed
ancorgs added a commit that referenced this pull request Sep 22, 2024
yast/yast-storage-ng#1388 introduced a change in
the API of Y2Storage.

Agama was adapted at #1599, but one particular conversion was left
behind.

This PR fixes that omission.
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this pull request Sep 23, 2024
https://build.opensuse.org/request/show/1202592
by user IGonzalezSosa + anag+factory
- Storage: preliminary support for resizing partitions based on
  limits specified at the config (gh#agama-project/agama#1599).

- Version 10

- Storage: add support for creating LVM volume groups and logical
  volumes (gh#agama-project/agama#1581).
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