yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #85107
[Bug 1915055] [NEW] launched_at's reset when resizing/reverting and unshelving impacts "openstack usage show"
Public bug reported:
environment: devstack-master stacked Jan 28th 2021
The "openstack usage show" commands provide metrics related to run time of the instance, as seen below:
+---------------+----------+
| Field | Value |
+---------------+----------+
| CPU Hours | 260.68 |
| Disk GB-Hours | 260.68 |
| RAM MB-Hours | 66733.63 |
| Servers | 3 |
+---------------+----------+
The logic in [0] determines how those values are calculated. They are
based on the launched_at and terminated_at fields.
Some operations, such as resize and unshelve, reset the launched_at
field. Therefore, for a given instance, the run time information is
wiped, as if it had never run before.
Steps to reproduce:
1. Create an instance.
2. Wait a few minutes, start monitoring usage with "watch openstack usage show --project admin" on a separate tab.
3. Either shelve and unshelve an instance, or resize the instance and revert the resize.
4. Notice how the "openstack usage show" statistics suddenly drops to a lower value and then continues to increase.
Expected result:
Statistics would not drop, should continue measuring.
Some possible solutions:
1. Stop resetting the launched_at field
2. Change the field used for calculation at [0] to something else (maybe created_at?)
[0]
https://github.com/openstack/nova/blob/6c0ceda3659405149b7c0b5c283275ef0a896269/nova/api/openstack/compute/simple_tenant_usage.py#L74
** Affects: nova
Importance: Undecided
Status: New
--
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/1915055
Title:
launched_at's reset when resizing/reverting and unshelving impacts
"openstack usage show"
Status in OpenStack Compute (nova):
New
Bug description:
environment: devstack-master stacked Jan 28th 2021
The "openstack usage show" commands provide metrics related to run time of the instance, as seen below:
+---------------+----------+
| Field | Value |
+---------------+----------+
| CPU Hours | 260.68 |
| Disk GB-Hours | 260.68 |
| RAM MB-Hours | 66733.63 |
| Servers | 3 |
+---------------+----------+
The logic in [0] determines how those values are calculated. They are
based on the launched_at and terminated_at fields.
Some operations, such as resize and unshelve, reset the launched_at
field. Therefore, for a given instance, the run time information is
wiped, as if it had never run before.
Steps to reproduce:
1. Create an instance.
2. Wait a few minutes, start monitoring usage with "watch openstack usage show --project admin" on a separate tab.
3. Either shelve and unshelve an instance, or resize the instance and revert the resize.
4. Notice how the "openstack usage show" statistics suddenly drops to a lower value and then continues to increase.
Expected result:
Statistics would not drop, should continue measuring.
Some possible solutions:
1. Stop resetting the launched_at field
2. Change the field used for calculation at [0] to something else (maybe created_at?)
[0]
https://github.com/openstack/nova/blob/6c0ceda3659405149b7c0b5c283275ef0a896269/nova/api/openstack/compute/simple_tenant_usage.py#L74
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1915055/+subscriptions
Follow ups