unit tests mocking private symbol _CallContext

Bug #1412836 reported by Doug Hellmann
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Critical
Angus Salkeld
Juno
Fix Released
Critical
Michael Kerrin

Bug Description

======================================================================
FAIL: heat.tests.test_engine_service.StackServiceCreateUpdateDeleteTest.test_stack_delete_other_engine_active_lock_succeeded
tags: worker-1
----------------------------------------------------------------------
pythonlogging:'': {{{WARNING [heat.engine.environment] Changing AWS::CloudWatch::Alarm from OS::Heat::CWLiteAlarm to OS::Heat::CWLiteAlarm}}}

Traceback (most recent call last):
_StringException: Empty attachments:
  pythonlogging:'alembic'
  pythonlogging:'cinderclient'
  pythonlogging:'cliff'
  pythonlogging:'heat-provision'
  pythonlogging:'heat_integrationtests'
  pythonlogging:'heatclient'
  pythonlogging:'iso8601'
  pythonlogging:'keystoneclient'
  pythonlogging:'migrate'
  pythonlogging:'neutronclient'
  pythonlogging:'novaclient'
  pythonlogging:'oslo_config'
  pythonlogging:'oslo_db'
  pythonlogging:'oslo_messaging'
  pythonlogging:'oslo_middleware'
  pythonlogging:'oslo_utils'
  pythonlogging:'requests'
  pythonlogging:'routes'
  pythonlogging:'saharaclient'
  pythonlogging:'sqlalchemy'
  pythonlogging:'stevedore'
  pythonlogging:'swiftclient'
  pythonlogging:'troveclient'

pythonlogging:'': {{{WARNING [heat.engine.environment] Changing AWS::CloudWatch::Alarm from OS::Heat::CWLiteAlarm to OS::Heat::CWLiteAlarm}}}

Traceback (most recent call last):
  File "heat/tests/test_engine_service.py", line 896, in test_stack_delete_other_engine_active_lock_succeeded
    self.m.StubOutWithMock(rpc_client._CallContext, 'call')
AttributeError: 'module' object has no attribute '_CallContext'

Traceback (most recent call last):
_StringException: Empty attachments:
  pythonlogging:'alembic'
  pythonlogging:'cinderclient'
  pythonlogging:'cliff'
  pythonlogging:'heat-provision'
  pythonlogging:'heat_integrationtests'
  pythonlogging:'heatclient'
  pythonlogging:'iso8601'
  pythonlogging:'keystoneclient'
  pythonlogging:'migrate'
  pythonlogging:'neutronclient'
  pythonlogging:'novaclient'
  pythonlogging:'oslo_config'
  pythonlogging:'oslo_db'
  pythonlogging:'oslo_messaging'
  pythonlogging:'oslo_middleware'
  pythonlogging:'oslo_utils'
  pythonlogging:'requests'
  pythonlogging:'routes'
  pythonlogging:'saharaclient'
  pythonlogging:'sqlalchemy'
  pythonlogging:'stevedore'
  pythonlogging:'swiftclient'
  pythonlogging:'troveclient'

pythonlogging:'': {{{WARNING [heat.engine.environment] Changing AWS::CloudWatch::Alarm from OS::Heat::CWLiteAlarm to OS::Heat::CWLiteAlarm}}}

Traceback (most recent call last):
  File "heat/tests/test_engine_service.py", line 896, in test_stack_delete_other_engine_active_lock_succeeded
    self.m.StubOutWithMock(rpc_client._CallContext, 'call')
AttributeError: 'module' object has no attribute '_CallContext'
======================================================================
FAIL: heat.tests.test_engine_service.StackServiceCreateUpdateDeleteTest.test_stack_delete_other_engine_active_lock_failed
tags: worker-0
----------------------------------------------------------------------
pythonlogging:'': {{{WARNING [heat.engine.environment] Changing AWS::CloudWatch::Alarm from OS::Heat::CWLiteAlarm to OS::Heat::CWLiteAlarm}}}

Traceback (most recent call last):
_StringException: Empty attachments:
  pythonlogging:'alembic'
  pythonlogging:'cliff'
  pythonlogging:'heat-provision'
  pythonlogging:'heat_integrationtests'
  pythonlogging:'heatclient'
  pheat/engine/resources/neutron/neutron.py:149: UserWarning: neutron.NeutronResource.get_secgroup_uuids is deprecated. Use self.client_plugin("neutron").get_secgroup_uuids
  warnings.warn('neutron.NeutronResource.get_secgroup_uuids is '
   ERROR [oslo_messaging._drivers.common] Returning exception Not found to caller
   ERROR [oslo_messaging._drivers.common] ['NotFound: Not found\n']
   ERROR [oslo_messaging._drivers.common] Returning exception Not found to caller
   ERROR [oslo_messaging._drivers.common] ['NotFound: Not found\n']
heat/engine/environment.py:230: UserWarning: OS::Heat::CWLiteAlarm is deprecated, use OS::Ceilometer::Alarm instead.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: The HARestarter resource type is unsupported and will be removed in a future release of Heat, once it has support for auto-healing any type of resource. Note that HARestarter does *not* actually restart servers - it deletes and then recreates them. It also does the same to all dependent resources, and may therefore exhibit unexpected and undesirable behaviour. Avoid.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: RouterGateway resource is deprecated and should not be used. Instead use the `external_gateway_info` property in the router resource to set up the gateway.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: OS::Heat::CWLiteAlarm is deprecated, use OS::Ceilometer::Alarm instead.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: The HARestarter resource type is unsupported and will be removed in a future release of Heat, once it has support for auto-healing any type of resource. Note that HARestarter does *not* actually restart servers - it deletes and then recreates them. It also does the same to all dependent resources, and may therefore exhibit unexpected and undesirable behaviour. Avoid.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: RouterGateway resource is deprecated and should not be used. Instead use the `external_gateway_info` property in the router resource to set up the gateway.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: OS::Heat::CWLiteAlarm is deprecated, use OS::Ceilometer::Alarm instead.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: The HARestarter resource type is unsupported and will be removed in a future release of Heat, once it has support for auto-healing any type of resource. Note that HARestarter does *not* actually restart servers - it deletes and then recreates them. It also does the same to all dependent resources, and may therefore exhibit unexpected and undesirable behaviour. Avoid.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: RouterGateway resource is deprecated and should not be used. Instead use the `external_gateway_info` property in the router resource to set up the gateway.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: OS::Heat::CWLiteAlarm is deprecated, use OS::Ceilometer::Alarm instead.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: The HARestarter resource type is unsupported and will be removed in a future release of Heat, once it has support for auto-healing any type of resource. Note that HARestarter does *not* actually restart servers - it deletes and then recreates them. It also does the same to all dependent resources, and may therefore exhibit unexpected and undesirable behaviour. Avoid.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: RouterGateway resource is deprecated and should not be used. Instead use the `external_gateway_info` property in the router resource to set up the gateway.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: OS::Heat::CWLiteAlarm is deprecated, use OS::Ceilometer::Alarm instead.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: The HARestarter resource type is unsupported and will be removed in a future release of Heat, once it has support for auto-healing any type of resource. Note that HARestarter does *not* actually restart servers - it deletes and then recreates them. It also does the same to all dependent resources, and may therefore exhibit unexpected and undesirable behaviour. Avoid.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: RouterGateway resource is deprecated and should not be used. Instead use the `external_gateway_info` property in the router resource to set up the gateway.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: OS::Heat::CWLiteAlarm is deprecated, use OS::Ceilometer::Alarm instead.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: The HARestarter resource type is unsupported and will be removed in a future release of Heat, once it has support for auto-healing any type of resource. Note that HARestarter does *not* actually restart servers - it deletes and then recreates them. It also does the same to all dependent resources, and may therefore exhibit unexpected and undesirable behaviour. Avoid.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: RouterGateway resource is deprecated and should not be used. Instead use the `external_gateway_info` property in the router resource to set up the gateway.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: OS::Heat::CWLiteAlarm is deprecated, use OS::Ceilometer::Alarm instead.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: The HARestarter resource type is unsupported and will be removed in a future release of Heat, once it has support for auto-healing any type of resource. Note that HARestarter does *not* actually restart servers - it deletes and then recreates them. It also does the same to all dependent resources, and may therefore exhibit unexpected and undesirable behaviour. Avoid.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: RouterGateway resource is deprecated and should not be used. Instead use the `external_gateway_info` property in the router resource to set up the gateway.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: OS::Heat::CWLiteAlarm is deprecated, use OS::Ceilometer::Alarm instead.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: The HARestarter resource type is unsupported and will be removed in a future release of Heat, once it has support for auto-healing any type of resource. Note that HARestarter does *not* actually restart servers - it deletes and then recreates them. It also does the same to all dependent resources, and may therefore exhibit unexpected and undesirable behaviour. Avoid.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: RouterGateway resource is deprecated and should not be used. Instead use the `external_gateway_info` property in the router resource to set up the gateway.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: OS::Heat::CWLiteAlarm is deprecated, use OS::Ceilometer::Alarm instead.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: The HARestarter resource type is unsupported and will be removed in a future release of Heat, once it has support for auto-healing any type of resource. Note that HARestarter does *not* actually restart servers - it deletes and then recreates them. It also does the same to all dependent resources, and may therefore exhibit unexpected and undesirable behaviour. Avoid.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: RouterGateway resource is deprecated and should not be used. Instead use the `external_gateway_info` property in the router resource to set up the gateway.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: OS::Heat::CWLiteAlarm is deprecated, use OS::Ceilometer::Alarm instead.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: The HARestarter resource type is unsupported and will be removed in a future release of Heat, once it has support for auto-healing any type of resource. Note that HARestarter does *not* actually restart servers - it deletes and then recreates them. It also does the same to all dependent resources, and may therefore exhibit unexpected and undesirable behaviour. Avoid.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: RouterGateway resource is deprecated and should not be used. Instead use the `external_gateway_info` property in the router resource to set up the gateway.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: OS::Heat::CWLiteAlarm is deprecated, use OS::Ceilometer::Alarm instead.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: The HARestarter resource type is unsupported and will be removed in a future release of Heat, once it has support for auto-healing any type of resource. Note that HARestarter does *not* actually restart servers - it deletes and then recreates them. It also does the same to all dependent resources, and may therefore exhibit unexpected and undesirable behaviour. Avoid.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: RouterGateway resource is deprecated and should not be used. Instead use the `external_gateway_info` property in the router resource to set up the gateway.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: OS::Heat::CWLiteAlarm is deprecated, use OS::Ceilometer::Alarm instead.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: The HARestarter resource type is unsupported and will be removed in a future release of Heat, once it has support for auto-healing any type of resource. Note that HARestarter does *not* actually restart servers - it deletes and then recreates them. It also does the same to all dependent resources, and may therefore exhibit unexpected and undesirable behaviour. Avoid.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: RouterGateway resource is deprecated and should not be used. Instead use the `external_gateway_info` property in the router resource to set up the gateway.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: Use OS::Neutron::Net instead.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: Use OS::Nova::Server instead.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: OS::Heat::CWLiteAlarm is deprecated, use OS::Ceilometer::Alarm instead.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: The HARestarter resource type is unsupported and will be removed in a future release of Heat, once it has support for auto-healing any type of resource. Note that HARestarter does *not* actually restart servers - it deletes and then recreates them. It also does the same to all dependent resources, and may therefore exhibit unexpected and undesirable behaviour. Avoid.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: RouterGateway resource is deprecated and should not be used. Instead use the `external_gateway_info` property in the router resource to set up the gateway.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: OS::Heat::CWLiteAlarm is deprecated, use OS::Ceilometer::Alarm instead.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: The HARestarter resource type is unsupported and will be removed in a future release of Heat, once it has support for auto-healing any type of resource. Note that HARestarter does *not* actually restart servers - it deletes and then recreates them. It also does the same to all dependent resources, and may therefore exhibit unexpected and undesirable behaviour. Avoid.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: RouterGateway resource is deprecated and should not be used. Instead use the `external_gateway_info` property in the router resource to set up the gateway.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: OS::Heat::CWLiteAlarm is deprecated, use OS::Ceilometer::Alarm instead.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: The HARestarter resource type is unsupported and will be removed in a future release of Heat, once it has support for auto-healing any type of resource. Note that HARestarter does *not* actually restart servers - it deletes and then recreates them. It also does the same to all dependent resources, and may therefore exhibit unexpected and undesirable behaviour. Avoid.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: RouterGateway resource is deprecated and should not be used. Instead use the `external_gateway_info` property in the router resource to set up the gateway.
  warnings.warn(six.text_type(info.value.support_status.message))
heat/engine/environment.py:230: UserWarning: Use OS::Nova::Server instead.
  warnings.warn(six.text_type(info.value.support_status.message))
ythonlogging:'iso8601'
  pythonlogging:'keystoneclient'
  pythonlogging:'migrate'
  pythonlogging:'neutronclient'
  pythonlogging:'novaclient'
  pythonlogging:'oslo_config'
  pythonlogging:'oslo_db'
  pythonlogging:'oslo_messaging'
  pythonlogging:'oslo_middleware'
  pythonlogging:'oslo_utils'
  pythonlogging:'requests'
  pythonlogging:'routes'
  pythonlogging:'saharaclient'
  pythonlogging:'sqlalchemy'
  pythonlogging:'stevedore'
  pythonlogging:'swiftclient'
  pythonlogging:'troveclient'

pythonlogging:'': {{{WARNING [heat.engine.environment] Changing AWS::CloudWatch::Alarm from OS::Heat::CWLiteAlarm to OS::Heat::CWLiteAlarm}}}

Traceback (most recent call last):
  File "heat/tests/test_engine_service.py", line 863, in test_stack_delete_other_engine_active_lock_failed
    self.m.StubOutWithMock(rpc_client._CallContext, 'call')
AttributeError: 'module' object has no attribute '_CallContext'

Traceback (most recent call last):
_StringException: Empty attachments:
  pythonlogging:'alembic'
  pythonlogging:'cliff'
  pythonlogging:'heat-provision'
  pythonlogging:'heat_integrationtests'
  pythonlogging:'heatclient'
  pythonlogging:'iso8601'
  pythonlogging:'keystoneclient'
  pythonlogging:'migrate'
  pythonlogging:'neutronclient'
  pythonlogging:'novaclient'
  pythonlogging:'oslo_config'
  pythonlogging:'oslo_db'
  pythonlogging:'oslo_messaging'
  pythonlogging:'oslo_middleware'
  pythonlogging:'oslo_utils'
  pythonlogging:'requests'
  pythonlogging:'routes'
  pythonlogging:'saharaclient'
  pythonlogging:'sqlalchemy'
  pythonlogging:'stevedore'
  pythonlogging:'swiftclient'
  pythonlogging:'troveclient'

pythonlogging:'': {{{WARNING [heat.engine.environment] Changing AWS::CloudWatch::Alarm from OS::Heat::CWLiteAlarm to OS::Heat::CWLiteAlarm}}}

Traceback (most recent call last):
  File "heat/tests/test_engine_service.py", line 863, in test_stack_delete_other_engine_active_lock_failed
    self.m.StubOutWithMock(rpc_client._CallContext, 'call')
AttributeError: 'module' object has no attribute '_CallContext'
Ran 3867 tests in 508.217s
FAILED (id=0, failures=2, skips=6)
error: testr failed (1)
ERROR: InvocationError: '/home/ubuntu/repos/openstack/heat/.tox/py27/bin/python setup.py testr --slowest --testr-args=^(?!heat_integrationtests)'

Revision history for this message
Steve Baker (steve-stevebaker) wrote :

Marking as critical due to impending oslo.messaging release

Changed in heat:
status: New → Triaged
importance: Undecided → Critical
Angus Salkeld (asalkeld)
Changed in heat:
assignee: nobody → Angus Salkeld (asalkeld)
milestone: none → kilo-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

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

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

Reviewed: https://review.openstack.org/150185
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=d1ca5b6cccde982c95536498bfdcc75dbcecd1d9
Submitter: Jenkins
Branch: master

commit d1ca5b6cccde982c95536498bfdcc75dbcecd1d9
Author: Angus Salkeld <email address hidden>
Date: Tue Jan 27 09:42:51 2015 +1000

    Don't mock oslo.messaging _CallContext

    This is a private method, rather mock the wrapping heat method.

    Change-Id: I364723846b8851bbaec4f35aff3ccd708c40417f
    Closes-bug: 1412836

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

Fix proposed to branch: stable/juno
Review: https://review.openstack.org/151245

Thierry Carrez (ttx)
Changed in heat:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (stable/juno)

Reviewed: https://review.openstack.org/151245
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=a194a88d2a18acf9dbf26eab05e38437f405a4d5
Submitter: Jenkins
Branch: stable/juno

commit a194a88d2a18acf9dbf26eab05e38437f405a4d5
Author: Angus Salkeld <email address hidden>
Date: Tue Jan 27 09:42:51 2015 +1000

    Don't mock oslo.messaging _CallContext

    This is a private method, rather mock the wrapping heat method.

    Change-Id: I364723846b8851bbaec4f35aff3ccd708c40417f
    Closes-bug: 1412836
    (cherry-picked from d1ca5b6cccde982c95536498bfdcc75dbcecd1d9)

Thierry Carrez (ttx)
Changed in heat:
milestone: kilo-2 → 2015.1.0
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.