Skip to content

Commit edfc04c

Browse files
committed
Add failure condition for unavailable primary and secondary nodes in block network task
1 parent accdbd6 commit edfc04c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/roles/ha_db_hana/tasks/block-network.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,14 @@
7070
primary_node_down: "{{ hostvars[cluster_status_pre.primary_node].node_status is failed }}"
7171
secondary_node_down: "{{ hostvars[cluster_status_pre.secondary_node].node_status is failed }}"
7272

73+
- name: "Fail if both nodes are unavailable"
74+
ansible.builtin.fail:
75+
msg: |
76+
"Critical error: Both primary and secondary nodes are fenced.
77+
Please check the cluster status. This typically happens when priority-fencing-delay
78+
parameter is not set in the cluster configuration."
79+
when: primary_node_down and secondary_node_down
80+
7381
- name: "Test Execution: Check node status on primary and secondary"
7482
when:
7583
- not primary_node_down

0 commit comments

Comments
 (0)