lxml 2.3.5 broken

Bug #1089192 reported by Rick Harris
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Critical
Rick Harris

Bug Description

We have tests that rely on lmxl.etree emitting XML attributes in alphabetical order.

We shouldn't be relying attribute order since, theoretically, it is undefined. In practice however, lxml seems to have settled on alphabetizing the attributes, so as a stop gap, it's sufficient to bump the version.

Traceback of error:

======================================================================
FAIL: nova.tests.test_libvirt_config.LibvirtConfigGuestInterfaceTest.test_config_8021Qbh
----------------------------------------------------------------------
_StringException: Empty attachments:
  pythonlogging:'nova'

Traceback (most recent call last):
  File "/Users/rconradharris/Documents/code/openstack/nova/nova/tests/test_libvirt_config.py", line 541, in test_config_8021Qbh
    </interface>""")
  File "/Users/rconradharris/Documents/code/openstack/nova/nova/tests/test_libvirt_config.py", line 29, in assertXmlEqual
    self.assertEqual(expected, actual)
MismatchError: !=:
reference = '<interface type="direct"><mac address="DE:AD:BE:EF:CA:FE"/><model type="virtio"/><source mode="private" dev="eth0"/><target dev="tap12345678"/><virtualport type="802.1Qbh"/></interface>'
actual = '<interface type="direct"><mac address="DE:AD:BE:EF:CA:FE"/><model type="virtio"/><source dev="eth0" mode="private"/><target dev="tap12345678"/><virtualport type="802.1Qbh"/></interface>'

Slowest 5 tests took 1.19 secs:

Changed in nova:
importance: Undecided → Critical
status: New → In Progress
assignee: nobody → Rick Harris (rconradharris)
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/17899

Revision history for this message
Sean Dague (sdague) wrote :

The approach to fix the bug should be to make it so the tests don't depend on order.

Revision history for this message
Kevin L. Mitchell (klmitch) wrote :

Should be addressed by https://review.openstack.org/#/c/17879/

(I was unaware of this bug report until after the patch got approved, or I would have referenced it from the bug report. Please review and confirm that it really does address the issue…)

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

if i switch around the attributes in test_config_8021Qbh, tests still pass. closing as fixed

- <source dev="eth0" mode="private"/>
+ <source mode="private" dev="eth0"/>

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.