Bug 1809573

Summary: The "Desired Capacity" field in Custom partitioning works unexpectedly
Product: [Fedora] Fedora Reporter: Lukas Ruzicka (Red Hat) <lruzicka>
Component: anacondaAssignee: Vladimír Slávik <vslavik>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 33CC: anaconda-maint-list, jkonecny, jonathan, kellin, vanmeeuwen+fedora, vponcova, vslavik, wwoods
Target Milestone: ---Flags: rlemosor: mirror+
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: anaconda-34.5-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-30 07:41:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Video none

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