-
Bug
-
Resolution: Done
-
Normal
-
None
-
None
-
None
-
5
-
False
-
None
-
False
-
COST-5690 - OpenShift Virtual Machines
-
-
The total memory request and total CPU request are double the expected value, running test_api_ocp_virtual_machines_report_content will result in a failure where those individual totals are expected to have value 17.0, but API returns 34.0
Example API call:
http://localhost:8000/api/cost-management/v1/reports/openshift/resources/virtual-machines/?filter[time_scope_value]=-1&filter[cluster]=ocp_static_cluster_0
Requests total field:
"request": { "cpu": { "value": 34.0, "units": "Core" }, "memory": { "value": 34.0, "units": "GiB" } }
Individual totals for all VMs returned by the API call:
"request": { "cpu": { "value": 6.0, "units": "Core" }, "memory": { "value": 6.0, "units": "GiB" } }
"request": { "cpu": { "value": 6.0, "units": "Core" }, "memory": { "value": 6.0, "units": "GiB" } }
"request": { "cpu": { "value": 5.0, "units": "Core" }, "memory": { "value": 5.0, "units": "GiB" } }
You can see each of those adds up to 17.0 total, but we get this duplicated in the meta total field.
To reproduce, you can run test_api_ocp_virtual_machines_report_content test and see the failure.