Skip to content

virtual-machine memory always rounds down #10445

@eric-eisenhart

Description

@eric-eisenhart

NetBox version

v3.3.1

Python version

3.9

Steps to Reproduce

  1. Create a virtual-machine
  2. Edit memory to a number that isn't an even multiple of 1024, such as "2045", "2560", or "4095"
  3. Save and view the virtual-machine

Expected Behavior

Memory should display as a more reasonably rounded number or include a single digit after the decimal.

For 2045MB, any of "2.0 GB" or "2 GB" would be better.

For 4095MB, any of "4.0 GB" or "4 GB" would be better.

For 2560MB, either "2.5 GB" or "3 GB" would be an improvement over "2 GB".

Observed Behavior

A number rounded down by as much as 1023 is displayed:

  • 2047 MB = "1 GB"
  • 4095 MB = "3 GB"
  • 2560 MB = "2 GB"

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions