config_drive="true" during instance creation does not work

Bug #1090148 reported by Davanum Srinivas (DIMS)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Davanum Srinivas (DIMS)

Bug Description

When i create an instance using:

curl -i http://192.168.1.136:8774/v2/cc12ec2f0dea40ed80689aa95ccb968c/servers -X POST -H "X-Auth-Project-Id: demo" -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: 4b1a376d4e554af8ad13023e863980c7" -d '{"server": {"name": "mycirros-with-drive", "config_drive": "True", "imageRef": "1f167196-298b-43a0-9a03-83212db38183", "flavorRef": "1", "max_count": 1, "min_count": 1, "networks": []}}'

I expected the vm to be created with a disk.config just like the force_config_drive flag in nova.conf. Instead, i see the following in nova-api logs

2012-12-13 16:30:44 INFO nova.api.openstack.wsgi [req-222020e4-b2cc-46bf-958d-858a86df61cf admin demo] HTTP exception thrown: Can not find requested image

It looks like code is trying to treat the value of config_drive as a image id in glance

Changed in nova:
assignee: nobody → Davanum Srinivas (dims-v)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

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

Reviewed: https://review.openstack.org/18092
Committed: http://github.com/openstack/nova/commit/76588ed039114999de7d11f24377b75c3c10f8df
Submitter: Jenkins
Branch: master

commit 76588ed039114999de7d11f24377b75c3c10f8df
Author: Davanum Srinivas <email address hidden>
Date: Thu Dec 13 16:51:53 2012 -0500

    Fix for broken switch for config_drive

    There's a wrong check in api.py, we should check if config_drive
    is not a boolean string before we try to treat it as an image id

    Fixes LP #1090148

    Change-Id: I2e0bc49922781138e569471b0dd360fb3918b687

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-2 → 2013.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.