Previously the flavor vcpus used in the CPU utilization metering
was available from the nova DB instance representation.
Now that we retrieve the on-host instances from the public nova API
as opposed to the DB, we need to retrieve the flavor vcpus from
the flavors API.
Note that it's a known issue with nova that a flavor associated
with a running instance can be deleted and re-created with the
same ID but a different resource configuration (in this case, a
different number of cores would led to an incorrect CPU util
calculation). This will be addressed in a future nova patch.
Reviewed: https:/ /review. openstack. org/16012 github. com/openstack/ ceilometer/ commit/ 454c486e01b7782 d5e01ed45dca005 28865d929f
Committed: http://
Submitter: Jenkins
Branch: master
commit 454c486e01b7782 d5e01ed45dca005 28865d929f
Author: Eoghan Glynn <email address hidden>
Date: Tue Nov 13 20:20:19 2012 +0000
Determine instance cores from public flavors API
Fixes bug 1078371
Previously the flavor vcpus used in the CPU utilization metering
was available from the nova DB instance representation.
Now that we retrieve the on-host instances from the public nova API
as opposed to the DB, we need to retrieve the flavor vcpus from
the flavors API.
Note that it's a known issue with nova that a flavor associated
with a running instance can be deleted and re-created with the
same ID but a different resource configuration (in this case, a
different number of cores would led to an incorrect CPU util
calculation). This will be addressed in a future nova patch.
Change-Id: I093acb94a4818f 671782a3cb4e2c8 46f29b8cec5