Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarocarvajald committed Feb 28, 2025
1 parent 187a45d commit 9fc484b
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions ansible/playbooks/tasks/cluster-hana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@
{{ 'Master' if ansible_facts.packages['pacemaker'][0].version is version('2.1.9', '<')
else 'Promoted' }}
- name: Ensure maintenance mode is active
ansible.builtin.command:
cmd: crm maintenance on
when: crm_maintenance_mode is false or crm_maintenance_mode == 'unknown'

- name: Create HANA topology resource
ansible.builtin.command:
cmd: >-
Expand Down Expand Up @@ -233,18 +228,6 @@
ansible.builtin.command:
cmd: cs_wait_for_idle -s 5

# Get current maintenance state
- name: Refresh cluster status
ansible.builtin.command:
cmd: crm configure show
register: refreshed_crm_conf_show
changed_when: false

- name: Refresh crm facts
ansible.builtin.set_fact:
refreshed_crm_maintenance_mode: "{{ (refreshed_crm_conf_show.stdout | regex_search('maintenance-mode=([a-z]*)', '\\1'))[0] | default('unknown') }}"
changed_when: false

- name: Refresh SAPHana resource clone
ansible.builtin.command:
cmd: "crm resource refresh {{ ms_saphanactl }}"
Expand All @@ -261,17 +244,6 @@
ansible.builtin.command:
cmd: cs_wait_for_idle -s 5

- name: Ensure maintenance mode is disabled
ansible.builtin.command:
cmd: crm maintenance off
when:
- is_primary
- refreshed_crm_maintenance_mode is true or refreshed_crm_maintenance_mode == 'unknown'

- name: Wait for cluster to settle
ansible.builtin.command:
cmd: cs_wait_for_idle -s 5

- name: Get cluster state
ansible.builtin.command:
cmd: crm status full
Expand Down

0 comments on commit 9fc484b

Please sign in to comment.