os-brick 1.7.0 breaks 2 unit tests in cinder

Bug #1638861 reported by Markus Zoeller (markus_z)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
High
Markus Zoeller (markus_z)
os-brick
Invalid
High
Sean McGinnis

Bug Description

Description
===========
os-brick 1.7.0 seems to break 2 unit tests of cinder called in test job
"gate-cross-cinder-python27-db-ubuntu-xenial". The update of the upper-
constraints.txt file complained in https://review.openstack.org/#/c/392244/1.

Steps to reproduce
==================
* $ git clone https://github.com/openstack/cinder.git
* $ tox -e py27
* # wait for the result
* # This will pass right now, because os-brick 1.2.0 gets pulled.
* $ source .tox/py27/bin/activate
* $ (py27) pip install -U os-brick
* $ (py27) pip show os-brick # this shows version 1.7.0 now
* $ tox -e py27 # two unit tests will fail now

cinder.tests.unit.volume.drivers.test_lvm_driver.LVMVolumeDriverTestCase
    test_lvm_migrate_volume_proceed_with_thin
    test_lvm_migrate_volume_proceed

Expected result
===============
Cinders unit tests pass with os-brick 1.7.0

Actual result
=============
Failed unit tests:
    test_lvm_migrate_volume_proceed_with_thin
    test_lvm_migrate_volume_proceed

Environment
===========
Cinder version:
    [09:57:13 markus@oc5730007623 ~/git/cinder ] $ git log --oneline -1
    f6ab36d Merge "To fix miscellaneous bugs in OVOs"

Logs & Configs
==============
Stacktrace: http://paste.openstack.org/show/587621/

Changed in os-brick:
assignee: nobody → Sean McGinnis (sean-mcginnis)
importance: Undecided → High
status: New → Confirmed
description: updated
Changed in cinder:
assignee: nobody → Sean McGinnis (sean-mcginnis)
importance: Undecided → High
status: New → Confirmed
Changed in os-brick:
status: Confirmed → Invalid
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/393344

Changed in cinder:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Changed in cinder:
assignee: Sean McGinnis (sean-mcginnis) → Markus Zoeller (markus_z) (mzoeller)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (master)

Change abandoned by Sean McGinnis (<email address hidden>) on branch: master
Review: https://review.openstack.org/393344
Reason: Being addressed by https://review.openstack.org/393349

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

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

commit dc84c1de76e51487c8b7a72ba623c12ee2747879
Author: Markus Zoeller <email address hidden>
Date: Thu Nov 3 15:38:26 2016 +0100

    Fix unit tests for LVM migration with os-brick 1.7.0

    Commit a9f50dd3823ea2e9c568a1fdd970e268955dca9f in os-brick 1.7.0
    introduced the usage of safe_decode() of the results of CLI commands.
    This revealed that two unit tests in Cinder use a mocked "execute"
    method of os-brick *without* specifying the return value. This lead
    to an exception in the safe_decode() method as it isn't able to
    decode MagicMocks:
        TypeError: <class 'mock.mock.MagicMock'> can't be decoded

    This change adds return values to the mocked "execute" method which
    can be decoded safely.

    Closes-Bug: 1638861
    Change-Id: I9b0a6c5be41c471d1a7782f77927ffe3b9652043

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

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/394505

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (stable/mitaka)

Change abandoned by Sean McGinnis (<email address hidden>) on branch: stable/mitaka
Review: https://review.openstack.org/394528
Reason: Redone with matching commit id.

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

Reviewed: https://review.openstack.org/394505
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=80e5a7913633f150ccbe8574007b846f1b789293
Submitter: Jenkins
Branch: stable/newton

commit 80e5a7913633f150ccbe8574007b846f1b789293
Author: Markus Zoeller <email address hidden>
Date: Thu Nov 3 15:38:26 2016 +0100

    Fix unit tests for LVM migration with os-brick 1.7.0

    Commit a9f50dd3823ea2e9c568a1fdd970e268955dca9f in os-brick 1.7.0
    introduced the usage of safe_decode() of the results of CLI commands.
    This revealed that two unit tests in Cinder use a mocked "execute"
    method of os-brick *without* specifying the return value. This lead
    to an exception in the safe_decode() method as it isn't able to
    decode MagicMocks:
        TypeError: <class 'mock.mock.MagicMock'> can't be decoded

    This change adds return values to the mocked "execute" method which
    can be decoded safely.

    Closes-Bug: 1638861
    Change-Id: I9b0a6c5be41c471d1a7782f77927ffe3b9652043
    (cherry picked from commit dc84c1de76e51487c8b7a72ba623c12ee2747879)

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

Reviewed: https://review.openstack.org/394610
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=753a147768be3ea9813f45c6adc414df69f50dee
Submitter: Jenkins
Branch: stable/mitaka

commit 753a147768be3ea9813f45c6adc414df69f50dee
Author: Sean McGinnis <email address hidden>
Date: Mon Nov 7 10:44:21 2016 -0600

    Fix unit tests for LVM migration with os-brick 1.7.0

    Commit a9f50dd3823ea2e9c568a1fdd970e268955dca9f in os-brick 1.7.0
    introduced the usage of safe_decode() of the results of CLI commands.
    This revealed that two unit tests in Cinder use a mocked "execute"
    method of os-brick *without* specifying the return value. This lead
    to an exception in the safe_decode() method as it isn't able to
    decode MagicMocks:
        TypeError: <class 'mock.mock.MagicMock'> can't be decoded

    This change adds return values to the mocked "execute" method which
    can be decoded safely.

    This change can not be cherry picked from the newton and ocata fixes
    (dc84c1de76e51487c8b7a72ba623c12ee2747879) due to refactoring of the
    test_volume unit test files.

    Co-Authored-By: Markus Zoeller <email address hidden>

    Change-Id: I9b0a6c5be41c471d1a7782f77927ffe3b9652043
    Closes-Bug: 1638861

tags: added: in-stable-mitaka
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (driverfixes/mitaka)

Fix proposed to branch: driverfixes/mitaka
Review: https://review.openstack.org/394679

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 9.1.0

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 10.0.0.0b1

This issue was fixed in the openstack/cinder 10.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 9.1.0

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

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

Reviewed: https://review.openstack.org/394679
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=a73296e65c433da674979db3696c80f6e051b16f
Submitter: Jenkins
Branch: driverfixes/mitaka

commit a73296e65c433da674979db3696c80f6e051b16f
Author: Sean McGinnis <email address hidden>
Date: Mon Nov 7 10:44:21 2016 -0600

    Fix unit tests for LVM migration with os-brick 1.7.0

    Commit a9f50dd3823ea2e9c568a1fdd970e268955dca9f in os-brick 1.7.0
    introduced the usage of safe_decode() of the results of CLI commands.
    This revealed that two unit tests in Cinder use a mocked "execute"
    method of os-brick *without* specifying the return value. This lead
    to an exception in the safe_decode() method as it isn't able to
    decode MagicMocks:
        TypeError: <class 'mock.mock.MagicMock'> can't be decoded

    This change adds return values to the mocked "execute" method which
    can be decoded safely.

    This change can not be cherry picked from the newton and ocata fixes
    (dc84c1de76e51487c8b7a72ba623c12ee2747879) due to refactoring of the
    test_volume unit test files.

    Co-Authored-By: Markus Zoeller <email address hidden>

    Change-Id: I9b0a6c5be41c471d1a7782f77927ffe3b9652043
    Closes-Bug: 1638861
    (cherry picked from commit 753a147768be3ea9813f45c6adc414df69f50dee)

tags: added: in-driverfixes-mitaka
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.