Bug 2263871

Summary: Cockpit storage: changing unit with a value already entered causes the value to be multiplied or divided appropriately, but the change is not shown in the UI (results are very surprising to the user)
Product: [Fedora] Fedora Reporter: Kamil Páral <kparal>
Component: cockpitAssignee: Martin Pitt <mpitt>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: anaconda-maint, awilliam, gmarr, kkoukiou, mmarusak, mpitt, mvollmer, patrick, robatino, stefw, vslavik, w
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: AcceptedBlocker
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-02-16 12:04:01 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:
Bug Depends On:    
Bug Blocks: 2187792    
Attachments:
Description Flags
bug screencast
none
anaconda.log
none
program.log
none
storage.log none

Description Kamil Páral 2024-02-12 14:01:39 UTC
Description of problem:
In Anaconda webUI storage configuration, when I want to create a 1 MB biosboot partition, it creates a 999 MB partition instead. 

Version-Release number of selected component (if applicable):
Fedora-Workstation-Live-x86_64-Rawhide-20240211.n.0.iso
anaconda-40.21-2.fc40.x86_64
anaconda-core-40.21-2.fc40.x86_64
anaconda-gui-40.21-2.fc40.x86_64
anaconda-install-env-deps-40.21-2.fc40.x86_64
anaconda-live-40.21-2.fc40.noarch
anaconda-tui-40.21-2.fc40.x86_64
anaconda-webui-5.2-1.fc40.noarch
anaconda-widgets-40.21-2.fc40.x86_64
cockpit-bridge-310.2-1.fc40.x86_64
cockpit-storaged-310.2-1.fc40.noarch
cockpit-system-310.2-1.fc40.noarch
cockpit-ws-310.2-1.fc40.x86_64


How reproducible:
always

Steps to Reproduce:
1. run anaconda with a clean disk
2. go to storage configuration, create a new partition
3. select biosboot type, 1 MB size
4. see that 999 MB partition was created

Comment 1 Kamil Páral 2024-02-12 14:03:18 UTC
Created attachment 2016461 [details]
bug screencast

Comment 2 Kamil Páral 2024-02-12 14:03:58 UTC
Created attachment 2016462 [details]
anaconda.log

Comment 3 Kamil Páral 2024-02-12 14:04:03 UTC
Created attachment 2016463 [details]
program.log

Comment 4 Kamil Páral 2024-02-12 14:04:07 UTC
Created attachment 2016464 [details]
storage.log

Comment 5 Kamil Páral 2024-02-12 14:06:12 UTC
Proposing as a F40 Beta blocker:
"When using both the installer-native and the blivet-gui-based custom partitioning flow, the installer must be able to: 
Assign sizes to newly-created storage volumes and containers"
https://fedoraproject.org/wiki/Fedora_40_Beta_Release_Criteria#Custom_partitioning

Comment 6 Marius Vollmer 2024-02-12 14:36:05 UTC
> In Anaconda webUI storage configuration, when I want to create a 1 MB biosboot partition, it creates a 999 MB partition instead. 

Yes, this is very likely fixed by https://github.com/cockpit-project/cockpit/pull/19929.

Thanks!

Comment 7 Geoffrey Marr 2024-02-13 16:16:29 UTC
Discussed during the 2024-02-12 blocker review meeting: [0]

The decision to classify this bug as an "AcceptedBlocker (Beta)" was made as it violates the following criterion:

"When using both the installer-native and the blivet-gui-based custom partitioning flow, the installer must be able to: Assign sizes to newly-created storage volumes and containers". 

Technically it can do that, but not in a way that makes any sense to a user. We are considering cockpit to be the 'installer-native' custom partitioning flow for current Workstation live images.

[0] https://meetbot.fedoraproject.org/blocker-review_matrix_fedoraproject-org/2024-02-12/f40-blocker-review.2024-02-12-17.05.txt

Comment 8 Marius Vollmer 2024-02-13 18:16:52 UTC
There is one more wrinkle, unfortunately: Something in the storage stack causes a partition to be about 1 Mb smaller than requested.  So trying to make a 1 MB partition ends up with a 512 byte partition... This needs fixing as well for biosboot partitions, but probably doesn't impact normal multi-GB partitions signifcantly.

Comment 9 Kamil Páral 2024-02-15 12:35:03 UTC
(In reply to Marius Vollmer from comment #8)
> There is one more wrinkle, unfortunately: Something in the storage stack
> causes a partition to be about 1 Mb smaller than requested.

Thanks, I reported that as bug 2264412.

Comment 10 Kamil Páral 2024-02-16 12:04:01 UTC
In my testing, this seems resolved in Fedora-Workstation-Live-x86_64-40-20240216.n.0.iso.