test_existing_snapshot_failed_quota_reserved fails with TaskFlow 2.0

Bug #1588584 reported by Sean McGinnis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
High
Sean McGinnis
Mitaka
Fix Released
Medium
Sean McGinnis

Bug Description

With the release of TaskFlow 2.0 we now fail due to the removed Failure class. We need to move from taskflow.utils.misc.Failure to taskflow.types.failure.Failure.

2016-06-02 07:38:50.676 | cinder.tests.unit.test_volume.VolumeTestCase.test_existing_snapshot_failed_quota_reserve
2016-06-02 07:38:50.676 | ----------------------------------------------------------------------------------------
2016-06-02 07:38:50.676 |
2016-06-02 07:38:50.677 | Captured traceback:
2016-06-02 07:38:50.677 | ~~~~~~~~~~~~~~~~~~~
2016-06-02 07:38:50.677 | Traceback (most recent call last):
2016-06-02 07:38:50.677 | File "/home/jenkins/workspace/gate-cinder-python27-db/.tox/py27/local/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
2016-06-02 07:38:50.677 | return func(*args, **keywargs)
2016-06-02 07:38:50.677 | File "cinder/tests/unit/test_volume.py", line 4648, in test_existing_snapshot_failed_quota_reserve
2016-06-02 07:38:50.677 | snap)
2016-06-02 07:38:50.677 | File "/home/jenkins/workspace/gate-cinder-python27-db/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 485, in assertRaises
2016-06-02 07:38:50.677 | self.assertThat(our_callable, matcher)
2016-06-02 07:38:50.677 | File "/home/jenkins/workspace/gate-cinder-python27-db/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 496, in assertThat
2016-06-02 07:38:50.677 | mismatch_error = self._matchHelper(matchee, matcher, message, verbose)
2016-06-02 07:38:50.678 | File "/home/jenkins/workspace/gate-cinder-python27-db/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 547, in _matchHelper
2016-06-02 07:38:50.678 | mismatch = matcher.match(matchee)
2016-06-02 07:38:50.678 | File "/home/jenkins/workspace/gate-cinder-python27-db/.tox/py27/local/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 108, in match
2016-06-02 07:38:50.678 | mismatch = self.exception_matcher.match(exc_info)
2016-06-02 07:38:50.678 | File "/home/jenkins/workspace/gate-cinder-python27-db/.tox/py27/local/lib/python2.7/site-packages/testtools/matchers/_higherorder.py", line 62, in match
2016-06-02 07:38:50.678 | mismatch = matcher.match(matchee)
2016-06-02 07:38:50.678 | File "/home/jenkins/workspace/gate-cinder-python27-db/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 475, in match
2016-06-02 07:38:50.678 | reraise(*matchee)
2016-06-02 07:38:50.678 | File "/home/jenkins/workspace/gate-cinder-python27-db/.tox/py27/local/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 101, in match
2016-06-02 07:38:50.678 | result = matchee()
2016-06-02 07:38:50.678 | File "/home/jenkins/workspace/gate-cinder-python27-db/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 1049, in __call__
2016-06-02 07:38:50.678 | return self._callable_object(*self._args, **self._kwargs)
2016-06-02 07:38:50.679 | File "cinder/volume/manager.py", line 3414, in manage_existing_snapshot
2016-06-02 07:38:50.679 | flow_engine.run()
2016-06-02 07:38:50.679 | File "/home/jenkins/workspace/gate-cinder-python27-db/.tox/py27/local/lib/python2.7/site-packages/taskflow/engines/action_engine/engine.py", line 246, in run
2016-06-02 07:38:50.679 | for _state in self.run_iter(timeout=timeout):
2016-06-02 07:38:50.679 | File "/home/jenkins/workspace/gate-cinder-python27-db/.tox/py27/local/lib/python2.7/site-packages/taskflow/engines/action_engine/engine.py", line 327, in run_iter
2016-06-02 07:38:50.679 | self._change_state(states.FAILURE)
2016-06-02 07:38:50.679 | File "/home/jenkins/workspace/gate-cinder-python27-db/.tox/py27/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 221, in __exit__
2016-06-02 07:38:50.679 | self.force_reraise()
2016-06-02 07:38:50.679 | File "/home/jenkins/workspace/gate-cinder-python27-db/.tox/py27/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 197, in force_reraise
2016-06-02 07:38:50.679 | six.reraise(self.type_, self.value, self.tb)
2016-06-02 07:38:50.679 | File "/home/jenkins/workspace/gate-cinder-python27-db/.tox/py27/local/lib/python2.7/site-packages/taskflow/engines/action_engine/engine.py", line 299, in run_iter
2016-06-02 07:38:50.680 | failure.Failure.reraise_if_any(memory.failures)
2016-06-02 07:38:50.680 | File "/home/jenkins/workspace/gate-cinder-python27-db/.tox/py27/local/lib/python2.7/site-packages/taskflow/types/failure.py", line 336, in reraise_if_any
2016-06-02 07:38:50.680 | failures[0].reraise()
2016-06-02 07:38:50.680 | File "/home/jenkins/workspace/gate-cinder-python27-db/.tox/py27/local/lib/python2.7/site-packages/taskflow/types/failure.py", line 343, in reraise
2016-06-02 07:38:50.680 | six.reraise(*self._exc_info)
2016-06-02 07:38:50.680 | File "/home/jenkins/workspace/gate-cinder-python27-db/.tox/py27/local/lib/python2.7/site-packages/taskflow/engines/action_engine/executor.py", line 101, in _revert_task
2016-06-02 07:38:50.680 | result = task.revert(**arguments)
2016-06-02 07:38:50.680 | File "cinder/volume/flows/manager/manage_existing_snapshot.py", line 164, in revert
2016-06-02 07:38:50.680 | if isinstance(result, misc.Failure):
2016-06-02 07:38:50.681 | AttributeError: 'module' object has no attribute 'Failure'

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

Changed in cinder:
assignee: nobody → Sean McGinnis (sean-mcginnis)
status: New → In Progress
Changed in cinder:
importance: Undecided → High
milestone: none → newton-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

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

commit 5b82638cc7f502dfbec70f2f86bb9ecd821b00d0
Author: Sean McGinnis <email address hidden>
Date: Thu Jun 2 21:31:16 2016 -0500

    Switch to using correct TaskFlow Failure class

    Our manage_existing_snapshot code was checking for failure by
    checking if the result was a taskflow.utils.misc.Failure instance.
    This class was deprecated some time ago and has now been removed
    in the latest 2.0 TaskFlow release with TaskFlow
    commit afbfe77a7f7bad87c3e95b4f0c94cab84258a5bb.

    Switched over to using the newer and correct
    taskflow.types.failure.Failure class.

    Change-Id: I0f427b31ce25e4991ba7c32e65cb56ed575ea20d
    Closes-bug: #1588584

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/325439

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/mitaka)

Reviewed: https://review.openstack.org/325439
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=272880924364a171418adfc16fa618545287f823
Submitter: Jenkins
Branch: stable/mitaka

commit 272880924364a171418adfc16fa618545287f823
Author: Sean McGinnis <email address hidden>
Date: Thu Jun 2 21:31:16 2016 -0500

    Switch to using correct TaskFlow Failure class

    Our manage_existing_snapshot code was checking for failure by
    checking if the result was a taskflow.utils.misc.Failure instance.
    This class was deprecated some time ago and has now been removed
    in the latest 2.0 TaskFlow release with TaskFlow
    commit afbfe77a7f7bad87c3e95b4f0c94cab84258a5bb.

    Switched over to using the newer and correct
    taskflow.types.failure.Failure class.

    Change-Id: I0f427b31ce25e4991ba7c32e65cb56ed575ea20d
    Closes-bug: #1588584
    (cherry picked from commit 5b82638cc7f502dfbec70f2f86bb9ecd821b00d0)

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/cinder 9.0.0.0b2

This issue was fixed in the openstack/cinder 9.0.0.0b2 development milestone.

Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/cinder 8.1.0

This issue was fixed in the openstack/cinder 8.1.0 release.

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.