test_engine_service.test_resource_schema fails intermittently

Bug #1481020 reported by Sirushti Murugesan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Medium
Sergey Kraynev

Bug Description

2015-08-01 15:40:36.479 | FAIL: heat.tests.test_engine_service.StackServiceTest.test_resource_schema
2015-08-01 15:40:36.479 | tags: worker-0
2015-08-01 15:40:36.480 | ----------------------------------------------------------------------
2015-08-01 15:40:36.480 | Empty attachments:
2015-08-01 15:40:36.480 | pythonlogging:'alembic'
2015-08-01 15:40:36.480 | pythonlogging:'barbicanclient'
2015-08-01 15:40:36.480 | pythonlogging:'cinderclient'
2015-08-01 15:40:36.480 | pythonlogging:'cliff'
2015-08-01 15:40:36.480 | pythonlogging:'concurrent'
2015-08-01 15:40:36.480 | pythonlogging:'dogpile'
2015-08-01 15:40:36.480 | pythonlogging:'heat-provision'
2015-08-01 15:40:36.480 | pythonlogging:'heat_integrationtests'
2015-08-01 15:40:36.480 | pythonlogging:'heatclient'
2015-08-01 15:40:36.480 | pythonlogging:'iso8601'
2015-08-01 15:40:36.481 | pythonlogging:'keystoneclient'
2015-08-01 15:40:36.481 | pythonlogging:'keystonemiddleware'
2015-08-01 15:40:36.481 | pythonlogging:'migrate'
2015-08-01 15:40:36.481 | pythonlogging:'mistralclient'
2015-08-01 15:40:36.481 | pythonlogging:'neutronclient'
2015-08-01 15:40:36.481 | pythonlogging:'novaclient'
2015-08-01 15:40:36.481 | pythonlogging:'object'
2015-08-01 15:40:36.481 | pythonlogging:'oslo_cache'
2015-08-01 15:40:36.481 | pythonlogging:'oslo_concurrency'
2015-08-01 15:40:36.481 | pythonlogging:'oslo_config'
2015-08-01 15:40:36.481 | pythonlogging:'oslo_db'
2015-08-01 15:40:36.481 | pythonlogging:'oslo_log'
2015-08-01 15:40:36.482 | pythonlogging:'oslo_messaging'
2015-08-01 15:40:36.482 | pythonlogging:'oslo_middleware'
2015-08-01 15:40:36.482 | pythonlogging:'oslo_policy'
2015-08-01 15:40:36.482 | pythonlogging:'oslo_service'
2015-08-01 15:40:36.482 | pythonlogging:'oslo_utils'
2015-08-01 15:40:36.482 | pythonlogging:'oslo_versionedobjects'
2015-08-01 15:40:36.482 | pythonlogging:'requests'
2015-08-01 15:40:36.482 | pythonlogging:'routes'
2015-08-01 15:40:36.482 | pythonlogging:'saharaclient'
2015-08-01 15:40:36.482 | pythonlogging:'sqlalchemy'
2015-08-01 15:40:36.482 | pythonlogging:'stevedore'
2015-08-01 15:40:36.482 | pythonlogging:'swiftclient'
2015-08-01 15:40:36.483 | pythonlogging:'troveclient'
2015-08-01 15:40:36.483 |
2015-08-01 15:40:36.483 | pythonlogging:'': {{{
2015-08-01 15:40:36.483 | WARNING [heat.engine.environment] Changing GenericResourceType from <class 'heat.tests.generic_resource.GenericResource'> to <class 'heat.tests.generic_resource.GenericResource'>
2015-08-01 15:40:36.483 | WARNING [heat.engine.environment] Changing ResWithShowAttrType from <class 'heat.tests.generic_resource.ResWithShowAttr'> to <class 'heat.tests.generic_resource.ResWithShowAttr'>
2015-08-01 15:40:36.483 | WARNING [heat.engine.environment] Changing SignalResourceType from <class 'heat.tests.generic_resource.SignalResource'> to <class 'heat.tests.generic_resource.SignalResource'>
2015-08-01 15:40:36.483 | WARNING [heat.engine.environment] Changing ResourceWithPropsType from <class 'heat.tests.generic_resource.ResourceWithProps'> to <class 'heat.tests.generic_resource.ResourceWithProps'>
2015-08-01 15:40:36.483 | WARNING [heat.engine.environment] Changing StackUserResourceType from <class 'heat.tests.generic_resource.StackUserResource'> to <class 'heat.tests.generic_resource.StackUserResource'>
2015-08-01 15:40:36.483 | WARNING [heat.engine.environment] Changing ResourceWithResourceIDType from <class 'heat.tests.generic_resource.ResourceWithResourceID'> to <class 'heat.tests.generic_resource.ResourceWithResourceID'>
2015-08-01 15:40:36.483 | WARNING [heat.engine.environment] Changing ResourceWithAttributeType from <class 'heat.tests.generic_resource.ResourceWithAttributeType'> to <class 'heat.tests.generic_resource.ResourceWithAttributeType'>
2015-08-01 15:40:36.483 | WARNING [heat.engine.environment] Changing ResourceWithRequiredProps from <class 'heat.tests.generic_resource.ResourceWithRequiredProps'> to <class 'heat.tests.generic_resource.ResourceWithRequiredProps'>
2015-08-01 15:40:36.484 | WARNING [heat.engine.environment] Changing ResourceWithPropsAndAttrs from <class 'heat.tests.generic_resource.ResourceWithPropsAndAttrs'> to <class 'heat.tests.generic_resource.ResourceWithPropsAndAttrs'>
2015-08-01 15:40:36.484 | WARNING [heat.engine.environment] Changing ResWithComplexPropsAndAttrs from <class 'heat.tests.generic_resource.ResWithComplexPropsAndAttrs'> to <class 'heat.tests.generic_resource.ResWithComplexPropsAndAttrs'>
2015-08-01 15:40:36.484 | WARNING [heat.engine.environment] Changing ResourceWithCustomConstraint from <class 'heat.tests.generic_resource.ResourceWithCustomConstraint'> to <class 'heat.tests.generic_resource.ResourceWithCustomConstraint'>
2015-08-01 15:40:36.484 | WARNING [heat.engine.environment] Changing ResourceWithComplexAttributesType from <class 'heat.tests.generic_resource.ResourceWithComplexAttributes'> to <class 'heat.tests.generic_resource.ResourceWithComplexAttributes'>
2015-08-01 15:40:36.484 | WARNING [heat.engine.environment] Changing ResourceWithDefaultClientName from <class 'heat.tests.generic_resource.ResourceWithDefaultClientName'> to <class 'heat.tests.generic_resource.ResourceWithDefaultClientName'>
2015-08-01 15:40:36.484 | WARNING [heat.engine.environment] Changing OverwrittenFnGetAttType from <class 'heat.tests.generic_resource.ResourceWithFnGetAttType'> to <class 'heat.tests.generic_resource.ResourceWithFnGetAttType'>
2015-08-01 15:40:36.484 | WARNING [heat.engine.environment] Changing OverwrittenFnGetRefIdType from <class 'heat.tests.generic_resource.ResourceWithFnGetRefIdType'> to <class 'heat.tests.generic_resource.ResourceWithFnGetRefIdType'>
2015-08-01 15:40:36.484 | WARNING [heat.engine.environment] Changing ResourceWithListProp from <class 'heat.tests.generic_resource.ResourceWithListProp'> to <class 'heat.tests.generic_resource.ResourceWithListProp'>
2015-08-01 15:40:36.484 | WARNING [heat.engine.environment] Changing StackResourceType from <class 'heat.tests.generic_resource.StackResourceType'> to <class 'heat.tests.generic_resource.StackResourceType'>
2015-08-01 15:40:36.484 | WARNING [heat.engine.environment] Changing ResourceWithRestoreType from <class 'heat.tests.generic_resource.ResourceWithRestoreType'> to <class 'heat.tests.generic_resource.ResourceWithRestoreType'>
2015-08-01 15:40:36.484 | }}}
2015-08-01 15:40:36.485 |
2015-08-01 15:40:36.485 | Traceback (most recent call last):
2015-08-01 15:40:36.485 | File "/home/jenkins/workspace/gate-heat-python34/heat/tests/test_engine_service.py", line 2100, in test_resource_schema
2015-08-01 15:40:36.485 | self.assertEqual(expected, schema)
2015-08-01 15:40:36.485 | File "/home/jenkins/workspace/gate-heat-python34/.tox/py34/lib/python3.4/site-packages/testtools/testcase.py", line 350, in assertEqual
2015-08-01 15:40:36.485 | self.assertThat(observed, matcher, message)
2015-08-01 15:40:36.485 | File "/home/jenkins/workspace/gate-heat-python34/.tox/py34/lib/python3.4/site-packages/testtools/testcase.py", line 435, in assertThat
2015-08-01 15:40:36.485 | raise mismatch_error
2015-08-01 15:40:36.486 | testtools.matchers._impl.MismatchError: !=:
2015-08-01 15:40:36.486 | reference = {'attributes': {'Foo': {'description': 'Another generic attribute'},
2015-08-01 15:40:36.486 | 'foo': {'description': 'A generic attribute'},
2015-08-01 15:40:36.486 | 'show': {'description': 'Dictionary with resource '
2015-08-01 15:40:36.486 | 'attributes.',
2015-08-01 15:40:36.486 | 'type': 'map'}},
2015-08-01 15:40:36.486 | 'properties': {'Foo': {'immutable': False,
2015-08-01 15:40:36.486 | 'required': False,
2015-08-01 15:40:36.486 | 'type': 'string',
2015-08-01 15:40:36.486 | 'update_allowed': False},
2015-08-01 15:40:36.486 | 'FooInt': {'immutable': False,
2015-08-01 15:40:36.486 | 'required': False,
2015-08-01 15:40:36.487 | 'type': 'integer',
2015-08-01 15:40:36.487 | 'update_allowed': False}},
2015-08-01 15:40:36.487 | 'resource_type': 'ResourceWithPropsType',
2015-08-01 15:40:36.487 | 'support_status': {'message': None,
2015-08-01 15:40:36.487 | 'previous_status': None,
2015-08-01 15:40:36.487 | 'status': 'SUPPORTED',
2015-08-01 15:40:36.487 | 'version': None}}
2015-08-01 15:40:36.487 | actual = {'attributes': {'Foo': {'description': 'Another generic attribute'},
2015-08-01 15:40:36.487 | 'foo': {'description': 'A generic attribute'}},
2015-08-01 15:40:36.487 | 'properties': {'Foo': {'immutable': False,
2015-08-01 15:40:36.487 | 'required': False,
2015-08-01 15:40:36.488 | 'type': 'string',
2015-08-01 15:40:36.488 | 'update_allowed': False},
2015-08-01 15:40:36.488 | 'FooInt': {'immutable': False,
2015-08-01 15:40:36.488 | 'required': False,
2015-08-01 15:40:36.488 | 'type': 'integer',
2015-08-01 15:40:36.488 | 'update_allowed': False}},
2015-08-01 15:40:36.488 | 'resource_type': 'ResourceWithPropsType',
2015-08-01 15:40:36.488 | 'support_status': {'message': None,
2015-08-01 15:40:36.488 | 'previous_status': None,
2015-08-01 15:40:36.488 | 'status': 'SUPPORTED',
2015-08-01 15:40:36.488 | 'version': None}}

Basically, the resource_schema method doesn't take into consideration the base_attributes_schema at times and thus the test fails.

Tags: gate-failure
Changed in heat:
assignee: nobody → Sirushti Murugesan (sirushtim)
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/208564

Changed in heat:
status: New → In Progress
Changed in heat:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on heat (master)

Change abandoned by Sirushti Murugesan (<email address hidden>) on branch: master
Review: https://review.openstack.org/208564

Changed in heat:
assignee: Sirushti Murugesan (sirushtim) → Sergey Kraynev (skraynev)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

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

commit f419c6405eaa9d3a0c959b5d4d0f8017969a424a
Author: Sergey Kraynev <email address hidden>
Date: Thu Jul 23 07:39:46 2015 -0400

    Use base attributes with attribute_schema of class

    attribute_schema of Resource class sometimes used directly without
    creating instance. It allowed to situation, when attribute_schema is not
    updated by base attribute.

    This patch adds base_attributes_schema dictionary for these cases.

    Also added same approach for resource_facade and updated tests.

    Closes-Bug: #1481020

    Change-Id: I104dae2fa3f3394195c1fd9bbed1902a9e4ba31f

Changed in heat:
status: In Progress → Fix Committed
Changed in heat:
milestone: none → liberty-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: liberty-3 → 5.0.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.