VolumeTestCase.test_begin_detaching_fails_available fails with StopIteration

Bug #1412526 reported by Eric Harney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Eric Harney

Bug Description

I'm seeing this error repeatedly running tests locally on F21 with venv.

HEAD @ b3fd4e1 Merge "Verify the instance's existance in the VMAX driver"

$ ./run_tests.sh -V cinder.tests.test_volume.VolumeTestCase.test_begin_detaching_fails_available
Running `tools/with_venv.sh python setup.py testr --testr-args='--subunit --concurrency 1 cinder.tests.test_volume.VolumeTestCase.test_begin_detaching_fails_available'`
cinder.tests.test_volume.VolumeTestCase
    test_begin_detaching_fails_available FAIL

Slowest 1 tests took 0.94 secs:
cinder.tests.test_volume.VolumeTestCase
    test_begin_detaching_fails_available 0.94

======================================================================
FAIL: cinder.tests.test_volume.VolumeTestCase.test_begin_detaching_fails_available
----------------------------------------------------------------------
Traceback (most recent call last):
_StringException: stderr: {{{
/home/eharney/src/cinder-review1/.venv/lib/python2.7/site-packages/pkg_resources/__init__.py:2316: DeprecationWarning: The oslo namespace package is deprecated. Please use oslo_db instead.
  module = __import__(self.module_name, fromlist=['__name__'], level=0)
/home/eharney/src/cinder-review1/.venv/lib/python2.7/site-packages/migrate/changeset/constraint.py:85: SAWarning: Table 'encryption' specifies columns 'volume_type_id' as primary_key=True, not matching locally specified columns 'encryption_id'; setting the current primary key columns to 'encryption_id'. This warning may become an exception in a future release
  self._set_parent(table)
No handlers could be found for logger "cinder.volume.drivers.lvm"
}}}

Traceback (most recent call last):
  File "/home/eharney/src/cinder-review1/cinder/tests/test_volume.py", line 2410, in test_begin_detaching_fails_available
    self.context, volume)
  File "/home/eharney/src/cinder-review1/.venv/lib/python2.7/site-packages/testtools/testcase.py", line 420, in assertRaises
    self.assertThat(our_callable, matcher)
  File "/home/eharney/src/cinder-review1/.venv/lib/python2.7/site-packages/testtools/testcase.py", line 431, in assertThat
    mismatch_error = self._matchHelper(matchee, matcher, message, verbose)
  File "/home/eharney/src/cinder-review1/.venv/lib/python2.7/site-packages/testtools/testcase.py", line 481, in _matchHelper
    mismatch = matcher.match(matchee)
  File "/home/eharney/src/cinder-review1/.venv/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 108, in match
    mismatch = self.exception_matcher.match(exc_info)
  File "/home/eharney/src/cinder-review1/.venv/lib/python2.7/site-packages/testtools/matchers/_higherorder.py", line 62, in match
    mismatch = matcher.match(matchee)
  File "/home/eharney/src/cinder-review1/.venv/lib/python2.7/site-packages/testtools/testcase.py", line 412, in match
    reraise(*matchee)
  File "/home/eharney/src/cinder-review1/.venv/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 101, in match
    result = matchee()
  File "/home/eharney/src/cinder-review1/.venv/lib/python2.7/site-packages/testtools/testcase.py", line 965, in __call__
    return self._callable_object(*self._args, **self._kwargs)
  File "/home/eharney/src/cinder-review1/cinder/volume/api.py", line 86, in wrapped
    check_policy(context, func.__name__, target_obj)
  File "/home/eharney/src/cinder-review1/cinder/volume/api.py", line 99, in check_policy
    cinder.policy.enforce(context, _action, target)
  File "/home/eharney/src/cinder-review1/cinder/policy.py", line 68, in enforce
    action=action)
  File "/home/eharney/src/cinder-review1/cinder/openstack/common/policy.py", line 325, in enforce
    self.load_rules()
  File "/home/eharney/src/cinder-review1/cinder/openstack/common/policy.py", line 262, in load_rules
    force_reload, False)
  File "/home/eharney/src/cinder-review1/cinder/openstack/common/policy.py", line 267, in _walk_through_policy_directory
    policy_files = next(os.walk(path))[2]
StopIteration
Traceback (most recent call last):
_StringException: Empty attachments:
  stdout

stderr: {{{
/home/eharney/src/cinder-review1/.venv/lib/python2.7/site-packages/pkg_resources/__init__.py:2316: DeprecationWarning: The oslo namespace package is deprecated. Please use oslo_db instead.
  module = __import__(self.module_name, fromlist=['__name__'], level=0)
/home/eharney/src/cinder-review1/.venv/lib/python2.7/site-packages/migrate/changeset/constraint.py:85: SAWarning: Table 'encryption' specifies columns 'volume_type_id' as primary_key=True, not matching locally specified columns 'encryption_id'; setting the current primary key columns to 'encryption_id'. This warning may become an exception in a future release
  self._set_parent(table)
No handlers could be found for logger "cinder.volume.drivers.lvm"
}}}

Traceback (most recent call last):
  File "/home/eharney/src/cinder-review1/cinder/tests/test_volume.py", line 2410, in test_begin_detaching_fails_available
    self.context, volume)
  File "/home/eharney/src/cinder-review1/.venv/lib/python2.7/site-packages/testtools/testcase.py", line 420, in assertRaises
    self.assertThat(our_callable, matcher)
  File "/home/eharney/src/cinder-review1/.venv/lib/python2.7/site-packages/testtools/testcase.py", line 431, in assertThat
    mismatch_error = self._matchHelper(matchee, matcher, message, verbose)
  File "/home/eharney/src/cinder-review1/.venv/lib/python2.7/site-packages/testtools/testcase.py", line 481, in _matchHelper
    mismatch = matcher.match(matchee)
  File "/home/eharney/src/cinder-review1/.venv/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 108, in match
    mismatch = self.exception_matcher.match(exc_info)
  File "/home/eharney/src/cinder-review1/.venv/lib/python2.7/site-packages/testtools/matchers/_higherorder.py", line 62, in match
    mismatch = matcher.match(matchee)
  File "/home/eharney/src/cinder-review1/.venv/lib/python2.7/site-packages/testtools/testcase.py", line 412, in match
    reraise(*matchee)
  File "/home/eharney/src/cinder-review1/.venv/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 101, in match
    result = matchee()
  File "/home/eharney/src/cinder-review1/.venv/lib/python2.7/site-packages/testtools/testcase.py", line 965, in __call__
    return self._callable_object(*self._args, **self._kwargs)
  File "/home/eharney/src/cinder-review1/cinder/volume/api.py", line 86, in wrapped
    check_policy(context, func.__name__, target_obj)
  File "/home/eharney/src/cinder-review1/cinder/volume/api.py", line 99, in check_policy
    cinder.policy.enforce(context, _action, target)
  File "/home/eharney/src/cinder-review1/cinder/policy.py", line 68, in enforce
    action=action)
  File "/home/eharney/src/cinder-review1/cinder/openstack/common/policy.py", line 325, in enforce
    self.load_rules()
  File "/home/eharney/src/cinder-review1/cinder/openstack/common/policy.py", line 262, in load_rules
    force_reload, False)
  File "/home/eharney/src/cinder-review1/cinder/openstack/common/policy.py", line 267, in _walk_through_policy_directory
    policy_files = next(os.walk(path))[2]
StopIteration

Traceback (most recent call last):
_StringException: Empty attachments:
  stdout

stderr: {{{
/home/eharney/src/cinder-review1/.venv/lib/python2.7/site-packages/pkg_resources/__init__.py:2316: DeprecationWarning: The oslo namespace package is deprecated. Please use oslo_db instead.
  module = __import__(self.module_name, fromlist=['__name__'], level=0)
/home/eharney/src/cinder-review1/.venv/lib/python2.7/site-packages/migrate/changeset/constraint.py:85: SAWarning: Table 'encryption' specifies columns 'volume_type_id' as primary_key=True, not matching locally specified columns 'encryption_id'; setting the current primary key columns to 'encryption_id'. This warning may become an exception in a future release
  self._set_parent(table)
No handlers could be found for logger "cinder.volume.drivers.lvm"
}}}

Traceback (most recent call last):
  File "/home/eharney/src/cinder-review1/cinder/tests/test_volume.py", line 2410, in test_begin_detaching_fails_available
    self.context, volume)
  File "/home/eharney/src/cinder-review1/.venv/lib/python2.7/site-packages/testtools/testcase.py", line 420, in assertRaises
    self.assertThat(our_callable, matcher)
  File "/home/eharney/src/cinder-review1/.venv/lib/python2.7/site-packages/testtools/testcase.py", line 431, in assertThat
    mismatch_error = self._matchHelper(matchee, matcher, message, verbose)
  File "/home/eharney/src/cinder-review1/.venv/lib/python2.7/site-packages/testtools/testcase.py", line 481, in _matchHelper
    mismatch = matcher.match(matchee)
  File "/home/eharney/src/cinder-review1/.venv/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 108, in match
    mismatch = self.exception_matcher.match(exc_info)
  File "/home/eharney/src/cinder-review1/.venv/lib/python2.7/site-packages/testtools/matchers/_higherorder.py", line 62, in match
    mismatch = matcher.match(matchee)
  File "/home/eharney/src/cinder-review1/.venv/lib/python2.7/site-packages/testtools/testcase.py", line 412, in match
    reraise(*matchee)
  File "/home/eharney/src/cinder-review1/.venv/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 101, in match
    result = matchee()
  File "/home/eharney/src/cinder-review1/.venv/lib/python2.7/site-packages/testtools/testcase.py", line 965, in __call__
    return self._callable_object(*self._args, **self._kwargs)
  File "/home/eharney/src/cinder-review1/cinder/volume/api.py", line 86, in wrapped
    check_policy(context, func.__name__, target_obj)
  File "/home/eharney/src/cinder-review1/cinder/volume/api.py", line 99, in check_policy
    cinder.policy.enforce(context, _action, target)
  File "/home/eharney/src/cinder-review1/cinder/policy.py", line 68, in enforce
    action=action)
  File "/home/eharney/src/cinder-review1/cinder/openstack/common/policy.py", line 325, in enforce
    self.load_rules()
  File "/home/eharney/src/cinder-review1/cinder/openstack/common/policy.py", line 262, in load_rules
    force_reload, False)
  File "/home/eharney/src/cinder-review1/cinder/openstack/common/policy.py", line 267, in _walk_through_policy_directory
    policy_files = next(os.walk(path))[2]
StopIteration

Ran 1 test in 8.256s

FAILED (failures=1)

Tags: tests
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/148327

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

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

commit 892ef5d6dbedbebcc500f1edd12f6218baf44b65
Author: Eric Harney <email address hidden>
Date: Mon Jan 19 13:10:00 2015 -0500

    Add policy_dirs conf fixture

    Unit tests that call into the policy enforcer from openstack
    common will try to load files from the default directory of
    'policy.d'.

    Set the policy_dirs option to [] for unit tests since tests
    are not trying to use policy from a directory like this, and
    this will prevent test failures.

    Change-Id: I7645179aeab3713a5addfccb0bb44a28e8fc4e87
    Closes-Bug: #1412526

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