There is one unstable unit tests in Manila

Bug #1493069 reported by Valeriy Ponomaryov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Medium
Valeriy Ponomaryov

Bug Description

Running Manila unit tests on local lab with two threads I get following error from time to time:

$ tox -e py27 -- --concurrency=2
py27 recreate: /opt/stack/manila/.tox/py27
py27 installdeps: -r/opt/stack/manila/requirements.txt, -r/opt/stack/manila/test-requirements.txt
py27 develop-inst: /opt/stack/manila
py27 runtests: commands[0] | python setup.py testr --testr-args=
running testr
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
OS_LOG_CAPTURE=${OS_LOG_CAPTURE:-1} \
${PYTHON:-python} -m subunit.run discover -t ./ ./manila/tests --list
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
OS_LOG_CAPTURE=${OS_LOG_CAPTURE:-1} \
${PYTHON:-python} -m subunit.run discover -t ./ ./manila/tests --load-list /tmp/tmpW2k2T0
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
OS_LOG_CAPTURE=${OS_LOG_CAPTURE:-1} \
${PYTHON:-python} -m subunit.run discover -t ./ ./manila/tests --load-list /tmp/tmpLDBzMR
======================================================================
FAIL: manila.tests.scheduler.test_host_manager.HostManagerTestCase.test_get_all_host_states_share
tags: worker-1
----------------------------------------------------------------------
Empty attachments:
  stderr
  stdout

pythonlogging:'': {{{
WARNING [manila.scheduler.host_manager] Share service is down. (host: host1@AAA)
 WARNING [manila.scheduler.host_manager] Share service is down. (host: host2@BBB)
 WARNING [manila.scheduler.host_manager] Share service is down. (host: host3@CCC)
 WARNING [manila.scheduler.host_manager] Share service is down. (host: host4@DDD)
 WARNING [manila.scheduler.host_manager] Share service is down. (host: host5@EEE)
 WARNING [manila.scheduler.host_manager] Share service is down. (host: host6@FFF)
}}}

Traceback (most recent call last):
  File "manila/tests/scheduler/test_host_manager.py", line 157, in test_get_all_host_states_share
    self.assertEqual(4, len(host_state_map))
  File "/opt/stack/manila/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 350, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/opt/stack/manila/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 435, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: 4 != 0
Ran 3744 tests in 163.564s (+61.029s)
FAILED (id=164, failures=1 (+1), skips=2)
error: testr failed (1)
ERROR: InvocationError: '/opt/stack/manila/.tox/py27/bin/python setup.py testr --testr-args='
______________________________________________________________________________________________________________________________ summary _______________________________________________________________________________________________________________________________
ERROR: py27: commands failed

Running it with different amount of threads passes. So, we have some concurrency here.

description: updated
description: updated
description: updated
Changed in manila:
milestone: none → liberty-rc1
assignee: nobody → Valeriy Ponomaryov (vponomaryov)
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

Fix proposed to branch: master
Review: https://review.openstack.org/221322

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.openstack.org/221322
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=41e3c358c70b3e92787f1f9041fd74ed6e61fd40
Submitter: Jenkins
Branch: master

commit 41e3c358c70b3e92787f1f9041fd74ed6e61fd40
Author: Valeriy Ponomaryov <email address hidden>
Date: Tue Sep 8 17:29:32 2015 +0300

    Fix unstable unit test 'test_get_all_host_states_share'

    Test 'test_get_all_host_states_share' fails from time to time running
    Manila unit tests with two threads.

    Change-Id: I7fb441290f61e816fce8b11d74edd8a57f73b93a
    Closes-Bug: #1493069

Changed in manila:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in manila:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in manila:
milestone: liberty-rc1 → 1.0.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.