heat/heat_integrationtests/functional
Zane Bitter 3ac0bbedcc Avoid race in OSWaitCondition test
While sending a signal to a WaitCondition is synchronous, the actual update
of the WaitConditionHandle metadata happens asynchronously since the fix
for bug 1394095. As a result, it's not guaranteed that even the first 6
signals (which are sent in serially, as opposed to the later ones which are
deliberately sent in parallel) will be stored in the same order that they
are sent.

Crucially, that means that one or more of the signals explicitly sent with
id 5 may arrive when there have been only three previous signals stored.
This means that the next signal to arrive with an implicit ID will be the
fifth signal stored, and therefore also get id 5. Of course we have a log
message to indicate when an existing signal is overwritten by another with
the same ID, and we are not seeing it except in the intended case where we
explicitly send in the same ID twice. That's because the keys have
different types in the data dict - the explicitly specified ID is the
string "5", but the implicitly calculated one is the integer 5. But - get
this - when we serialise the data to JSON both keys are serialised to the
string "5", and upon deserialisation they collide and one is silently
dropped on the floor.

So if the signal with the explicit ID "5" is stored just before the one
with reason "signal 4", then "signal 4" will effectively be silently
ignored as the 5th signal to arrive - a slot already filled. And since that
signal is ignored, the next signal will also be treated as the 5th to
arrive and ignored, and so on. This leads inexorably to the dreaded
"WaitConditionTimeout: resources.wait_condition: 4 of 25 received" error.

For this reason, it's a bad idea to mix explicit IDs that are also integers
with implicitly assigned IDs. Use an ID that won't collide instead.

This patch is backported from
https://git.openstack.org/cgit/openstack/heat-tempest-plugin/commit/?id=2cff12bceb4b568cd8673c9ffa5668d37fcc9da9

Change-Id: Ie2608285ba9c0ec3f1e4a8bbf1a147ce35ccae00
Depends-On: https://review.openstack.org/550682
Closes-Bug: #1738653
2018-04-04 09:53:28 -04:00
..
__init__.py Functional test UpdateStackTest 2014-10-20 16:31:09 +13:00
functional_base.py Add integration tests for admin actions 2016-06-14 22:39:33 +05:30
test_admin_actions.py Add integration tests for admin actions 2016-06-14 22:39:33 +05:30
test_autoscaling.py m1.tiny is not always there 2016-11-08 05:19:10 +00:00
test_aws_stack.py Skip integration tests when Swift is not available 2017-03-23 11:20:14 +01:00
test_cancel_update.py Don't use hardcoded flavors in tests 2016-12-06 12:14:18 +05:30
test_conditional_exposure.py Encode exception message in tests 2017-02-28 09:47:05 +01:00
test_conditions.py Remove unnecessary setUp and tearDown 2016-09-30 10:56:31 +08:00
test_create_update_neutron_port.py Skip test_update_with_mac_address without admin credentials 2017-02-20 07:25:00 +00:00
test_create_update_neutron_subnet.py Add few functional tests for translation 2017-04-12 12:02:48 +00:00
test_create_update_neutron_trunk.py Add trunk functional testcases to heat 2017-07-21 15:54:51 +02:00
test_create_update.py Fix race in new condition test 2017-07-05 15:45:39 +02:00
test_default_parameters.py Remove unnecessary setUp and tearDown 2016-09-30 10:56:31 +08:00
test_delete.py Increase the timeout for the stop_stack message 2016-09-22 09:45:08 -04:00
test_encrypted_parameter.py Remove unnecessary setUp and tearDown 2016-09-30 10:56:31 +08:00
test_encryption_vol_type.py Add integration tests for admin actions 2016-06-14 22:39:33 +05:30
test_env_merge.py Modify use of assertTrue(A in B) 2016-09-02 08:30:00 +00:00
test_event_sinks.py Fix race in ZaqarEventSinkTest.test_events 2017-08-12 14:37:56 +05:30
test_external_ref.py Add support for a resource level external_id 2016-08-12 15:59:14 +08:00
test_heat_autoscaling.py Increase cooldown in test_asg_cooldown 2017-06-09 06:04:52 +00:00
test_hooks.py Use yaml.safe_dump instead of yaml.dump 2016-02-20 07:45:32 +05:30
test_immutable_parameters.py Return HTTPBadRequest error from API for immutable parameters 2016-03-01 21:00:16 -06:00
test_instance_group.py m1.tiny is not always there 2016-11-08 05:19:10 +00:00
test_lbaasv2.py Remove unused LOG to keep code clean 2016-07-10 11:11:00 +00:00
test_nested_get_attr.py Add a functional test for nested get_attr functions 2017-07-10 16:43:38 -04:00
test_notifications.py Fix calls to call_until_true 2017-04-10 17:00:57 +02:00
test_nova_server_networks.py Check for correct Neutron exceptions harder 2017-06-01 19:00:46 -04:00
test_os_wait_condition.py Avoid race in OSWaitCondition test 2018-04-04 09:53:28 -04:00
test_preview_update.py Fix update preview to handle nested stacks 2016-02-03 12:34:33 +00:00
test_preview.py Update functional tests missing skip check 2017-06-28 07:46:57 +00:00
test_purge.py Remove additional purge test 2016-08-03 10:31:09 +02:00
test_reload_on_sighup.py Fix some functional tests for py3 2017-03-28 13:00:19 +00:00
test_remote_stack.py Use region from config in functional tests 2016-03-23 18:33:56 +05:30
test_replace_deprecated.py Fix non-destructive upgrade for deprecated res types in convergence 2017-12-08 18:57:21 -05:00
test_resource_chain.py Use more specific asserts in tests 2016-11-22 08:12:35 +01:00
test_resource_group.py Improve StackValidationFailed exception 2017-06-29 09:40:54 +05:30
test_resources_list.py Don't load new copies of current resources 2017-07-13 15:07:50 -04:00
test_snapshot_restore.py Fix handle_restore for server and volume resources 2017-05-19 11:56:27 +05:30
test_software_config.py Implement handle_<action>_cancel for SoftwareDeployment 2017-08-02 06:56:41 +05:30
test_software_deployment_group.py Fix races in SoftwareDeploymentGroupTest 2017-06-14 16:31:54 -04:00
test_stack_events.py Use more specific asserts in tests 2016-11-22 08:12:35 +01:00
test_stack_outputs.py Defer exceptions in calculating node_data() 2017-10-31 15:07:07 +00:00
test_stack_tags.py Make the stack tags template non-empty 2015-09-14 11:12:20 +10:00
test_swiftsignal_update.py Skip integration tests when Swift is not available 2017-03-23 11:20:14 +01:00
test_template_resource.py Update functional tests missing skip check 2017-06-28 07:46:57 +00:00
test_template_validate.py Allow nested validation for template-validate 2015-09-22 08:27:28 +01:00
test_templates.py Add new HOT version for Pike release 2017-03-14 15:34:31 -04:00
test_translation.py Add few functional tests for translation 2017-04-12 12:02:48 +00:00
test_unicode_template.py Remove unnecessary setUp and tearDown 2016-09-30 10:56:31 +08:00
test_update_restricted.py Fix another test race in test_update_restricted 2016-06-30 13:51:01 +02:00
test_validation.py Add config entries to skip integration tests 2015-08-07 07:29:20 +00:00
test_waitcondition.py Add test for zaqar-based wait conditions 2016-02-09 10:19:36 +01:00