nova usage call is not accurate for resized images

Bug #1521747 reported by Eric Peterson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Expired
Undecided
Unassigned

Bug Description

The detailed response from the nova usage call, reports invalid instance size info if the instance has been resized. This API is used by Horizon, which is how we found this.

Steps to reproduce:

1) Create an instance, say small

2) resize the instance, something like large etc

3) Make this call (adjust to hit a recent date etc):
nova --debug usage --start 2015-12-01 --tenant XYZ

Doing that call, we see the VCPU count reflect the old size for the instance. This makes horizon quota and usage calculations display the wrong info, and prevents users from getting work done.

Revision history for this message
Matt Riedemann (mriedem) wrote :

What version of nova? Kilo?

Revision history for this message
Matt Riedemann (mriedem) wrote :

Is this recreatable with a new instance or are you doing this with instances created in say Juno, before the online flavor data migration that happens in Kilo, see the 4th bullet here:

https://wiki.openstack.org/wiki/ReleaseNotes/Kilo#Upgrade_Notes_2

Revision history for this message
Matt Riedemann (mriedem) wrote :

Seems to work for me on a mitaka devstack install from within the last 2 weeks:

http://paste.openstack.org/show/480560/

The VCPUs between the 1 and 2 flavors in devstack is the same, but the disk is different, and that appears to be reflected in the usage output.

Changed in nova:
status: New → Incomplete
Revision history for this message
Matt Riedemann (mriedem) wrote :

My version of nova in devstack:

stack@archive:/opt/stack/nova$ git log -1
commit f6a5a43e06c2af6325d7a3552c71e968565684fc
Merge: f268cf5 0df6fba
Author: Jenkins <email address hidden>
Date: Mon Nov 16 18:01:40 2015 +0000

    Merge "Remove duplicate server.kill on test shutdown"

Revision history for this message
Matt Riedemann (mriedem) wrote :

If you know the problem instance, try checking out the instance_extra table for the given instance uuid and see what the (old/new) flavor columns look like.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for OpenStack Compute (nova) because there has been no activity for 60 days.]

Changed in nova:
status: Incomplete → Expired
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.