VolumeTestCases failed occasionally

Bug #1332388 reported by Huang Zhiteng
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Huang Zhiteng

Bug Description

Following test cases has been seen failed even in master branch while running locally. They've also been spotted causing jenkins failure in other reviews.

======================================================================
FAIL: cinder.tests.test_volume.VolumeTestCase.test_run_attach_detach_volume_for_host
----------------------------------------------------------------------
Traceback (most recent call last):
_StringException: Empty attachments:
  stderr
  stdout

Traceback (most recent call last):
  File "/opt/stack/cinder/cinder/tests/test_volume.py", line 1296, in test_run_attach_detach_volume_for_host
    self.assertEqual(admin_metadata[0]['key'], 'readonly')
  File "/opt/stack/cinder/.venv/lib/python2.7/site-packages/testtools/testcase.py", line 324, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/opt/stack/cinder/.venv/lib/python2.7/site-packages/testtools/testcase.py", line 414, in assertThat
    raise MismatchError(matchee, matcher, mismatch, verbose)
MismatchError: u'attached_mode' != 'readonly'

======================================================================
FAIL: cinder.tests.test_volume.VolumeTestCase.test_run_attach_detach_volume_for_instance
----------------------------------------------------------------------
Traceback (most recent call last):
_StringException: Empty attachments:
  stderr
  stdout

Traceback (most recent call last):
  File "/opt/stack/cinder/cinder/tests/test_volume.py", line 1253, in test_run_attach_detach_volume_for_instance
    self.assertEqual(admin_metadata[0]['key'], 'readonly')
  File "/opt/stack/cinder/.venv/lib/python2.7/site-packages/testtools/testcase.py", line 324, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/opt/stack/cinder/.venv/lib/python2.7/site-packages/testtools/testcase.py", line 414, in assertThat
    raise MismatchError(matchee, matcher, mismatch, verbose)
MismatchError: u'attached_mode' != 'readonly'

======================================================================
FAIL: cinder.tests.test_volume.VolumeTestCase.test_run_attach_detach_volume_with_attach_mode
----------------------------------------------------------------------
Traceback (most recent call last):
_StringException: Empty attachments:
  stderr
  stdout

Traceback (most recent call last):
  File "/opt/stack/cinder/cinder/tests/test_volume.py", line 1341, in test_run_attach_detach_volume_with_attach_mode
    self.assertEqual(admin_metadata[0]['key'], 'readonly')
  File "/opt/stack/cinder/.venv/lib/python2.7/site-packages/testtools/testcase.py", line 324, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/opt/stack/cinder/.venv/lib/python2.7/site-packages/testtools/testcase.py", line 414, in assertThat
    raise MismatchError(matchee, matcher, mismatch, verbose)
MismatchError: u'attached_mode' != 'readonly'

======================================================================
FAIL: cinder.tests.test_volume.VolumeTestCase.test_run_manager_attach_detach_volume_with_wrong_attach_mode
----------------------------------------------------------------------
Traceback (most recent call last):
_StringException: Empty attachments:
  stderr
  stdout

Traceback (most recent call last):
  File "/opt/stack/cinder/cinder/tests/test_volume.py", line 1421, in test_run_manager_attach_detach_volume_with_wrong_attach_mode
    self.assertEqual(admin_metadata[0]['key'], 'readonly')
  File "/opt/stack/cinder/.venv/lib/python2.7/site-packages/testtools/testcase.py", line 324, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/opt/stack/cinder/.venv/lib/python2.7/site-packages/testtools/testcase.py", line 414, in assertThat
    raise MismatchError(matchee, matcher, mismatch, verbose)
MismatchError: u'attached_mode' != 'readonly'

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

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

Reviewed: https://review.openstack.org/101407
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=c3240b96e84adda494ce08ce05f8ea81d1f158e4
Submitter: Jenkins
Branch: master

commit c3240b96e84adda494ce08ce05f8ea81d1f158e4
Author: Zhiteng Huang <email address hidden>
Date: Fri Jun 20 11:48:28 2014 +0800

    Fix order dependency of admin metadata

    Some test cases in VolumeTestCase depends on the order of admin metadata
    returned from db.volume_get() call, which causes jenkins test failure in
    recent reviews. This change extracts the key/value we are intertested in
    and compare them with AssertDictMatch() to remove the order dependency.

    Change-Id: I2719c025436304cabab54f19a6ce314842d8785b
    Closes-bug: # 1332388

Changed in cinder:
status: In Progress → Fix Committed
Changed in cinder:
milestone: none → juno-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: juno-2 → 2014.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.