diff --git a/heat/engine/check_resource.py b/heat/engine/check_resource.py index c41584507f..5c2db661a9 100644 --- a/heat/engine/check_resource.py +++ b/heat/engine/check_resource.py @@ -151,11 +151,8 @@ class CheckResource(object): self._handle_resource_failure(cnxt, is_update, rsrc.id, stack, reason) except scheduler.Timeout: - # reload the stack to verify current traversal - stack = parser.Stack.load(cnxt, stack_id=stack.id) - if stack.current_traversal != current_traversal: - return - self._handle_stack_timeout(cnxt, stack) + self._handle_resource_failure(cnxt, is_update, rsrc.id, + stack, u'Timed out') except CancelOperation: pass diff --git a/heat/tests/engine/test_check_resource.py b/heat/tests/engine/test_check_resource.py index c2597ff453..7bc867f4a1 100644 --- a/heat/tests/engine/test_check_resource.py +++ b/heat/tests/engine/test_check_resource.py @@ -476,15 +476,15 @@ class CheckWorkflowUpdateTest(common.HeatTestCase): mock_hf.assert_called_once_with(self.ctx, self.stack, u'Timed out') @mock.patch.object(check_resource.CheckResource, - '_handle_stack_timeout') + '_handle_failure') def test_do_check_resource_marks_stack_as_failed_if_stack_timesout( - self, mock_hst, mock_cru, mock_crc, mock_pcr, mock_csc): + self, mock_hf, mock_cru, mock_crc, mock_pcr, mock_csc): mock_cru.side_effect = scheduler.Timeout(None, 60) self.is_update = True self.cr._do_check_resource(self.ctx, self.stack.current_traversal, self.stack.t, {}, self.is_update, self.resource, self.stack, {}) - mock_hst.assert_called_once_with(self.ctx, self.stack) + mock_hf.assert_called_once_with(self.ctx, self.stack, u'Timed out') @mock.patch.object(check_resource.CheckResource, '_handle_stack_timeout') diff --git a/heat_integrationtests/functional/test_simultaneous_update.py b/heat_integrationtests/functional/test_simultaneous_update.py index 9f10a38cd8..0c562c0758 100644 --- a/heat_integrationtests/functional/test_simultaneous_update.py +++ b/heat_integrationtests/functional/test_simultaneous_update.py @@ -81,3 +81,13 @@ class SimultaneousUpdateStackTest(functional_base.FunctionalTestsBase): time.sleep(10) self.update_stack(stack_id, after) + + @test.requires_convergence + def test_retrigger_timeout(self): + before, after = get_templates(delay_s=70) + stack_id = self.stack_create(template=before, + expected_status='CREATE_IN_PROGRESS', + timeout=1) + time.sleep(50) + + self.update_stack(stack_id, after)