XML formatting for volume metadata incorrect

Bug #1040891 reported by Matthew Treinish
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Matthew Treinish
OpenStack Compute (nova)
Fix Released
High
Matthew Treinish

Bug Description

Response to get v1/{tenant_id}/volumes/{volume_id} is incorrectly formatted.

For example a volume created with:

<volume xmlns="http://docs.openstack.org/compute/api/v1.1" display_name="Volume-xml-81567541400" size="1"><metadata ><meta key="Type">work</meta></metadata></volume>

Performing the get returns:

<volume status="available" displayDescription="None" availabilityZone="nova" displayName="Volume-xml-81567541400" volumeType="None" snapshotId="None" id="80e4f407-b09d-4223-a8bd-17f20587ab1c" createdAt="2012-08-23 21:43:19" size="1"><attachments><attachment/></attachments><metadata><meta>work</meta></metadata></volume>

the metadata field is incorrectly formatted on the response to the get. It should be:

<metadata ><meta key="Type">work</meta></metadata>

instead of:

<metadata><meta>work</meta></metadata>

Changed in nova:
assignee: nobody → Matthew Treinish (treinish)
Changed in nova:
status: New → Triaged
importance: Undecided → High
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/12198

Changed in nova:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

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

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

Changed in cinder:
assignee: nobody → Matthew Treinish (treinish)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/12359
Committed: http://github.com/openstack/cinder/commit/51a008dfdbb80c158d85beed4e310f94b068d341
Submitter: Jenkins
Branch: master

commit 51a008dfdbb80c158d85beed4e310f94b068d341
Author: Matthew Treinish <email address hidden>
Date: Tue Sep 4 11:08:16 2012 -0400

    Fix xml metadata for volumes api in cinder.

    Fixes bug 1040891.

    Change-Id: Idf8cc641162617ade2aeb77b666270cf1ce54c54
    Signed-off-by: Matthew Treinish <email address hidden>

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

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

commit eb86e97cebbdbff17e591e5674c334501ced1279
Author: Matthew Treinish <email address hidden>
Date: Thu Aug 30 11:47:56 2012 -0400

    Fix xml metadata for volumes extension.

    Fixes bug 1040891

    Change-Id: I3a5d46af18f764e86ab457071d2b3afafdcdaa24
    Signed-off-by: Matthew Treinish <email address hidden>

Revision history for this message
Matthew Treinish (treinish) wrote :

The fixes above introduced an issue with BadRequest not being returned if the size was omitted from a XML formatted create request. I will push new fixes to correct the oversight.

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/12589

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

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

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

Reviewed: https://review.openstack.org/12355
Committed: http://github.com/openstack/nova/commit/1f82e30db8e628e956190ea76f71c8a6f4803e24
Submitter: Jenkins
Branch: master

commit 1f82e30db8e628e956190ea76f71c8a6f4803e24
Author: Matthew Treinish <email address hidden>
Date: Tue Sep 4 10:23:18 2012 -0400

    Fix xml metadata for volumes api in nova-volume.

    Fixes bug 1040891

    Change-Id: I6295e4084adc33999bfdf66728623b278895b2d6
    Signed-off-by: Matthew Treinish <email address hidden>

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