nova.tests.test_cloud.CloudTestCase.test_associate_disassociate_address fails under python 2.7

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

Bug Description

I'm not sure why it doesn't happen with Python 2.6 (and it doesn't even seem to happen every time with python 2.7), but here's the traceback:

======================================================================
ERROR: test_associate_disassociate_address (nova.tests.test_cloud.CloudTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd/nova-2011.1~bzr549/nova/tests/test_cloud.py", line 112, in test_associate_disassociate_address
    public_ip=address)
  File "/build/buildd/nova-2011.1~bzr549/nova/api/ec2/cloud.py", line 708, in associate_address
    self.compute_api.associate_floating_ip(context, instance_id, public_ip)
  File "/build/buildd/nova-2011.1~bzr549/nova/compute/api.py", line 500, in associate_floating_ip
    instance['fixed_ip'])
  File "/build/buildd/nova-2011.1~bzr549/nova/network/api.py", line 70, in associate_floating_ip
    host = fixed_ip['network']['host']
  File "/build/buildd/nova-2011.1~bzr549/nova/db/sqlalchemy/models.py", line 74, in __getitem__
    return getattr(self, key)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/attributes.py", line 163, in __get__
    instance_dict(instance))
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/attributes.py", line 383, in get
    value = callable_(passive=passive)
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/strategies.py", line 595, in __call__
    (mapperutil.state_str(state), self.key)
DetachedInstanceError: Parent instance <FixedIp at 0x97deaac> is not bound to a Session; lazy load operation of attribute 'network' cannot proceed

======================================================================
FAIL: test_instance_update_state (nova.tests.test_cloud.CloudTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd/nova-2011.1~bzr549/nova/tests/test_cloud.py", line 263, in test_instance_update_state
    self.assert_(len(rv['reservationSet']) == 0)
AssertionError: False is not true

======================================================================
FAIL: test_run_terminate (nova.tests.test_compute.ComputeTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd/nova-2011.1~bzr549/nova/tests/test_compute.py", line 105, in test_run_terminate
    self.assertEqual(len(instances), 1)
AssertionError: 2 != 1

The last two are follow-on errors from the first (due to unclean data store afterwards).

Related branches

Soren Hansen (soren)
Changed in nova:
assignee: nobody → Soren Hansen (soren)
importance: Undecided → Medium
status: New → In Progress
Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → 2011.1
status: Fix Committed → Fix Released
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.