ec2 metadata service regressed for block-device-mapping and empty kernel-id, ramdisk-id

Bug #954377 reported by Scott Moser on 2012-03-13
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Jesse Andrews

Bug Description

After changes made for bug 851159 [1], it seems there were some regressions in the content of the metadata service.
This is causing issues for consumers of that service (cloud-init).

Some things that are broken:
 a.) kernel-id, ramdisk-id show up in the metadata service items list even if there they're not valid for this image.
     The following should be empty output if there are no kernel or ramdisk:
      wget -q -O - | egrep "(kernel|ramdisk)-id"
     This causes a problem when the dataservice is crawled as gets for metadata/kernel-id or ramdisk-id show 404.
 b.) block-device-mapping content is broken
    $ python -c 'import boto.utils, pprint; pprint.pprint(boto.utils.get_instance_metadata()["block-device-mapping"])'
    {'ami': 'vda', 'ephemeral0': '/dev/vdb', 'root': '/dev/vda'}
    But now,
    $ python -c 'import boto.utils, pprint; pprint.pprint(boto.utils.get_instance_metadata()["block-device-mapping"])'
    ['ami', 'ephemeral0' 'root']

  c.) public-keys should not be present in meta-data/ list if none were provided
     (wget -O - -q; echo ) | grep public

  d.) if something is a dict it shoudl appear as a directory in the meta-data list
      Examples of things that previously had trailing slashes but now do not:
       * placement/
       * mpi/
       * public-keys/
       * block-device-mapping/

Then, one thing which seems to have been the case before this change was:
 x.) kernel-id, ramdisk-id, ami-id show 'ami-000000'
     $ ec2metadata --kernel-id --ramdisk-id --ami-id
   That is that 'ami-0000000' was the kernel-id, ramdisk-id and ami-id, rather than the actual values (this was for an instance that did have a kernel and ramdisk).


Scott Moser (smoser) on 2012-03-13
summary: - ec2 metadata service regressed for block-device-mapping, kernel-id,
- ramdisk-id, ami-id
+ ec2 metadata service regressed for block-device-mapping and empty
+ kernel-id, ramdisk-id
Scott Moser (smoser) on 2012-03-13
description: updated
description: updated
Brian Waldon (bcwaldon) wrote :

This should fix the incorrect mapping of ami/aki/ari ids:,5265

Changed in nova:
milestone: none → essex-rc1
assignee: nobody → Jesse Andrews (anotherjesse)
Changed in nova:
importance: Undecided → High
status: New → In Progress

Submitter: Jenkins
Branch: master

commit 4c8dbf81d9a9f27faeb19271b774ea4f130e516c
Author: Jesse Andrews <email address hidden>
Date: Wed Mar 14 13:20:07 2012 -0700

    metadata speed - revert logic changes, just caching

     * reverts most of
     * keep changes that cache the results so subsequent calls are fast

     fixes bug 954377

    Change-Id: Ia047f1d04dc360dd657d4d80d3dff8c8101635cd

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2012-03-20
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in nova:
milestone: essex-rc1 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers