Browse Source

Eliminate race in CancelUpdateTest

The purpose of this test is to ensure we can rollback an in-progress
Server resource with attached ports. However, by cancelling immediately
we create a race whereby the stack may be rolled back before we have
even started updating the stack, in which case we are not testing the
behaviour we actually care about. Inserting a delay gives Heat enough
time to process the Port and start updating the Server before we cancel
the update.

In some circumstances this could also trigger a race within Heat,
whereby the rollback traversal would not block, but the update traversal
would retrigger it anyway. This resulted in the stack rollback being
marked COMPLETE multiple times, which could also lead to errors in
deleting the old raw_template after it had already been removed. The
latter have been fixed by separate patches. The race itself should be
addressed separately.

Change-Id: I3f9db686c31659437ff4797555e6608986946572
Task: 37199
changes/63/689063/2
Zane Bitter 2 years ago
parent
commit
3b4e0cda28
  1. 4
      heat_integrationtests/functional/test_cancel_update.py

4
heat_integrationtests/functional/test_cancel_update.py

@ -58,4 +58,8 @@ resources:
parameters=parameters,
expected_status='UPDATE_IN_PROGRESS')
# Ensure we start updating the server before rolling back
self._wait_for_resource_status(
stack_identifier, 'Server', 'CREATE_IN_PROGRESS')
self.cancel_update_stack(stack_identifier)
Loading…
Cancel
Save