test_stop_start_with_volume test occasionally fails

Bug #877661 reported by Antony Messerli
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Chris Behrens

Bug Description

test_stop_start_with_volume (nova.tests.api.ec2.test_cloud.CloudTestCase) is occasionally failing the test suite. TIming issue?

Revision history for this message
Chris Behrens (cbehrens) wrote :

======================================================================
FAIL: test_stop_with_attached_volume (nova.tests.api.ec2.test_cloud.CloudTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jenkins/workspace/nova/nova/tests/api/ec2/test_cloud.py", line 1496, in test_stop_with_attached_volume
    self._assert_volume_detached(vol)
  File "/home/jenkins/workspace/nova/nova/tests/api/ec2/test_cloud.py", line 1359, in _assert_volume_detached
    self.assertEqual(vol['instance_id'], None)
AssertionError: 1 != None
-------------------- >> begin captured logging << --------------------
2011-10-13 13:33:12,070 AUDIT nova [-] Starting compute node (version 2012.1-LOCALBRANCH:LOCALREVISION)
2011-10-13 13:33:12,106 INFO nova.rpc [-] Connected to AMQP server on localhost:5672
2011-10-13 13:33:12,106 DEBUG nova [-] Creating Consumer connection for Service compute from (pid=4025) start /home/jenkins/workspace/nova/nova/service.py:157
2011-10-13 13:33:12,158 ERROR nova.rpc [-] Exception during message handling
(nova.rpc): TRACE: Traceback (most recent call last):
(nova.rpc): TRACE: File "/home/jenkins/workspace/nova/nova/rpc/impl_kombu.py", line 620, in _process_data
(nova.rpc): TRACE: rval = node_func(context=ctxt, **node_args)
(nova.rpc): TRACE: File "/home/jenkins/workspace/nova/nova/exception.py", line 113, in wrapped
(nova.rpc): TRACE: return f(*args, **kw)
(nova.rpc): TRACE: File "/home/jenkins/workspace/nova/nova/compute/manager.py", line 114, in decorated_function
(nova.rpc): TRACE: function(self, context, instance_id, *args, **kwargs)
(nova.rpc): TRACE: File "/home/jenkins/workspace/nova/nova/compute/manager.py", line 568, in terminate_instance
(nova.rpc): TRACE: self._delete_instance(context, instance_id)
(nova.rpc): TRACE: File "/home/jenkins/workspace/nova/nova/compute/manager.py", line 550, in _delete_instance
(nova.rpc): TRACE: instance = self.db.instance_get(context.elevated(), instance_id)
(nova.rpc): TRACE: File "/home/jenkins/workspace/nova/nova/db/api.py", line 510, in instance_get
(nova.rpc): TRACE: return IMPL.instance_get(context, instance_id)
(nova.rpc): TRACE: File "/home/jenkins/workspace/nova/nova/db/sqlalchemy/api.py", line 120, in wrapper
(nova.rpc): TRACE: return f(*args, **kwargs)
(nova.rpc): TRACE: File "/home/jenkins/workspace/nova/nova/db/sqlalchemy/api.py", line 1210, in instance_get
(nova.rpc): TRACE: raise exception.InstanceNotFound(instance_id=instance_id)
(nova.rpc): TRACE: InstanceNotFound: Instance 1 could not be found.
(nova.rpc): TRACE:

Revision history for this message
Chris Behrens (cbehrens) wrote :

The above should be related, also. Here's another trace:

======================================================================
ERROR: test_stop_start_with_volume (nova.tests.api.ec2.test_cloud.CloudTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jenkins/workspace/nova/nova/tests/api/ec2/test_cloud.py", line 1427, in test_stop_start_with_volume
    vol = db.volume_get(admin_ctxt, vol2['id'])
  File "/home/jenkins/workspace/nova/nova/db/api.py", line 919, in volume_get
    return IMPL.volume_get(context, volume_id)
  File "/home/jenkins/workspace/nova/nova/db/sqlalchemy/api.py", line 120, in wrapper
    return f(*args, **kwargs)
  File "/home/jenkins/workspace/nova/nova/db/sqlalchemy/api.py", line 2257, in volume_get
    raise exception.VolumeNotFound(volume_id=volume_id)
VolumeNotFound: Volume 2 could not be found.

Chris Behrens (cbehrens)
Changed in nova:
status: New → In Progress
assignee: nobody → Chris Behrens (cbehrens)
Revision history for this message
Chris Behrens (cbehrens) wrote :
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : A change has been merged to openstack/nova

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

 status fixcommitted
 done

commit f0125d26ef773a489e4b924bcaa1195610ef6026
Author: Chris Behrens <email address hidden>
Date: Tue Oct 18 13:28:28 2011 -0700

    Fix EC2 test_cloud timing issues

    Fixes bug 877661

    Unfortunately, these tests are really integration tests. Being that
    they are, rpc.cast is now stubbed to do an rpc.call to ensure the
    operations complete. No need for sleeps anymore.

    This also uncovers some other issues with the tests.. And it uncovers a
    bug in the network API where a wrong argument is passed to destroy a
    floating IP.

    Change-Id: Ia7f40718533e450f00cd3e7d753ac65755c70588

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