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
This commit is contained in:
Keigo Noha 2019-08-13 12:54:48 +09:00
parent 8bb060b864
commit 928e74d86e
1 changed files with 1 additions and 1 deletions

View File

@ -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