config drive doesn't work if using xml request format

Bug #1096508 reported by hill
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
hill

Bug Description

When using xml format to boot a server with config-drive, it doesn't work. the workaround is to set force_config_drive=always

<?xml version="1.0" encoding="UTF-8"?>
            <server name="hill_test_server_xml" imageRef="43d5adf1-3390-46d2-9061-1e8aeb16826a" flavorRef="1" config_drive="true" >
            </server>

hill (yuyuehill)
Changed in nova:
assignee: nobody → hill (yuyuehill)
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/19044

Changed in nova:
status: New → In Progress
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

Hill,

Looks like we may not be extracting the attribute from the server xml element node. right? if so will this be enough to get this to work?

diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py
index 7a8d7d5..e48062f 100644
--- a/nova/api/openstack/compute/servers.py
+++ b/nova/api/openstack/compute/servers.py
@@ -178,6 +178,11 @@ class CommonDeserializer(wsgi.MetadataXMLDeserializer):
             if server_node.getAttribute(attr):
                 server[attr] = server_node.getAttribute(attr)

+ if self.ext_mgr.is_loaded('os-config-drive'):
+ config_drive = server_dict.get('config_drive')
+ if config_drive:
+ server['config_drive'] = config_drive
+
         res_id = server_node.getAttribute('return_reservation_id')
         if res_id:
             server['return_reservation_id'] = utils.bool_from_str(res_id)

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :
Revision history for this message
hill (yuyuehill) wrote :

I added you as reviewer for my patch.

the problem is CommonDeserializer don't have the capability to access ext_mgr.

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

Hill, You are right, we do the check for that extension anyway later in the flow. so we are good

Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/19044
Committed: http://github.com/openstack/nova/commit/e8746dbcc1ad53a3335d063fea95b516a0f10f9d
Submitter: Jenkins
Branch: master

commit e8746dbcc1ad53a3335d063fea95b516a0f10f9d
Author: hill <email address hidden>
Date: Sun Jan 6 11:29:41 2013 +0800

    config_drive is missing in xml deserializer

    bug 1096508

    Change-Id: Ibaca0b08b866fa6297d8abaf005adbc6f689818c

Changed in nova:
status: In Progress → Fix Committed
tags: added: folsom-backport-potential
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.