Bug 893936 - RFE: domain: accept floats in memory size XML
Summary: RFE: domain: accept floats in memory size XML
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-10 10:15 UTC by David Jaša
Modified: 2020-11-03 16:37 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-03 16:37:48 UTC
Embargoed:


Attachments (Terms of Use)

Description David Jaša 2013-01-10 10:15:23 UTC
Description of problem:
from http://libvirt.org/formatdomain.html:
"However, the value will be rounded up to the nearest kibibyte by libvirt, ..."

if rounding indeed is already present in the code path, libvirt could round floating point number equally well as integer. As a result, one could write <memory units="GiB">1.5</memory> instead of <memory units="MiB">1536</memory> for example.

Version-Release number of selected component (if applicable):
libvirt-0.10.2-14.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. change memory in domain xml to <memory units="GiB">1.5</memory>
2.
3.
  
Actual results:
libvirt doesn't accept the XML

Expected results:
libvirt should accept the XML and convert it to <memory unit='KiB'>1572864</memory> (or <memory unit='MiB'>1536</memory> if bug 893933 gets implemented)

Additional info:

Comment 1 Daniel Berrangé 2020-11-03 16:37:48 UTC
Thank you for reporting this issue to the libvirt project. Unfortunately we have been unable to resolve this issue due to insufficient maintainer capacity and it will now be closed. This is not a reflection on the possible validity of the issue, merely the lack of resources to investigate and address it, for which we apologise. If you none the less feel the issue is still important, you may choose to report it again at the new project issue tracker https://gitlab.com/libvirt/libvirt/-/issues The project also welcomes contribution from anyone who believes they can provide a solution.


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