RelaxNG schema contains duplicate elements => is invalid

Bug #885025 reported by justinsb
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
John Garbutt

Bug Description

The RelaxNG schema contains elements with the same name & namespace but different structure for flavors, images and servers. I'm pretty sure this is illegal - how could a validating parser know which syntax to choose?

This is a serious blocker for me - the EC2 API is incomplete, while the OpenStack API is not sufficiently well specified to use from a strongly-typed language. The XML schema would normally be the answer but RelaxNG isn't as widely supported as XSD, and the schema looks like it is incorrect anyway. :-(

Tags: api
Thierry Carrez (ttx)
tags: added: osapi-1.1
Changed in nova:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Vish Ishaya (vishvananda) wrote :

justin. Any idea how we can write a test validating this in python so we can make sure it is legal?

Revision history for this message
justinsb (justin-fathomdb) wrote :

I could take a stab at this on the bug squashing day...

Changed in nova:
assignee: nobody → justinsb (justin-fathomdb)
Changed in nova:
status: Confirmed → Triaged
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

Justin, are you still working on this?

All,
Does not seem to be bothering anyone else, can we lower the Importance?

-- dims

Revision history for this message
Tom Fifield (fifieldt) wrote :

Since we haven't heard from Justin in over two years, de-assigning. If this was done in error, please revert.

Changed in nova:
assignee: justinsb (justin-fathomdb) → nobody
Revision history for this message
Chris St. Pierre (stpierre) wrote :

I have proposed a fix for this in https://review.openstack.org/#/c/98215/

Joe Gordon (jogo)
Changed in nova:
importance: High → Medium
Changed in nova:
assignee: nobody → Chris St. Pierre (stpierre)
status: Triaged → In Progress
Sean Dague (sdague)
tags: added: api
removed: osapi-1.1
Changed in nova:
assignee: Chris St. Pierre (stpierre) → John Garbutt (johngarbutt)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/98215
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=c41e6cf794e6d68ae083960e195c92e2ac487df1
Submitter: Jenkins
Branch: master

commit c41e6cf794e6d68ae083960e195c92e2ac487df1
Author: Chris St. Pierre <email address hidden>
Date: Fri Jul 11 09:52:24 2014 -0400

    Revise compute API schemas and add tests

    This revises the servers, images, and flavors schemas to avoid a
    duplicate definition of the top-level tags in those schemas. Instead,
    of defines each schema to allow either a list of tags with only
    name/id (as in the index listings), or a list of fully-defined
    servers/images/flavors. It is not permitted to mix and match.

    It also adds three kinds of unit tests for the API schemas:

    * A basic check to ensure that the schema files are valid RelaxNG;
    * A check to ensure that the collected body of schema files does not
      contain duplicate top-level tag definitions;
    * Explicit test XML documents.

    Closes-Bug: 885025
    Change-Id: I542b420de34fd82bb2a2813f36637aef2c2d5c92

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