Skip to content

Commit

Permalink
add support for configuring fence_kdump on Debian 10/11 systems
Browse files Browse the repository at this point in the history
  • Loading branch information
OndrejHome committed Nov 24, 2022
1 parent 2e93fe1 commit e83ef87
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 1 deletion.
8 changes: 8 additions & 0 deletions tasks/debian10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
apt:
name: "{{ cluster_node_is_remote | bool | ternary(pacemaker_remote_packages, pacemaker_packages) }}"
state: 'present'
cache_valid_time: 3600

- name: Install package(s) for fence_kdump
apt:
name: "{{ fence_kdump_packages }}"
state: 'present'
cache_valid_time: 3600
when: cluster_configure_fence_kdump|bool

- name: Check if Corosync configuration is default configuration
command: '/usr/bin/dpkg --verify corosync'
Expand Down
7 changes: 7 additions & 0 deletions tasks/debian11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
cache_valid_time: 3600
when: ansible_distribution == 'Debian' and ansible_distribution_major_version == '11'

- name: Install package(s) for fence_kdump
apt:
name: "{{ fence_kdump_packages }}"
state: 'present'
cache_valid_time: 3600
when: cluster_configure_fence_kdump|bool

- name: Check if Corosync configuration is default configuration
command: '/usr/bin/dpkg --verify corosync'
register: result
Expand Down
3 changes: 2 additions & 1 deletion tasks/fence_kdump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
name: "fence-kdump-{{ hostvars[item][cluster_hostname_fact] }}"
resource_class: 'stonith'
resource_type: 'fence_kdump'
options: "pcmk_host_list={{ hostvars[item][cluster_hostname_fact] }}"
options: "pcmk_host_list={{ hostvars[item][cluster_hostname_fact] }} {% if ansible_distribution == 'Debian' %}pcmk_monitor_action=metadata{% endif %}"
with_items: "{{ play_hosts }}"
run_once: true
# FIXME: fence_kdump on Debian returns exit code 1 for 'monitor' op so we use 'metadata' as dummy replacement

- name: create fence constraints
pcs_constraint_location:
Expand Down
3 changes: 3 additions & 0 deletions vars/debian10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ pacemaker_packages:
pacemaker_remote_packages:
- pcs
- pacemaker-remote
fence_kdump_packages:
- kdump-tools

kdump_service_name: 'kdump-tools'
cluster_configure_fence_xvm: false
cluster_firewall: false

Expand Down
3 changes: 3 additions & 0 deletions vars/debian11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ pacemaker_packages:
pacemaker_remote_packages:
- pcs
- pacemaker-remote
fence_kdump_packages:
- kdump-tools

kdump_service_name: 'kdump-tools'
cluster_configure_fence_xvm: false
cluster_firewall: false

Expand Down

0 comments on commit e83ef87

Please sign in to comment.