Gate broken due mock 1.1.0

Bug #1473383 reported by Lucas Alvares Gomes
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Critical
Lucas Alvares Gomes
python-ironicclient
Fix Released
Critical
Lucas Alvares Gomes

Bug Description

INFO: http://lists.openstack.org/pipermail/openstack-dev/2015-July/069156.html

OUTPUT:

[lucasagomes@lucasagomes ironic]$ tox -epy27
py27 develop-inst-nodeps: /home/lucasagomes/Projects/ironic
py27 runtests: PYTHONHASHSEED='667093199'
py27 runtests: commands[0] | bash -c TESTS_DIR=./ironic/tests/ python setup.py testr --slowest --testr-args=''
running testr
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} OS_TEST_TIMEOUT=60 ${PYTHON:-python} -m subunit.run discover -t ./ ${TESTS_DIR:-./ironic/tests/} --list
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} OS_TEST_TIMEOUT=60 ${PYTHON:-python} -m subunit.run discover -t ./ ${TESTS_DIR:-./ironic/tests/} --load-list /tmp/tmpUfC4ON
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} OS_TEST_TIMEOUT=60 ${PYTHON:-python} -m subunit.run discover -t ./ ${TESTS_DIR:-./ironic/tests/} --load-list /tmp/tmpmC3yf0
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} OS_TEST_TIMEOUT=60 ${PYTHON:-python} -m subunit.run discover -t ./ ${TESTS_DIR:-./ironic/tests/} --load-list /tmp/tmpkP2Sfv
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} OS_TEST_TIMEOUT=60 ${PYTHON:-python} -m subunit.run discover -t ./ ${TESTS_DIR:-./ironic/tests/} --load-list /tmp/tmpN_Dt83
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} OS_TEST_TIMEOUT=60 ${PYTHON:-python} -m subunit.run discover -t ./ ${TESTS_DIR:-./ironic/tests/} --load-list /tmp/tmpsKL_qI
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} OS_TEST_TIMEOUT=60 ${PYTHON:-python} -m subunit.run discover -t ./ ${TESTS_DIR:-./ironic/tests/} --load-list /tmp/tmpSH8Lu5
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} OS_TEST_TIMEOUT=60 ${PYTHON:-python} -m subunit.run discover -t ./ ${TESTS_DIR:-./ironic/tests/} --load-list /tmp/tmpkv2sEz
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} OS_TEST_TIMEOUT=60 ${PYTHON:-python} -m subunit.run discover -t ./ ${TESTS_DIR:-./ironic/tests/} --load-list /tmp/tmpZzreRU
======================================================================
FAIL: ironic.tests.conductor.test_task_manager.TaskManagerTestCase.test_excl_lock_exception_then_lock
tags: worker-6
----------------------------------------------------------------------
Empty attachments:
  pythonlogging:''
  stderr
  stdout

Traceback (most recent call last):
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 1298, in patched
    return func(*args, **keywargs)
  File "ironic/tests/conductor/test_task_manager.py", line 145, in test_excl_lock_exception_then_lock
    reserve_mock.assert_called(self.context, self.host, 'fake-node-id')
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 714, in __getattr__
    raise AttributeError(name)
AttributeError: assert_called
======================================================================
FAIL: ironic.tests.drivers.irmc.test_deploy.IRMCDeployPrivateMethodsTestCase.test__prepare_floppy_image_exception
tags: worker-5
----------------------------------------------------------------------
Empty attachments:
  pythonlogging:''
  stderr
  stdout

Traceback (most recent call last):
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 1298, in patched
    return func(*args, **keywargs)
  File "ironic/tests/drivers/irmc/test_deploy.py", line 506, in test__prepare_floppy_image_exception
    deploy_args)
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 422, in assertRaises
    self.assertThat(our_callable, matcher)
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 435, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: <function _prepare_floppy_image at 0x5dbb500> returned 'image-1be26c0b-03f2-4d2e-ae87-c02d7f33c123.img'
======================================================================
FAIL: ironic.tests.drivers.test_agent_base_vendor.TestBaseAgentVendor.test_configure_local_boot_set_boot_device_fail
tags: worker-4
----------------------------------------------------------------------
Empty attachments:
  pythonlogging:''
  stderr
  stdout

Traceback (most recent call last):
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 1298, in patched
    return func(*args, **keywargs)
  File "ironic/tests/drivers/test_agent_base_vendor.py", line 551, in test_configure_local_boot_set_boot_device_fail
    task, root_uuid='some-root-uuid')
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 422, in assertRaises
    self.assertThat(our_callable, matcher)
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 435, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: <bound method BaseAgentVendor.configure_local_boot of <ironic.drivers.modules.agent_base_vendor.BaseAgentVendor object at 0x5728a10>> returned None
======================================================================
FAIL: ironic.tests.drivers.test_agent_base_vendor.TestBaseAgentVendor.test_reboot_and_finish_deploy_power_action_fails
tags: worker-2
----------------------------------------------------------------------
Empty attachments:
  pythonlogging:''
  stderr
  stdout

Traceback (most recent call last):
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 1298, in patched
    return func(*args, **keywargs)
  File "ironic/tests/drivers/test_agent_base_vendor.py", line 443, in test_reboot_and_finish_deploy_power_action_fails
    task)
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 422, in assertRaises
    self.assertThat(our_callable, matcher)
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 435, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: <bound method BaseAgentVendor.reboot_and_finish_deploy of <ironic.drivers.modules.agent_base_vendor.BaseAgentVendor object at 0x5ed2090>> returned None
======================================================================
FAIL: ironic.tests.drivers.test_pxe.PXEDriverTestCase.test_lock_elevated
tags: worker-6
----------------------------------------------------------------------
Empty attachments:
  pythonlogging:''
  stderr
  stdout

Traceback (most recent call last):
  File "ironic/tests/drivers/test_pxe.py", line 1118, in test_lock_elevated
    task, address='123456', iqn='aaa-bbb', key='fake-56789')
  File "<string>", line 2, in pass_deploy_info
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 310, in checksig
    sig.bind(*args, **kwargs)
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 95, in fixedbind
    return self._bind(args, kwargs)
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/funcsigs/__init__.py", line 717, in _bind
    raise TypeError('too many positional arguments')
TypeError: too many positional arguments
======================================================================
FAIL: ironic.tests.drivers.test_irmc.IRMCVirtualMediaIscsiTestCase.test___init___share_fs_not_mounted_exception
tags: worker-5
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 1298, in patched
    return func(*args, **keywargs)
  File "ironic/tests/drivers/test_irmc.py", line 61, in test___init___share_fs_not_mounted_exception
    irmc.IRMCVirtualMediaIscsiDriver)
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 422, in assertRaises
    self.assertThat(our_callable, matcher)
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 433, in assertThat
    mismatch_error = self._matchHelper(matchee, matcher, message, verbose)
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 483, in _matchHelper
    mismatch = matcher.match(matchee)
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 108, in match
    mismatch = self.exception_matcher.match(exc_info)
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/testtools/matchers/_higherorder.py", line 62, in match
    mismatch = matcher.match(matchee)
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 414, in match
    reraise(*matchee)
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 101, in match
    result = matchee()
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 969, in __call__
    return self._callable_object(*self._args, **self._kwargs)
  File "ironic/drivers/irmc.py", line 47, in __init__
    self.deploy = deploy.IRMCVirtualMediaIscsiDeploy()
TypeError: __init__() should return None, not 'unicode'
======================================================================
FAIL: ironic.tests.drivers.test_irmc.IRMCVirtualMediaAgentTestCase.test___init___share_fs_not_mounted_exception
tags: worker-2
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 1298, in patched
    return func(*args, **keywargs)
  File "ironic/tests/drivers/test_irmc.py", line 100, in test___init___share_fs_not_mounted_exception
    irmc.IRMCVirtualMediaAgentDriver)
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 422, in assertRaises
    self.assertThat(our_callable, matcher)
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 433, in assertThat
    mismatch_error = self._matchHelper(matchee, matcher, message, verbose)
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 483, in _matchHelper
    mismatch = matcher.match(matchee)
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 108, in match
    mismatch = self.exception_matcher.match(exc_info)
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/testtools/matchers/_higherorder.py", line 62, in match
    mismatch = matcher.match(matchee)
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 414, in match
    reraise(*matchee)
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 101, in match
    result = matchee()
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 969, in __call__
    return self._callable_object(*self._args, **self._kwargs)
  File "ironic/drivers/irmc.py", line 70, in __init__
    self.deploy = deploy.IRMCVirtualMediaAgentDeploy()
TypeError: __init__() should return None, not 'unicode'
======================================================================
FAIL: ironic.tests.drivers.test_iscsi_deploy.IscsiDeployMethodsTestCase.test_continue_deploy_fail
tags: worker-2
----------------------------------------------------------------------
Empty attachments:
  pythonlogging:''
  stderr
  stdout

Traceback (most recent call last):
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 1298, in patched
    return func(*args, **keywargs)
  File "ironic/tests/drivers/test_iscsi_deploy.py", line 610, in test_continue_deploy_fail
    task, **kwargs)
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 422, in assertRaises
    self.assertThat(our_callable, matcher)
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 433, in assertThat
    mismatch_error = self._matchHelper(matchee, matcher, message, verbose)
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 483, in _matchHelper
    mismatch = matcher.match(matchee)
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 108, in match
    mismatch = self.exception_matcher.match(exc_info)
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/testtools/matchers/_higherorder.py", line 62, in match
    mismatch = matcher.match(matchee)
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 414, in match
    reraise(*matchee)
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/testtools/matchers/_exception.py", line 101, in match
    result = matchee()
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/testtools/testcase.py", line 969, in __call__
    return self._callable_object(*self._args, **self._kwargs)
  File "ironic/drivers/modules/iscsi_deploy.py", line 390, in continue_deploy
    root_uuid_or_disk_id = uuid_dict_returned.get(
AttributeError: 'str' object has no attribute 'get'
======================================================================
FAIL: ironic.tests.drivers.ilo.test_deploy.VendorPassthruTestCase.test_pass_deploy_info_create_boot_iso_fail
tags: worker-0
----------------------------------------------------------------------
Empty attachments:
  pythonlogging:''
  stderr
  stdout

Traceback (most recent call last):
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 1298, in patched
    return func(*args, **keywargs)
  File "ironic/tests/drivers/ilo/test_deploy.py", line 1066, in test_pass_deploy_info_create_boot_iso_fail
    task.driver.vendor.pass_deploy_info(task, **kwargs)
  File "ironic/drivers/base.py", line 617, in passthru_handler
    LOG.exception(passthru_logmessage, api_method)
  File "/home/lucasagomes/Projects/ironic/.tox/py27/lib/python2.7/site-packages/oslo_utils/excutils.py", line 119, in __exit__
    six.reraise(self.type_, self.value, self.tb)
  File "ironic/drivers/base.py", line 614, in passthru_handler
    return func(*args, **kwargs)
  File "ironic/conductor/task_manager.py", line 129, in wrapper
    return f(*args, **kwargs)
  File "ironic/drivers/modules/ilo/deploy.py", line 894, in pass_deploy_info
    iscsi_deploy.finish_deploy(task, kwargs.get('address'))
  File "ironic/drivers/modules/iscsi_deploy.py", line 692, in finish_deploy
    raise exception.InstanceDeployFailure(msg)
ironic.common.exception.InstanceDeployFailure: Failed to notify ramdisk to reboot after bootloader installation. Error: [Errno 22] EINVAL
Ran 2404 (-1) tests in 13.405s (-3.576s)
FAILED (id=855, failures=9, skips=15)
error: testr failed (1)
ERROR: InvocationError: "/usr/bin/bash -c TESTS_DIR=./ironic/tests/ python setup.py testr --slowest --testr-args=''"
_____________________________________________________________________________________________________ summary _____________________________________________________________________________________________________
ERROR: py27: commands failed

Changed in ironic:
assignee: nobody → Lucas Alvares Gomes (lucasagomes)
importance: Undecided → Critical
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

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

Changed in ironic:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/200466
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=09433e41532d1b16f91043d41d42d696482b27a0
Submitter: Jenkins
Branch: master

commit 09433e41532d1b16f91043d41d42d696482b27a0
Author: Lucas Alvares Gomes <email address hidden>
Date: Fri Jul 10 11:41:02 2015 +0100

    Fix unittests due mock 1.1.0 release

    More info:
    http://lists.openstack.org/pipermail/openstack-dev/2015-July/069156.html

    Closes-Bug: #1473383
    Change-Id: I7a98dfa60183bc785f2d0e58a4c6e37189c3ee89

Changed in ironic:
status: In Progress → Fix Committed
Changed in python-ironicclient:
importance: Undecided → Critical
assignee: nobody → Lucas Alvares Gomes (lucasagomes)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-ironicclient (master)

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

Changed in python-ironicclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-ironicclient (master)

Reviewed: https://review.openstack.org/201043
Committed: https://git.openstack.org/cgit/openstack/python-ironicclient/commit/?id=3305c78aa23aaed531a009fc04ed068c9ce2c279
Submitter: Jenkins
Branch: master

commit 3305c78aa23aaed531a009fc04ed068c9ce2c279
Author: Lucas Alvares Gomes <email address hidden>
Date: Mon Jul 13 10:04:39 2015 +0100

    Fix unittests due mock 1.1.0 release

    More info:
    http://lists.openstack.org/pipermail/openstack-dev/2015-July/069156.html

    Closes-Bug: #1473383
    Change-Id: Ic2f3addb757fc748d565a49a24938306cd9f04b2

Changed in python-ironicclient:
status: In Progress → Fix Committed
Revision history for this message
Mark Goddard (mgoddard) wrote :

This also appears to affect the stable/kilo branch.

Revision history for this message
Lucas Alvares Gomes (lucasagomes) wrote :

HI @Mark,

I thought this https://review.openstack.org/#/c/188640/ was fixing it for the kilo branch?

Changed in ironic:
milestone: none → 4.0.0
status: Fix Committed → Fix Released
Changed in python-ironicclient:
milestone: none → 0.8.0
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/338002
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=e65fb13da8477c4e959aaf501af7d195391d13d7
Submitter: Jenkins
Branch: master

commit e65fb13da8477c4e959aaf501af7d195391d13d7
Author: Yuiko Takada Mori <email address hidden>
Date: Wed Jul 6 15:08:01 2016 +0900

    Remove iterated form of side effects

    Currently, mock side_effect is iterated form because of bug #1473381,
    but this bug has been fixed already.
    This patch set reverts it to previous form.

    Change-Id: Iff81effb75179be20c3f87b718a1509af51435bf
    Closes-Bug: #1473383

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote : Fix included in openstack/ironic 6.1.0

This issue was fixed in the openstack/ironic 6.1.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.