Misleading simple usage API documentation

Bug #1907133 reported by Rafael Weingartner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Rafael Weingartner

Bug Description

Description
===========

Nova's `os-simple-tenant-usage` has the following statement.

```
Reports usage statistics of compute and storage resources periodically for an individual tenant or all tenants. The usage statistics will include all instances’ CPU, memory and local disk during a specific period.

```

To some people, when reading that, they might get the understanding that the `os-simple-tenant-usage` will report the actual use of resources. Therefore, if a VM is stopped and then started back again, it (the `os-simple-tenant-usage`) would only report the time the VM has been up and running. However, that is not what happens. The `os-simple-tenant-usage` reports the time that a virtual machine (VM) exists in the cloud environment. Therefore, actions such as pause, suspend, and stop do not affect the usage accounting.

This might be a problem for people using this API for billing, or for people that use other systems (e.g. CloudKitty) for billing. End-users might try to cross-check the data from the billing from CloudKitty for instance, with the usage report found in Horizon that uses this API, and the numbers will not add up, as people might only consider the time a VM has been up and running to charge users in CloudKitty.

An extension was proposed in [1], to allow operators to customize the usage accounting. However, during a meeting with the community [2], the extension was rejected for two reasons:

* Nova tries to avoid using config driven APIs. Meaning, APIs that change the response according to server-side configurations;
* The community has decided to get rid of usage and billing accounting in Nova.

Having said that, we would like to propose a documentation amendment. The idea is to explicitly say for users/operators that the simple usage API only considers the time that the VM existed in the cloud for the accounting, and not the actual time it has been up and running. This will save some misunderstanding and misuse of the API data.

References
===========
[1] https://review.opendev.org/c/openstack/nova/+/711113
[2] http://eavesdrop.openstack.org/meetings/nova/2020/nova.2020-12-03-16.00.log.txt

Tags: api doc
Changed in nova:
assignee: nobody → Rafael Weingartner (rafaelweingartner)
Revision history for this message
melanie witt (melwitt) wrote :
tags: added: api doc
Changed in nova:
importance: Undecided → Low
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 23.0.0.0rc1

This issue was fixed in the openstack/nova 23.0.0.0rc1 release candidate.

melanie witt (melwitt)
Changed in nova:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.