invalid image information in resource metadata

Bug #1090310 reported by jiang, yunhong on 2012-12-14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
jiang, yunhong

Bug Description

Currently all image informatio in resource metadata is empty.

Current the implementation try to get all image data through instance attribute, however, the image information is located in instance.image, and the kernel_id and ramdisk_id is not included in the instance object at all.

Changed in ceilometer:
assignee: nobody → jiang, yunhong (yunhong-jiang)
jiang, yunhong (yunhong-jiang) wrote :

After checking related code, I think this issue happens during the remove_db. The database includes the image_id and other information, while is changed in novaclient through the viewbuilder.


Fix proposed to branch: master

Changed in ceilometer:
status: New → In Progress
jiang, yunhong (yunhong-jiang) wrote :

I have a concern to changes required on nova to support kernel_id and ramdisk_id. The concern is, it will need to add 'kernel_id' and 'ramdisk_id' to the server details request. This is in fact a API changes, so not sure how strict nova is for the API changes.

The patch to add the ramdisk_id and kernel_id is simple as followed one, but a lot of test cases need be updated since these test case will check the key in the return value also.

So just want do discuss how important/priority to add back the kernel_id/ramdisk_id back to the meter.

--- a/nova/api/openstack/compute/views/
+++ b/nova/api/openstack/compute/views/
@@ -98,6 +98,8 @@ class ViewBuilder(common.ViewBuilder):
                 "metadata": self._get_metadata(instance),
                 "hostId": self._get_host_id(instance) or "",
                 "image": self._get_image(request, instance),
+ "kernel_id": instance['kernel_id'],
+ "ramdisk_id": instance['ramdisk_id'],
                 "flavor": self._get_flavor(request, instance),
                 "created": timeutils.isotime(instance["created_at"]),
                 "updated": timeutils.isotime(instance["updated_at"]),

Submitter: Jenkins
Branch: master

commit 4356ab20a36141268783151def5151f5f87b51ca
Author: Yunhong, Jiang <email address hidden>
Date: Mon Dec 17 15:58:45 2012 +0800

    Fix image_id in instance resource metadata

    Originally the image property in instance resource metadata is correct
    since instance information is fetched from db access.

    After switching to nova client api, these information is lost
    since the returned data format from nova client is different with db
    access result.

    Image ref and image url is fixed with this patch while kernel_id and
    ramdisk_id should be fixed in nova side.

    For bug 1090310

    Change-Id: I51816b4bd31c09a59e1ef857f8981a45f33f68dc
    Signed-off-by: Yunhong, Jiang <email address hidden>

Changed in ceilometer:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2013-01-09
Changed in ceilometer:
milestone: none → grizzly-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-04-04
Changed in ceilometer:
milestone: grizzly-2 → 2013.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers