Skip to content

Commit 7fbd95b

Browse files
committed
Refine conditions for killing enqueue server process to check for specific output instead of count
1 parent d1e2070 commit 7fbd95b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/roles/ha_scs/tasks/kill-enqueue-server.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,21 @@
3232
test_execution_hostname: "{{ hostvars[cluster_status_pre.ascs_node].ansible_hostname }}"
3333

3434
- name: "Test Execution: Check for ENSA version"
35-
ansible.builtin.shell: set -o pipefail && pgrep -f 'enq.sap{{ sap_sid | upper }}' | wc -l
35+
ansible.builtin.shell: set -o pipefail && pgrep -f 'enq.sap{{ sap_sid | upper }}'
3636
register: ensa2_check
3737
failed_when: false
3838

3939
- name: "Test Execution: Kill Enqueue Server Process (ENSA1)"
4040
ansible.builtin.shell: set -o pipefail && pgrep -f 'en.sap{{ sap_sid | upper }}' | xargs kill -9
4141
register: kill_er_result
4242
failed_when: false
43-
when: ensa2_check.stdout | int == 0
43+
when: ensa2_check.stdout == ""
4444

4545
- name: "Test Execution: Kill Enqueue Server Process (ENSA2)"
4646
ansible.builtin.shell: set -o pipefail && pgrep -f 'enq.sap{{ sap_sid | upper }}' | xargs kill -9
4747
register: kill_en_result
4848
failed_when: false
49-
when: ensa2_check.stdout | int != 0
49+
when: ensa2_check.stdout == "1"
5050

5151
- name: "Test Execution: Validate ASCS node has stopped"
5252
get_cluster_status_scs:

0 commit comments

Comments
 (0)