Multiple create with return_reservation_id=True fails when using XML

Bug #1149526 reported by Mauro S M Rodrigues
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Mauro S M Rodrigues

Bug Description

When we try to use os-multiple-create to create one or more server instances using XML interface it fails due to a conflict with security_group extensions serialization.

More specifically:
With SecurityGroup extension active, in /opt/stack/nova/nova/api/openstack/compute/contrib/security_groups.py(519)_show()
we attach SecurityGroupServeTemplate which internally, uses xmlutil.SlaveTemplate which looks for id in the response object.

Why this happens:
Security group looks for a server object in the response to attach server's security group information. In the other hand when using return_reservation_id=True the xml response requires a root element, happens that root element is also called server, which make security groups try to attach security group information on it, failing.

Changed in nova:
assignee: nobody → Mauro Sergio Martins Rodrigues (maurosr)
importance: Undecided → Medium
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/23840

Changed in nova:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit dc29ab91e434335f4468427475baea23d2c68b7b
Author: Mauro S. M. Rodrigues <email address hidden>
Date: Thu Mar 7 13:25:09 2013 -0500

    Add MultipleCreate template and fix conflict with other templates

    This patch creates a dedicated xml template to the os-multiple-create extension
    when using return_reservation_id=True in the request. The previous code, with
    all extensions loaded, conflicted with security_groups extension.

    There is also a change in the response due to the new Template, but the only
    information removed is an empty metadata field (which made the previous xml
    output even more inconsisten with json). The consistency between json and xml
    will be treated in the next api version.

    DocImpact

    Fixes bug 1149526

    Change-Id: I3ca0129086ff1df3a8faa2b3b8bd959c9b74103c

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