← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1907133] Re: Misleading simple usage API documentation

 

** Changed in: nova
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1907133

Title:
  Misleading simple usage API documentation

Status in OpenStack Compute (nova):
  Fix Released

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

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1907133/+subscriptions



References