openSUSE / agama

A service-based Linux installer
GNU General Public License v2.0
124 stars 36 forks source link

feat(storage): more accurate info about resizing #1428

Open joseivanlopez opened 5 days ago

joseivanlopez commented 5 days ago

Problem

The information about resizing devices shown by the UI for finding free space is not 100% accurate. Sometimes it allows selecting to resize a device but the device cannot be resized.

Solution

Toggle screenshots ![localhost_8080_ (15)](https://github.com/openSUSE/agama/assets/1112304/e7658c0a-696a-4765-bb13-6ab8be52a334) ![localhost_8080_ (16)](https://github.com/openSUSE/agama/assets/1112304/15f0018a-21ca-4075-b166-4e3e323b7455) ![localhost_8080_ (17)](https://github.com/openSUSE/agama/assets/1112304/80202529-79b7-4231-9fac-01bb99e77b45)
coveralls commented 3 days ago

Coverage Status

coverage: 71.382% (-0.03%) from 71.408% when pulling daadd776ea20b84a29410c9669e0f280205e849a on joseivanlopez:resize-improvements into 7101d0da33974c8eaf31175d07b6c9c23a42a358 on openSUSE:master.

coveralls commented 3 days ago

Coverage Status

coverage: 71.382% (-0.03%) from 71.408% when pulling 12b276cf1bfb327529c579ee0fd6f6e51467b34b on joseivanlopez:resize-improvements into 7101d0da33974c8eaf31175d07b6c9c23a42a358 on openSUSE:master.

coveralls commented 3 days ago

Coverage Status

coverage: 71.382% (-0.03%) from 71.408% when pulling 12b276cf1bfb327529c579ee0fd6f6e51467b34b on joseivanlopez:resize-improvements into 7101d0da33974c8eaf31175d07b6c9c23a42a358 on openSUSE:master.

ancorgs commented 5 hours ago

The rationale (and some historical explanations) for the logic implemented at Storage::Agama::DeviceShrinking comes directly from a couple of big comments I wrote at https://trello.com/c/YWTxEvpu

I would like that content (not necessarily literally) to be somewhere on this pull request. Maybe close to the DeviceShinking code, maybe as a separate file at doc or maybe as part of the PR description. But I think the comments contain a useful historical and logical view that I would like anybody could easily find in the future when reviewing our decisions.

ancorgs commented 5 hours ago

Shouldn't we also honor DeviceShrinking at the proposal settings conversion when :resize is chosen as policy?

I fear that piece of code can generate potentially dangerous :resize actions that wouldn't be accepted if configured manually. Or are we maybe safe because the proposal will ignore those? If that's the case, I would like to at least see a comment about it.

joseivanlopez commented 3 hours ago

Shouldn't we also honor DeviceShrinking at the proposal settings conversion when :resize is chosen as policy?

I fear that piece of code can generate potentially dangerous :resize actions that wouldn't be accepted if configured manually. Or are we maybe safe because the proposal will ignore those? If that's the case, I would like to at least see a comment about it.

I fear we are not safe in all scenarios. For example, I was able to resize a device with closed LUKS.

coveralls commented 1 hour ago

Coverage Status

coverage: 71.389% (-0.02%) from 71.408% when pulling a4a9436e0023210002969eb7abf7e05f6e703abc on joseivanlopez:resize-improvements into 05e796383f20d65f7752c180315074017b32f4ba on openSUSE:master.