From d12512ab17b35ca8adaba9eea407dda6c62c8137 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Fri, 29 Jun 2018 16:06:21 -0400 Subject: [PATCH] Fix purging events from stacks converted to convergence Stacks with convergence enabled are guaranteed not to have a backup stack, but they may have previously had backup stacks (prior to being converted to convergence) that remain only soft-deleted. In this case they may still fail the foreign key constraints in the database when purging events, so don't bail out of the workaround path when we encounter this situation. This will allow events to be purged from these stacks without having to wait for purge_deleted to purge the backup stacks first. Change-Id: If541d421a0a2af17ab937ec0a27bee6e4e9c1f6b Story: #2002643 Task: 22648 --- heat/db/sqlalchemy/api.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/heat/db/sqlalchemy/api.py b/heat/db/sqlalchemy/api.py index c633b311b3..02ce9fd7bf 100644 --- a/heat/db/sqlalchemy/api.py +++ b/heat/db/sqlalchemy/api.py @@ -1045,9 +1045,6 @@ def _all_backup_stack_ids(context, stack_id): if stack is None: LOG.error('Stack %s not found', stack_id) return - if stack.convergence: - LOG.debug('Not searching for backup of convergence-enabled stack') - return is_backup = stack.name.endswith('*') if is_backup: