Glance Image Service connector ignores kernel and ramdisk properties in Glance

Bug #937260 reported by Chris Hoge
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Low
Brian Waldon

Bug Description

The Glance Image Service connector, in https://github.com/openstack/nova/blob/master/nova/image/glance.py, does not support associated kernel and ramdisk properties for disk images.

Compare to the S3 connector, in https://github.com/openstack/nova/blob/master/nova/image/s3.py, which looks for kernel and ramdisk properties.

This results in failed image booting with 'nova boot'. The kernel and ramdisk images are not downloaded, and the associated variables in the libvirt xml file are not set.

Tags: glance
Revision history for this message
Brian Waldon (bcwaldon) wrote :

Can you show the commands you used to upload the images?

Revision history for this message
Chris Hoge (hoge) wrote :

The kernel and ramdisk ids in the third line match the ones assigned by glance.

glance add disk_format=aki container_format=aki name="Scientific Linux 6.1 Kernel" is_public=True < vmlinuz-2.6.32-220.4.1.el6.x86_64
glance add disk_format=ari container_format=ari name="Scientific Linux 6.1 Bootloader" is_public=True < initramfs-2.6.32-220.4.1.el6.x86_64.img
glance add disk_format=qcow2 container_format=ovf name="Scientific Linux 6.1" is_public=True kernel="a79a5155-5252-417f-a620-8b237d355750" ramdisk="b2e0aa09-35f7-468d-a27d-6297c6032b8a" < scilinux61-root.qcow2

Output from "glance details":

================================================================================
URI: https://172.20.1.3:9292/v1/images/e02251ca-35bb-45a7-a2c1-323aba3aa9c9
Id: e02251ca-35bb-45a7-a2c1-323aba3aa9c9
Public: Yes
Protected: No
Name: Scientific Linux 6.1
Status: active
Size: 2309095424
Disk format: qcow2
Container format: ovf
Minimum Ram Required (MB): 0
Minimum Disk Required (GB): 0
Owner: f708744fab4a4cc1b0c82d27643c7e75
Property 'ramdisk': b2e0aa09-35f7-468d-a27d-6297c6032b8a
Property 'kernel': a79a5155-5252-417f-a620-8b237d355750
================================================================================
URI: https://172.20.1.3:9292/v1/images/b2e0aa09-35f7-468d-a27d-6297c6032b8a
Id: b2e0aa09-35f7-468d-a27d-6297c6032b8a
Public: No
Protected: No
Name: Scientific Linux 6.1 Bootloader
Status: active
Size: 14591574
Disk format: ari
Container format: ari
Minimum Ram Required (MB): 0
Minimum Disk Required (GB): 0
Owner: f708744fab4a4cc1b0c82d27643c7e75
Property 'is_pubic': True
================================================================================
URI: https://172.20.1.3:9292/v1/images/a79a5155-5252-417f-a620-8b237d355750
Id: a79a5155-5252-417f-a620-8b237d355750
Public: Yes
Protected: No
Name: Scientific Linux 6.1 Kernel
Status: active
Size: 3940848
Disk format: aki
Container format: aki
Minimum Ram Required (MB): 0
Minimum Disk Required (GB): 0
Owner: f708744fab4a4cc1b0c82d27643c7e75
================================================================================

Revision history for this message
Brian Waldon (bcwaldon) wrote :

You need to use 'kernel_id' and 'ramdisk_id' in your third 'glance add ...' call

Revision history for this message
Chris Hoge (hoge) wrote :

Ah, it looks like a problem with the Glance documentation.

http://glance.openstack.org/glance.html

Sorry for the false alarm.

Revision history for this message
Brian Waldon (bcwaldon) wrote :

No worries, I'm glad you found this problem with the documentation. Can you confirm that using kernel_id and ramdisk_id works for you?

Revision history for this message
Chris Hoge (hoge) wrote :

Just finished confirming it. Works great for me now. Thanks!

Revision history for this message
Brian Waldon (bcwaldon) wrote :

Ok, so 'fix' this bug I'll just update the docs.

affects: nova → glance
Changed in glance:
status: New → In Progress
importance: Undecided → Low
assignee: nobody → Brian Waldon (bcwaldon)
milestone: none → essex-4
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

Fix proposed to branch: master
Review: https://review.openstack.org/4392

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/4392
Committed: http://github.com/openstack/glance/commit/c0bce060b89e50c135e1e0f888daf9c166e57e2c
Submitter: Jenkins
Branch: master

commit c0bce060b89e50c135e1e0f888daf9c166e57e2c
Author: Brian Waldon <email address hidden>
Date: Wed Feb 22 02:30:15 2012 -0800

    Correct kernel/ramdisk example in docs

    * Fixes bug 937260

    Change-Id: I43ea7d5c1434cc9e1454f6915e2b76586383bb89

Changed in glance:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: essex-4 → 2012.1
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.