Skip to content

Commit

Permalink
Fix fencing after crash
Browse files Browse the repository at this point in the history
  • Loading branch information
lpalovsky committed Jan 26, 2024
1 parent 30dfd49 commit c97b55d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ansible/playbooks/tasks/azure-cluster-bootstrap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@
- name: Set crm maintenance facts
ansible.builtin.set_fact:
crm_maintenance_mode: "{{ (crm_conf_show.stdout | regex_search('maintenance-mode=([a-z]*)', '\\1'))[0] | default('unknown') }}"
rsc_azure_events: "{{ crm_conf_show.stdout | regex_search('primitive rsc_azure-events') }}"
cln_azure_events: "{{ crm_conf_show.stdout | regex_search('clone cln_azure-events') }}"
rsc_azure_events: "{{ crm_conf_show.stdout | regex_search('primitive rsc_azure-events-az') }}"
cln_azure_events: "{{ crm_conf_show.stdout | regex_search('clone cln_azure-events-az') }}"
rsc_st_azure: "{{ crm_conf_show.stdout | regex_search('rsc_st_azure') }}"
when: is_primary

Expand All @@ -231,13 +231,13 @@
- not use_sbd | bool and azure_identity_management == 'spn'

- name: Add Azure scheduled events to cluster
ansible.builtin.command: crm configure primitive rsc_azure-events ocf:heartbeat:azure-events op monitor interval=10s allow-unhealthy-nodes=true
ansible.builtin.command: crm configure primitive rsc_azure-events-az ocf:heartbeat:azure-events-az meta allow-unhealthy-nodes=true op monitor interval=10s
when:
- is_primary
- rsc_azure_events | length == 0

- name: Clone Azure scheduled events
ansible.builtin.command: crm configure clone cln_azure-events rsc_azure-events
ansible.builtin.command: crm configure clone cln_azure-events-az rsc_azure-events-az
when:
- is_primary
- cln_azure_events| length == 0
Expand All @@ -251,8 +251,8 @@
- name: Reset crm maintenance facts
ansible.builtin.set_fact:
crm_maintenance_mode: "{{ (crm_conf_show.stdout | regex_search('maintenance-mode=([a-z]*)', '\\1'))[0] | default('unknown') }}"
rsc_azure_events: "{{ crm_conf_show.stdout | regex_search('primitive rsc_azure-events') }}"
cln_azure_events: "{{ crm_conf_show.stdout | regex_search('clone cln_azure-events') }}"
rsc_azure_events: "{{ crm_conf_show.stdout | regex_search('primitive rsc_azure-events-az') }}"
cln_azure_events: "{{ crm_conf_show.stdout | regex_search('clone cln_azure-events-az') }}"
when: is_primary

- name: Ensure maintenance mode is deactivated
Expand Down

0 comments on commit c97b55d

Please sign in to comment.