Skip to content

Commit

Permalink
he: Handle migration to hosts that use systemd-coredump
Browse files Browse the repository at this point in the history
This PR adds proper handling of a situation where the HE is migrated
from a host that was using abrt to a host that's using systemd-coredump.

Signed-off-by: Marcin Sobczyk <[email protected]>
  • Loading branch information
tinez committed Jun 29, 2022
1 parent 1358e16 commit d1309b4
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions roles/hosted_engine_setup/tasks/initial_clean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,14 @@
args:
warn: false
environment: "{{ he_cmd_lang }}"
- name: Verify abrt-action-save-package-data file
- name: Check if vdsm's abrt-action-save-package-data config exists
stat:
path: /etc/abrt/abrt-action-save-package-data.conf
register: abrt_exists
register: abrt_vdsm_config
- name: Check if abrt is installed
stat:
path: /usr/share/abrt/conf.d/abrt-action-save-package-data.conf
register: abrt_installed_config
- name: Restore initial abrt config files
copy:
remote_src: true
Expand All @@ -56,12 +60,22 @@
src: /usr/share/abrt/conf.d/plugins/vmcore.conf,
dest: /etc/abrt/plugins/vmcore.conf
}
when: abrt_exists.stat.exists
when: abrt_vdsm_config.stat.exists and abrt_installed_config.stat.exists
- name: Restart abrtd service
service:
name: abrtd
state: restarted
when: abrt_exists.stat.exists
when: abrt_vdsm_config.stat.exists and abrt_installed_config.stat.exists
- name: Remove vdsm's abrt config files
file:
state: absent
path: "{{ item }}"
with_items:
- /etc/abrt/abrt-action-save-package-data.conf
- /etc/abrt/abrt.conf
- /etc/abrt/plugins/CCpp.conf
- /etc/abrt/plugins/vmcore.conf
when: abrt_vdsm_config.stat.exists and not abrt_installed_config.stat.exists
- name: Drop libvirt sasl2 configuration by vdsm
command: >-
sed -i '/## start vdsm-4.[0-9]\+.[0-9]\+ configuration/,/## end vdsm configuration/d' /etc/sasl2/libvirt.conf
Expand Down

0 comments on commit d1309b4

Please sign in to comment.