From 928e74d86e9558c31aab881eb88fb85bbd497afa Mon Sep 17 00:00:00 2001 From: Keigo Noha Date: Tue, 13 Aug 2019 12:54:48 +0900 Subject: [PATCH] Modify grep rule to identify 'Clone Set' resources Current filter rule gets wrong results in transient condition. This commit changes the grep filter rule to increase the robustness of the result. Closes-Bug: #1839910 Change-Id: I92aba5bc7eb9e8a90d6a2c321b3a2a20414f1779 --- roles/instance-ha/tasks/undo.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/instance-ha/tasks/undo.yml b/roles/instance-ha/tasks/undo.yml index 5ee6187..3a9f623 100644 --- a/roles/instance-ha/tasks/undo.yml +++ b/roles/instance-ha/tasks/undo.yml @@ -18,7 +18,7 @@ - name: Remove resources associated to remote nodes shell: | - for resourceid in $(pcs resource show | grep compute | grep -v -e Stopped: -e Started: -e disabled -e remote | awk '{print $3}') + for resourceid in $(pcs resource show | grep compute | grep 'Clone Set:' | awk '{print $3}') do pcs resource cleanup $resourceid pcs --force resource delete $resourceid