From 9aa38f3b49cbc2f18ce131fd86d20d0234a411d3 Mon Sep 17 00:00:00 2001 From: Anil Belur Date: Tue, 9 Jul 2019 08:35:40 +1000 Subject: [PATCH] Handle stack removal with the force option Issue: RELENG-2058 Change-Id: I7e428c6b3a5dd0c21f10b368cb8e9584d5e77648 Signed-off-by: Anil Belur --- .../notes/openstack-stack-del-with-force-b50cadbacc49d516.yaml | 5 +++++ shell/openstack-cleanup-orphaned-stacks.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/openstack-stack-del-with-force-b50cadbacc49d516.yaml diff --git a/releasenotes/notes/openstack-stack-del-with-force-b50cadbacc49d516.yaml b/releasenotes/notes/openstack-stack-del-with-force-b50cadbacc49d516.yaml new file mode 100644 index 00000000..31a973b1 --- /dev/null +++ b/releasenotes/notes/openstack-stack-del-with-force-b50cadbacc49d516.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Delete stacks with the ``--force`` option to ensure that any delete + failures does not stop the openstack-cron jobs from continuing. diff --git a/shell/openstack-cleanup-orphaned-stacks.sh b/shell/openstack-cleanup-orphaned-stacks.sh index 8140adea..ccc29969 100644 --- a/shell/openstack-cleanup-orphaned-stacks.sh +++ b/shell/openstack-cleanup-orphaned-stacks.sh @@ -87,6 +87,6 @@ for STACK_NAME in "${OS_STACKS[@]}"; do continue else echo "Deleting orphaned stack: $STACK_NAME" - lftools openstack --os-cloud "$os_cloud" stack delete "$STACK_NAME" + lftools openstack --os-cloud "$os_cloud" stack delete --force "$STACK_NAME" fi done -- 2.16.6