-
Notifications
You must be signed in to change notification settings - Fork 47
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
Conversation
55242ca
to
f4a2eac
Compare
f4a2eac
to
2e00031
Compare
2e00031
to
5dd4e2b
Compare
97388e9
to
c583677
Compare
c583677
to
ce5d46b
Compare
# @param config [Agama::Storage::Configs::Partition] | ||
# @return [Boolean] | ||
def grow?(device, config) | ||
return false unless config.size |
There was a problem hiding this comment.
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| |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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.
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).
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