Bug 1809573 - The "Desired Capacity" field in Custom partitioning works unexpectedly
Summary: The "Desired Capacity" field in Custom partitioning works unexpectedly
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 33
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Vladimír Slávik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-03 12:39 UTC by Lukas Ruzicka (Red Hat)
Modified: 2021-04-30 07:41 UTC (History)
8 users (show)

Fixed In Version: anaconda-34.5-1
Clone Of:
Environment:
Last Closed: 2021-04-30 07:41:15 UTC
Type: Bug
Embargoed:
rlemosor: mirror+


Attachments (Terms of Use)
Video (3.09 MB, application/x-matroska)
2020-03-03 12:39 UTC, Lukas Ruzicka (Red Hat)
no flags Details

Description Lukas Ruzicka (Red Hat) 2020-03-03 12:39:38 UTC
Created attachment 1667186 [details]
Video

Description of problem:

In Anaconda, when I want to use Custom partitioning, I arrive into unexpected behaviour of the "Desired Capacity" field. The field looks that it only accepts certain values (a size number + size unit => 10 GiB), but it does not complain when I use the number followed by the % sign. However, it does not calculate the exact number value using the % (as fdisk would) and it directly changes the value to MiB. So, instead of 100%, I am getting 100 MiB.

Previously, I have used the "100%" string to ask for the maximum size of the partition available on the rest of the disk and it seemed to work. Other use cases to achieve the same were to leave the field empty (does not work anymore), or to enter an unrealistically high number and it changed to the maximum possible (still works).

Please, see the attached video for the behaviour.

Version-Release number of selected component (if applicable):

Anaconda in 20200225.n.0 compose.

How reproducible:

Always

Steps to Reproduce:
1. Go to Custom partitioning.
2. Delete everything.
3. Choose Standard partitions.
4. Delete swap.
5. Try to resize root to the maximum size.

Actual results:

See above.

Expected results:

Most happy, I would be, if it accepted the % and it would calculate the percentage of the available free space.
Alternatively, do not accept anything else than just number + unit and never convert percentages into MiB or anything else.


Additional info:

Comment 1 Vladimír Slávik 2020-04-29 12:07:25 UTC
At the moment, anything that is invalid is silently ignored, which sets up wrong expectations for what the widget accepts.

Given that it's unclear how to calculate the % and very complicated to actually get the numbers, the fix is to display a warning: https://github.com/rhinstaller/anaconda/pull/2480

Comment 2 Ben Cotton 2020-08-11 15:26:52 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 33 development cycle.
Changing version to 33.

Comment 3 Vladimír Slávik 2020-09-14 09:17:59 UTC
PR with fix merged for rawhide (34) branch: https://github.com/rhinstaller/anaconda/pull/2480


Note You need to log in before you can comment on or make changes to this bug.